This program demonstrates the Diffie-Hellman key exchange algorithm by having Alice and Bob generate public keys from private keys and an agreed upon base number and prime. Alice's private key is 4 and her public key is the base to the power of her private key modulo the prime. Bob's private key is 3 and his public key is calculated the same way. Their shared secret key is then generated by raising the other person's public key to their own private key modulo the prime.
This program demonstrates the Diffie-Hellman key exchange algorithm by having Alice and Bob generate public keys from private keys and an agreed upon base number and prime. Alice's private key is 4 and her public key is the base to the power of her private key modulo the prime. Bob's private key is 3 and his public key is calculated the same way. Their shared secret key is then generated by raising the other person's public key to their own private key modulo the prime.
This program demonstrates the Diffie-Hellman key exchange algorithm by having Alice and Bob generate public keys from private keys and an agreed upon base number and prime. Alice's private key is 4 and her public key is the base to the power of her private key modulo the prime. Bob's private key is 3 and his public key is calculated the same way. Their shared secret key is then generated by raising the other person's public key to their own private key modulo the prime.