Encapsulates information used in an ECDH key agreement. More...
#include <DwmAuthECDHAgreement.hh>
Public Member Functions | |
| ECDHAgreement () | |
| constructor. More... | |
| const CryptoPP::SecByteBlock & | Public () const |
| Returns a const reference to the public half of our ECDH key. | |
| const CryptoPP::SecByteBlock & | Private () const |
| Returns a const reference to the private half of our ECDH key. | |
| const CryptoPP::SecByteBlock & | TheirPublic () const |
| Returns a const reference to the other side's public key. More... | |
| const CryptoPP::SecByteBlock & | TheirPublic (const CryptoPP::SecByteBlock &theirPub) |
| Saves the other side's public half of their ECDH key. | |
| bool | Agree () |
| Once we have our private and public keys and the other side's public key has been saved with TheirPublic(SecByteBlock &), we can call this function. More... | |
| const CryptoPP::SecByteBlock & | AgreedKey () const |
| If we stored the public half of the other side's ECDH key with TheirPublic(SecByteBlock &) and then called Agree(), we can fetch the agreed shared key with this memner. More... | |
Encapsulates information used in an ECDH key agreement.
This isn't typically used directly but is a helper class for PeerAuthenticator.
| Dwm::Auth::ECDHAgreement::ECDHAgreement | ( | ) |
constructor.
This will create our public and private parts of our ECDH key.
| bool Dwm::Auth::ECDHAgreement::Agree | ( | ) |
Once we have our private and public keys and the other side's public key has been saved with TheirPublic(SecByteBlock &), we can call this function.
If we agree on a shared key, this member returns true and we can fetch the shared key with AgreedKey().
| const CryptoPP::SecByteBlock& Dwm::Auth::ECDHAgreement::AgreedKey | ( | ) | const |
If we stored the public half of the other side's ECDH key with TheirPublic(SecByteBlock &) and then called Agree(), we can fetch the agreed shared key with this memner.
| const CryptoPP::SecByteBlock& Dwm::Auth::ECDHAgreement::TheirPublic | ( | ) | const |
Returns a const reference to the other side's public key.
This will be empty until it is set with TheirPublic(SecByteBlock &), typically after it has been read from a socket.