For the following question figure out what cipher was used to encode the following encrypted message. The text has been encrypted using one of the following ciphers (Caesar, Rail Fence, Vigenere, or Playfair): Fc risdzwche mrw gcne. Fvm xyxfi-xoeboc dcelqztaqcbizq.
The key is also encoded: wsgmephmpiqqe (C+4)
The key is :
The message is:
The key was encrypted using a cipher, which is a simple substitution cipher.
The message was encoded using a cipher.
I did Caesar CIpher with help of python programming.
In ceaser cipher first did deciphering of key here i am attaching code and output-
k=4 #Value of key = 4
ct=['w','s','g','m','e','p','h','m','p','i','q','q','e'] #key in form of list
print("Encoded key:",ct) #this wil print encoded key
print()
dec=[]
fpt=[]
for m in ct:
dec.append((ord(m)-k-97)%26+97) #this will decode encoded key in form of ASCII key and append to new list
for n in dec:
fpt.append(chr(n)) #this will convert ASCII value to character and store in final list
print("The key is:",fpt) #this will print Key.
also i am attaching code for message and screenshot of output-
k=4 #Value of key = 4
#message in form of list
ct=['f','c','r','i','s','d','z','w','c','h','e','m','r','w','g','c','n','e','F','v','m','x','y','x','f','i','x','o','e','b','o','c','d','c','e','l','q','z','t','a','q','c','b','i','z','q']
print("Encoded text:",ct) #this wil print encoded message
print()
dec=[]
fpt=[]
for m in ct:
dec.append((ord(m)-k-97)%26+97) #this will decode encoded key in form of ASCII key and append to new list
for n in dec:
fpt.append(chr(n)) #this will convert ASCII value to character and store in final list
print("The key is:",fpt) #this will print message.
print("The message is:",fpt)
Get Answers For Free
Most questions answered within 1 hours.