Five experimental reports of Java experiment

Source: Internet
Author: User

First, the contents of the experiment

CMP Transport and encryption and decryption

Pair programming, one-person server, one-person client, the server sends an RSA encrypted key to the client and ciphertext encrypted with the key (using the DES algorithm), the client is responsible for receiving the encrypted key and ciphertext, and decrypt the plaintext.

Second, the experimental process

1. First run the textbook on the TCP code, one-person server, one-person client.

2. Download the decryption code, compile the running code first, one person encrypts one person to decrypt.

3. integrated code, one person encrypted after the tcp aes des aes or des encryption key key send, using the server's public key encryption, public key algorithm with rsa or dh The integrity of sending information is verified using the MD5 or sha3

4. using the lab building git service managed code

5. Complete 3 after the teacher check, write blog.

In this pair programming, I am responsible for the client, decryption sent over the ciphertext, the specific experimental process is as follows:

1. RSA -encrypted key sent by the receiving server

2. Decrypt the RSA public key to get the original key.

3. Receive the ciphertext sent by the server.

4. Decrypt ciphertext using a key

5. Finally, the result of decryption is obtained.

Third, the problems encountered and solutions

1. Run The Times error: The Keys.txt file could not be found. Workaround: Place the Keys.txt file outside the SRC folder.

2. Connection failure due to mismatched port number and IP address

Iv. Summary and impressions of the experiment

This experiment is very difficult, because it is pair programming, my teammates 20135203 Zi Yue responsible for the server, send encrypted files. And I'm in charge of the client, receiving and decrypting the file. In this experiment, we used

Out-of-the-box des and RSA algorithms, but because the source and location of the encryption key is not fully understood since the beginning of the program, the program is always running in error. And then we tuned our IP.

Address and port number, and the location of the Keys.txt file, we finally came to the ideal result. This is the last Java experiment of the semester, and I've deepened my understanding of Java programming through hands-on experimentation,

Also aware of the need to continue to strive for continuous improvement. Finally, thank Lou teacher for his meticulous teaching!

V. Pair programming team's blog address: http://www.cnblogs.com/July0207/

Five experimental reports of Java experiment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.