# Caesar Cipher help!

#### Tricia

Not sure whether this question was answered already, though I saw the same question.

Assume that we choose N (that is, K=14) as an encryption key in Caesarâ€™s cipher. What is the result Ci of the following (double) encryption
Ci = E (K,E(K, Mi)), where Mi is an arbitrary plaintext element?

Any suggestions on how to answer this question will be greatly appreciated. Thank you.

Last edited by a moderator:

#### skipjack

Forum Staff
Why is the encryption key referred to as a letter? How would the encryption be done using a letter without converting that letter to a number?

#### weirddave

Ci = E (2K, Mi)
Given that 2K in the example is 28, you might prefer the slightly longer answer of:
Ci = E (2K(Mod 26), Mi)

Any encryption which replaces one fixed set of symbols for another fixed set never benefits from double encryption as you can always decrypt it in a single step (because you can also double encrypt in a single step).

1 person

#### v8archie

Math Team
That's a great example of using notation to obfuscate.

#### Tricia

Ci = E (2K, Mi)
Given that 2K in the example is 28, you might prefer the slightly longer answer of:
Ci = E (2K(Mod 26), Mi)

Any encryption which replaces one fixed set of symbols for another fixed set never benefits from double encryption as you can always decrypt it in a single step (because you can also double encrypt in a single step).
I am not clear on how you got the 2K though the K was used in the example.

If N is used as an encryption key in Caesar cipher and N=Q then should it not be Ci = E (2Q (Mod 26), Mi) but not clear on how you got 2.

(The change of each letter to the third letter is how I got the Q)

Also, what is meant by where Mi is an arbitrary plaintext element?

Patricia

#### weirddave

I think I now understand your notation, My equation still works if K is Q-N (I thought that's what the K=14 was referring to in the original post).

So, in the N=Q example, we rotate the alphabet 3 places forward. If we then encrypt the result, we move another 3 places forward, the result is that we move 6 places forward.

"Mi is an arbitrary plaintext element"
I took this to mean any letter of the alphabet, but this isn't strictly true, plaintext can contain upper and lower case letters, spaces and other punctuation symbols. Computer systems typically allocate a whole byte for each element, so you'd have to use (mod 256) instead of (mod 26)

1 person

#### Tricia

Question

I think I now understand your notation, My equation still works if K is Q-N (I thought that's what the K=14 was referring to in the original post).

So, in the N=Q example, we rotate the alphabet 3 places forward. If we then encrypt the result, we move another 3 places forward, the result is that we move 6 places forward.

"Mi is an arbitrary plaintext element"
I took this to mean any letter of the alphabet, but this isn't strictly true, plaintext can contain upper and lower case letters, spaces and other punctuation symbols. Computer systems typically allocate a whole byte for each element, so you'd have to use (mod 256) instead of (mod 26)
Does that mean the answer should look like below?
Ci = E (2K(Mod 256), Mi)

#### skipjack

Forum Staff
. . . we choose N (that is, K=14) as an encryption key
If that means that "A" is encrypted as "N" by shifting 13 places along the alphabet (so that "K = 14" was a mistaken assumption), double encryption would leave the original text unchanged (Ci = Mi), assuming that the encryption is applied only to the 26 letters of the alphabet.

1 person

#### weirddave

Ha, well spotted

Similar Math Discussions Math Forum Date
Computer Science
Computer Science
Linear Algebra
Algebra