New offer! Get 30% off one whole year of Unlimited learning. Subscribe for just £249.99 £174.99. New subscribers only. T&Cs apply

# Your turn: Simple ciphers exercise

We have set out a number of exercises for you to do; decryptions and encryptions based on a Caesar cipher and a permutation cipher.

In this step, we have set out a number of exercises for you to do; decryptions and encryptions based on a Caesar cipher and a permutation cipher.

Have a go at these exercises and, if you get stuck, refer back to earlier steps to remind yourself of the techniques.

We will show you the answers in the following step!

## Caesar cipher

### Encryption

• Encrypt the following message using the Caesar cipher with 7 as the key. For example, when the key is 7 the letter ‘A’ is replaced by ‘H’.
• If you can meet with triumph and disaster, and treat those two impostors just the same.

### Decryption

• Decrypt the following message using the Caesar cipher with 15 as the key. For example, when the key is 15 the letter ‘A’ is replaced by ‘L’.
• Lt wdas iwtht igjiwh id qt htau-tkxstci, iwpi paa btc pgt rgtpits tfjpa, iwpi iwtn pgt tcsdlts qn iwtxg Rgtpidg lxiw rtgipxc jcpaxtcpqat Gxvwih, iwpi pbdcv iwtht pgt Axut, Axqtgin pcs iwt ejghjxi du Wpeexcthh.
Do you know where the text is originally from?

## Permutation cipher

### Encryption

• Encrypt the following message using a permutation cipher. Use a permutation block length of 6 and the permutation which reorders the characters (𝑥1𝑥2𝑥3𝑥4𝑥5𝑥6×1​x2​x3​x4​x5​x6​) into the order (𝑥5𝑥4𝑥6𝑥1𝑥3𝑥2×5​x4​x6​x1​x3​x2)​.
• Dulce et decorum est pro patria mori

### Decryption

• Decrypt the following message using a permutation cipher. The permutation block length is 5 and the permutation which reorders the characters (𝑥1𝑥2𝑥3𝑥4𝑥5×1​x2​x3​x4​x5​) into the order (𝑥1𝑥3𝑥5𝑥4𝑥2×1​x3​x5​x4​x2​).
• ‘Iofy un awt otste ehret ueem aesru ao f ,mna cwtahw oh th erseta hsiirnefi,osr ntohei sqsula’