This is a readme file for the cryptography part of the distributed

advertisement
This is a readme file for the cryptography part of the distributed system implementation course.
1. Short explanation for our examples:
Masher: produces a digest code.
SecretWriting: encrypts or decrypts input given as a parameter. It uses a key which it expects to find in
file SecretKey.ser – if it does not find the file it will create a key.
StrongClient – StrongServer: StrongClient contacts StrongServer and sends time and a random number
which are encrypted using the clients private key. StrongServer checks these using the clients public
key. They use the standard keystore files, which you can manage with the standard keytool facility.
Hancock is a program which can be used to digitally sign documents and verify the digital signatures.
It uses the standard keystore files, which you can manage with the standard keytool facility.
SafeTalk consists of files SafeTalk.java, Session.java, Receiver.java and SessionServer.java. SafeTalk
is a talk utility, which authenticates users using private/public key pairs. As a part of the authentication,
both parties send a half of a secret key, which is then used for communication. SafeTalk uses streams
and both “talking” parties create a ciphered input stream and a ciphered output stream. There are some
problems with the implementation, so the version available now (13.4.2000) does not quite work.
2. Diffie-Hellman key agreement
It is possible to agree on a secret key sending public messages using the Diffie-Hellman procedure,
which goes as follows. Suppose that R and M try to agree on th key value.
1.
2.
3.
4.
5.
6.
There must be generally agreed (possibly public) values: a base g and a modulus p, such that for
every value b, 0<b<p, there is some value a such that ga mod p = b.
M chooses a value x, and computes y = gx mod p.
R chooses a value z, and computes w= gz mod p.
M sends R the value y. R, in turn, sends M the value w. These may be sent insecurely.
M calculates kM= wx mod p = gxz mod p.
R calculates kR= yz mod p = gxz mod p = kM.
And that’s it – R and M have agreed on a secret value k. This protocol does not, of course, include any
authentication.
Download