< previous paste - next paste>
/* * Generate a shared secret: * 1) Generate a random number * 2) Encrypt this number with client's public key * 3) Send the number to the client * * Now the client should: * 1) Decrypt the encrypted number with his private key * 2) Encrypt this number with my public key * 3) Send the encrypted number to me * * Then I will: * 1) Decrypt the number with my private key. * 2) If the number is still the same as the generated * secret, then the client can be trusted. * */
Go to most recent paste.
(c) Copyright 2005-2011 Thomas Damgaard Nielsen.