samjh
November 7th, 2007, 11:39 AM
Time for a programming challenge, methinks. :)
---------------------------------------------------------------------
An undercover officer has intercepted a cypher-text of a message sent by a wanted terrorist cell. He has also obtained from a source what is believed to be the cypher-text of that message.
The source claims that the terrorist cell is using the Caesar cypher to encrypt its messages.
Those fools think their messages are secure!
Your first mission, should you choose to accept it, is to create a program that will read the plain-text and cypher-text of the messages we have obtained, and determine the shift parameter of the Caesar cypher.
Your second mission, is for your program to be able to decrypt any Caesar-cyphered message with a user-specified shift parameter.
For assistance, we have uncovered this top secret file for you:
http://en.wikipedia.org/wiki/Caesar_cipher
Good luck!
---------------------------------------------------------------------
Plain text:
FARSI WILL DRIVE BOMB INTO CAR PARK. MAY HE BE GRANTED 77 VIRGINS FOR THIS GREAT DEED!
Cypher text:
YTKLB PBEE WKBOX UHFU BGMH VTK ITKD. FTR AX UX ZKTGMXW 77 OBKZBGL YHK MABL ZKXTM WXXW!
---------------------------------------------------------------------
An undercover officer has intercepted a cypher-text of a message sent by a wanted terrorist cell. He has also obtained from a source what is believed to be the cypher-text of that message.
The source claims that the terrorist cell is using the Caesar cypher to encrypt its messages.
Those fools think their messages are secure!
Your first mission, should you choose to accept it, is to create a program that will read the plain-text and cypher-text of the messages we have obtained, and determine the shift parameter of the Caesar cypher.
Your second mission, is for your program to be able to decrypt any Caesar-cyphered message with a user-specified shift parameter.
For assistance, we have uncovered this top secret file for you:
http://en.wikipedia.org/wiki/Caesar_cipher
Good luck!
---------------------------------------------------------------------
Plain text:
FARSI WILL DRIVE BOMB INTO CAR PARK. MAY HE BE GRANTED 77 VIRGINS FOR THIS GREAT DEED!
Cypher text:
YTKLB PBEE WKBOX UHFU BGMH VTK ITKD. FTR AX UX ZKTGMXW 77 OBKZBGL YHK MABL ZKXTM WXXW!