My Math Forum  

Go Back   My Math Forum > Science Forums > Computer Science

Computer Science Computer Science Forum


Thanks Tree3Thanks
  • 1 Post By weirddave
  • 1 Post By weirddave
  • 1 Post By skipjack
Reply
 
LinkBack Thread Tools Display Modes
February 6th, 2018, 06:30 PM   #1
Newbie
 
Joined: Jan 2018
From: Toronto

Posts: 9
Thanks: 0

Caesar Cipher help!

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 skipjack; February 16th, 2018 at 02:54 AM.
Tricia is offline  
 
February 6th, 2018, 08:16 PM   #2
Global Moderator
 
Joined: Dec 2006

Posts: 18,574
Thanks: 1485

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?
skipjack is online now  
February 7th, 2018, 06:44 AM   #3
Senior Member
 
Joined: Apr 2014
From: UK

Posts: 800
Thanks: 297

The answer is:
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).
Thanks from Tricia
weirddave is offline  
February 7th, 2018, 09:21 AM   #4
Math Team
 
Joined: Dec 2013
From: Colombia

Posts: 7,143
Thanks: 2383

Math Focus: Mainly analysis and algebra
That's a great example of using notation to obfuscate.
v8archie is offline  
February 7th, 2018, 05:58 PM   #5
Newbie
 
Joined: Jan 2018
From: Toronto

Posts: 9
Thanks: 0

Quote:
Originally Posted by weirddave View Post
The answer is:
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?

Thanks for your help.
Patricia
Tricia is offline  
February 8th, 2018, 12:56 AM   #6
Senior Member
 
Joined: Apr 2014
From: UK

Posts: 800
Thanks: 297

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)
Thanks from Tricia
weirddave is offline  
February 15th, 2018, 04:58 PM   #7
Newbie
 
Joined: Jan 2018
From: Toronto

Posts: 9
Thanks: 0

Question

Quote:
Originally Posted by weirddave View Post
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)
Tricia is offline  
February 15th, 2018, 08:15 PM   #8
Global Moderator
 
Joined: Dec 2006

Posts: 18,574
Thanks: 1485

Quote:
Originally Posted by Tricia View Post
. . . 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.
Thanks from weirddave
skipjack is online now  
February 16th, 2018, 12:10 AM   #9
Senior Member
 
Joined: Apr 2014
From: UK

Posts: 800
Thanks: 297

Ha, well spotted
weirddave is offline  
Reply

  My Math Forum > Science Forums > Computer Science

Tags
caesar, cipher



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Caesar Encryption mrdumb Algebra 1 September 29th, 2014 09:24 AM
Pohlig-Hellman Cipher + Affine Hill Cipher, relatively simpl threesixtify Applied Math 0 January 22nd, 2013 05:53 AM
Multiplicative cipher - part 2 purecotton Number Theory 1 May 28th, 2012 07:30 AM
a multiplicative cipher milly2012 Number Theory 7 May 28th, 2012 05:17 AM
Affine transformation and RSA cipher nooblet Number Theory 3 March 12th, 2009 04:46 AM





Copyright © 2018 My Math Forum. All rights reserved.