12 #ifndef P6DHKEYEXCHANGE_H__
13 #define P6DHKEYEXCHANGE_H__ 1
362 #define IF_p6IDHKeyExchange {0x8257a87c,0xb44d,0x453c,{0xb2,0x8b,0x28,0xd2,0x1a,0x8e,0x9a,0xf6}}
365 #define COMP_p6DHKeyExchange {0x6023d47d,0x767b,0x42b8,{0x94,0xb2,0x6d,0x12,0x32,0x15,0xe8,0x54}}
virtual P6R::P6ERR checkPrime()=0
Is the prime that was set via a call to the genDHKeyPair() method safe and have a valid generator...
virtual P6R::P6ERR initialize(P6DHKEXFLAGS flags)=0
Sets up the object to run properly.
virtual P6R::P6ERR generatePrime(P6UINT32 primeLength, P6UINT32 generator, p6IRandom *pRandom)=0
Generate a prime to be used in a Diffie-Hellman algorithm of prime length in bits.
virtual P6R::P6ERR loadPrivateKey(P6UCHAR *pBuffer, P6UINT32 cBuffer)=0
This method loads the binary data for a Diffie-Hellman (DH) private key.
virtual P6R::P6ERR getPrime(P6UCHAR *pBuffer, P6UINT32 cBuffer, P6UINT32 *pWritten)=0
This method retrieves the binary prime value set by the call to genDHKeyPair().
P6UINT32 P6DHKEXFLAGS
P6DHKEXFLAGS.
[p6]COM Cryptographic Random Number Generator.
The base interface all [p6]COM components must derive from and implement.
P6DHGROUP
Defines the built-in primes used to generate keys.
virtual P6R::P6ERR calculateSharedSecret(const P6UCHAR *pPublicKey, P6UINT32 keyLength, P6UCHAR *pSharedSecret, P6UINT32 cBuffer, P6UINT32 *pWritten)=0
Key exchange between two parties requires each party to exchange their public keys.
Provides a cryptographically strong random number generator.
virtual P6R::P6ERR loadRawPublicKey(const P6BSTR *pP, const P6BSTR *pG, const P6BSTR *pY)=0
This method loads the standard parts of a Diffie-Hellman (DH) public key from a set of buffers...
virtual P6R::P6ERR getRawPublicKey(P6BSTR *pP, P6BSTR *pG, P6BSTR *pY)=0
This method retrieves the standard parts of a a Diffie-Hellman (DH) public key.
virtual P6R::P6ERR getRawPrivateKey(P6BSTR *pP, P6BSTR *pG, P6BSTR *pX)=0
This method retrieves the standard parts of a a Diffie-Hellman (DH) private key.
This component provides the basics of the key exchange calculates used in the Diffe-Hellman key excha...
virtual P6R::P6ERR loadRawPrivateKey(const P6BSTR *pP, const P6BSTR *pG, const P6BSTR *pX)=0
This method loads the standard parts of a Diffie-Hellman (DH) private key from a set of buffers...
virtual P6R::P6ERR loadPublicKey(P6UCHAR *pBuffer, P6UINT32 cBuffer)=0
This method loads the binary data for a Diffie-Hellman (DH) public key.
virtual P6R::P6ERR getPrivateKey(P6UCHAR *pBuffer, P6UINT32 cBuffer, P6UINT32 *pWritten)=0
This method retrieves the binary key data for Diffie-Hellman generated private key.
const P6DHKEXFLAGS P6DHKEX_TRACEON
virtual P6R::P6ERR genDHKeyPairByBinary(P6BSTR prime, P6BSTR generator)=0
Generates the public - private Diffie-Hellman key pair based on a passed in prime.
const P6DHKEXFLAGS P6DHKEX_NOFLAGS
virtual P6R::P6ERR genDHKeyPair(P6DHGROUP keyType, P6CHAR *pPrime, P6UINT32 generator)=0
Generates the public - private Diffie-Hellman key pair based on the selected built in primes...
virtual P6R::P6ERR getPublicKey(P6UCHAR *pBuffer, P6UINT32 cBuffer, P6UINT32 *pWritten)=0
This method retrieves the binary key data for Diffie-Hellman generated public key.
char P6CHAR
Narrow character type.