📄 readme.txt
字号:
This program is based on Java Programming Language, compiled with JDK 1.5.0
The whole program contains eleven *.java files. They are ElGamalKey.java and ElGamalKeyPairGenerator.java to generate ElGamal Key Pair, KeyPairGenerator.java to call the previous method and write to files, ElGamalPrivateKey.java to generate private key, ElGamalPublicKey.java to generate public key, ElGamalSignature.java to sign and verify a message, ElGamalEncryption.java to encrypt and decrypt a message, udp_client and udp_server to send and receive message, MD5.java to hash messsage and a test program in Ekeygen.java.
All the *.java source code files are supposed to integrated into a java project. When running the program, compile the whole project and run the main method in KeyPairGenerate.java first. It will generate two files named "prikey.txt" and "pubkey.txt" in the classes file folder, containing private keys and public keys including user names in front of them. After done this, run udp_client and udp_server to send and receive messages. Only receiver's name and receiver's address is compulsory in this process. Upon doing this, there will be a display of received encrypted message in the udp_server's received message textfield. Click on "Decrypt" and it will display decrypted message in "Decrypted Message" textfiled and verification result in the last textfield.
A lot of effort has been adopted in debugging and modification, but it seems the program doesn't work well all the time. Most of the time udp_server receive random numbers, so decrypted messages are also unexpected numbers. This can be seen in the screen shots included in the assignment PDF file. But the encryption and signature works well without sending out the messages. There is another test main method contains in Ekeygen.java to call all the methods in the project, showing that this problem has nothing to do with ElGamal keys and encryption, decryption, signature, hash and verfication processes. Several screenshots have been embedded in the PDF file to prove this.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -