Overview:

Key:

The key is the tuple (b, r) such that b is the block size and r is the number of rotations (circular shifts).

Encryption:

  1. Break plaintext into blocks of size b
  2. If one of the blocks is empty, pad with some character like 'Q'.
  3. Rotate each block r times to the left (circular shift)
  4. Merge the modified blocks

Decryption:

Encrypt using (b, -r), i.e., perform right circular shift on each block.

Example:

Plaintext = 'Cryptography_is_fun'

Key = (4,1)

C r y p t o g r a p h y _ i s _ f u n Q r y p C o g r t p h y a i s _ _ u n Q f

Ciphertext = rypCogrtphyais__unQf

General Analysis: