HTW Berlin Medieninformatik

HTW Berlin
Fachbereich 4
Internationaler Studiengang
Internationale Medieninformatik (Bachelor)
Aktuelles - Medien: Kryptographie
Winter Term 2010/11

Lab 1: XOR & GCD


  1. 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.
    1. 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.
    2. Make up a plaintext secret message that contains 10 letters. Encode these letters in ASCII (meaning that you now have 80 binary digits).
    3. 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.
    4. When B gives you a ciphertext, use their one-time pad to decipher the message.
    5. Compare your results with B, and compare what A calculated with your original message. Report on what happens.

  2. Determine the last two decimal digits of the number 2 ^ 1000!
  3. Use the extended Euclidian Algorithm to calculate the greatest common divisor of 1309 and 612 by hand. Document your work.

  4. 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 next Wednesday at 23.00!


Copyright 2010 Dr. Hermann Thiel & Prof. Dr. Debora Weber-Wulff - All rights reserved.
Questions or comments: <weberwu@htw-berlin.de>

This material is jointly prepared by Dr. Hermann Thiel and Prof. Dr. Debora Weber-Wulff. Much of the material comes from other sources and is denoted by the copyright notices on the individual pages