LAB: Diffie Hellman and RSA by hand

The people at your computer should partner with the people at a nearby computer. One computer will be Alice and the other will be Bob. You can send your messages via Slack direct message or sliding pieces of paper across the table or whatever works for you.

To do the computations you need to do, I recommend running python or python3 in interactive mode (just type "python3" at the command line):

$ python3 ... >>> 13**27 % 59 37 >>>

Alternatively, you can use "python3 -c" to run arbitrary code, like this:

python3 -c "print(13**27 % 59)"

Fortunately, python's integer arithmetic supports arbitrary integer sizes, so you don't need to worry about your integers getting too big. WARNING: Exponentiation in python is done with **, not ^ (which is bitwise XOR).

Diffie Hellman

RSA

Observations about this use of RSA




Your Carleton user name, lower case:

For your Diffie Hellman exercise, give me the 4-tuple (X, Y, Alice's shared secret, Bob's shared secret)

Give me Alice's RSA key information: (p, q, n, e, d)

Give me Bob's RSA key information: (p, q, n, e, d)

What was Alice's plaintext message for Bob?

What ciphertext message did Alice send to Bob?

What was Bob's plaintext message for Alice?

What ciphertext message did Bob send to Alice?

How did it go? Were Alice and Bob able to decrypt each other's messages?