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