HTW Berlin
Fachbereich 4
Internationaler Studiengang
Internationale Medieninformatik (Bachelor)
Aktuelle Themen: Cryptography
Winter Term 2024/25
Lab
6: Symmetric Key Programming
As a preparation for the lab,
please download the example code from David Hook, Beginning
Cryptography with Java from Moodle.
The Java
Cryptographic Extension (which implements the Java
Cryptographic Architecture) should be in every default Java
installation. To check that this is so, and to ensure that the
policy files are correct, get the code SimplePolicyTest
from Hook, Chapter 1, and run it. Can you do 64 bit encryption?
192? How many bits are you allowed with the default policy?
Secret Message
In Chapter 2 of Hook there is a nice example SimpleSymmetricExample. Copy this,
compile, run, and report on how it works
Take some paper and make up a key for all the other groups
of two in your lab. Don't forget to remember to whom you
gave which key! Every group gets their own key, otherwise
they can read all your secrets and not just the messages for
them!
Adapt SimpleSymmetricExample
to encode a different message for each group in the lab.
Post a list of these in the Moodle Forum "Secret Message"
for this week!
Download the secret messages from the others and decode
the messages intended for your group.
Describe any problems that occurred with this exercise!
What is the German legal situation
today? How many bits may your key be to be used inside of
Germany? How many if you want to export it to France? Is
anything currently being discussed in France about Crypto? How
about exporting to Pakistan, Iraq, Iran, Qatar, or Saudia
Arabia? How about your favourite country (if not listed above)?
(For the bored) Can you crack any of
the messages for which you do not possess a key?
Note that - unless noted otherwise - you
work in groups of two! The report is due the evening before your
next lecture!
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.