Java Encryption Technology (v)

Source: Internet
Author: User

Then we analyze the DH encryption algorithm, a cryptographic algorithm based on the key agreement protocol.

Dh

Diffie-hellman algorithm (d-h algorithm), key-consistent protocol. is an idea put forward by founder Diffie and Hellman of the public key cryptography system. Simply put, two users are allowed to exchange information on public media to generate "consistent", sharable keys. In other words, a pair of key (public and private) is produced by party A and party B's key pair (public key, private key) is generated according to party A's public key. As a baseline, the two sides use the same symmetric encryption algorithm to construct the local key (Secretkey) to encrypt the data. Thus, after the local key (Secretkey) algorithm is exchanged, both parties expose their public key, encrypt the data using the other's public key and the private key just generated, and can decrypt the data using the other's public key and their private key. Not only is a party b both sides, can be extended to the multi-party sharing of data communications, so that the network interactive data to complete the security communication! The algorithm derives from China's congruence theorem--The Chinese remainder theorem.

Process Analysis:

1. Party a establishes the key pair, publishes the public key to party B, and retains the private key; The two parties agree on the data encryption algorithm; Party B constructs the key pair through party A's public key, publishes the public key to party a, and retains the private key.

2. Party A uses the private key, party B's public key, the agreement data encryption algorithm constructs the local key, then encrypts the data through the local key, sends to the party B to encrypt the data; Party B uses the private key, party A's public key, the contract data encryption algorithm to build the local key, and then

3. Party B uses the private key, party A's public key, the agreement data encryption algorithm constructs the local key, then encrypts the data through the local key, sends to the party a encrypted data, the party a uses the private key, the party B public key, the contract data encryption algorithm constructs the local key, then decrypts the data

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.