The second assignment in the Stavanger University “Cryptography and Network Security” course was slightly harder, especially because during the generation of the key we have to play with huge numbers. I developed the application in Java and used the BigInteger class to handle these huge numbers.
The program works like that:
1. First, you have to generate your own public and private keys and you save the public key in a file (.pk extension)
2. Then, type your message and sign it, then save it in a file ( .mes extension)
3. The last step (the most important) is the part where you check if the message loaded really comes from the official writter. So you have to load his public key, load the message and then press check.
Here is a screenshot of the application:
For information, I have implemented the digital signature algorithm with a 1024 bits long p and a 160 bits long q (for people who knows what the DSA algorithm is all about)
I use a hash function made by myself. You can find everything in the code at the end of this post.
And you can download the whole project (code + exec + report) here : > Download <