HTW Berlin
Fachbereich 4
Internationaler Studiengang
Internationale Medieninformatik (Bachelor)
Aktuelle Themen: Cryptography
Winter Term 2015/16
Lab 1: XOR & GCD
The one-time pad uses XOR with a random key for encryption. It is a symmetric encryption method, that means that both parties need a copy of the same key.
Produce two copies of a one-time pad with 80 random binary digits. Give one copy to a partner A, and take a one-time pad from another partner B.
Make up a plaintext secret message that contains 10 letters. Encode these letters in ASCII (meaning that you now have 80 binary digits).
Now use one copy of your one-time pad to encode your plaintext using XOR on every binary digit. Write the ciphertext on another piece of paper. Give your partner A the ciphertext.
When B gives you a ciphertext, use their one-time pad to decipher the message.
Compare your results with B, and compare what A calculated with your original message. Report on what happens.
Determine the last two decimal digits of the number 2 ^ 1000!
Use the extended Euclidian Algorithm to calculate the greatest common divisor of 1309 and 612 by hand. Document your work.
Solve for x:
612x ≡ 85 mod 1309
Document your work.
Everyone needs to write their own report, as you will have had two different partners. The report is due the evening before your next lecture at 22.00!
This material is jointly prepared by Dr. Hermann Thiel and Prof. Dr. Debora Weber-Wulff. Some of the material may come from other sources and is denoted by the copyright notices on the individual pages.