Computer Science, Cryptography.
Bob can generate the secret key using the following technique: Diffie-Hellman Exchange Alice and Bob both choose numbers a and b that are less than the large prime Y: Alice and Bob now calculate P to the power of their numbers and work out the modulo of Y. Alice stores the result in a variable