For these exercises we will be Alice. We want to encrypt a message to send to Bob. For simplicity the message consists of a single word - ENIGMA. Our private key is a=5. Bob has a private key also. The following public keys are published: C=3, and N=13.

STEP 1: Encode the message into binary by translating each letter into a 5-bit binary sequence designating the numerical position of the letter in the alphabet.
For example, an N is the 14th letter in the alphabet. (14)10=(01110)2.

binary representation:  (use 30 bits and do not put spaces between binary digits)

 Tries 0/4

STEP 2: Establish the codeword P (in decimal) that will be sent to Bob using the algorithm P=Camod(N).

P =

 Tries 0/4

STEP 3: We have transmitted P (from STEP 2) to Bob and he has sent us the number Q=3. He computed this number using his private key. Using this information, compute the seed X(0) that will be used in the pseudo-random number generator in the next step.

X(0) =

 Tries 0/4

STEP 4: Generate a binary encryption string that is as long as the message. Use the algorithm X(n+1)=[11*X(n)+7] mod(16) to generate random numbers. Repeating as many times as necessary to generate a string with as many bits as the message. Remember X(0) is the codeword that you and Bob established in STEP 3. Notice that the N value of PRNG (it is here 16) is not the same here as N used for the generation of X(0) (it was 13). You will first write the sequence of pseudo random numbers in decimal, and then in binary.

Pseudo-Random number sequence (in decimal):  (start the sequence with X(1), and leave 1 space between each decimal number; only write as many decimal numbers as you will need for the encryption string--think ahead)

 Tries 0/4

Now, translate each of the decimal digits into a 4-bit binary sequence and combine them to form the encryption string. Why 4 bits?

Encryption string (in binary):  (start the sequence with X(1), no spaces, and leave out any unecessary bits at the end; you only need 30 bits, the length of the message to encrypt)

 Tries 0/4

STEP 5: Encrypt the message with the exclusive-or operation � this is the message we will be sending to Bob.

Encrypted message in binary:  (use 30 bits and do not put spaces between binary digits)
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}