Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6genkeys.h
Go to the documentation of this file.
1 
11 #ifndef P6GENKEYS_H__
12 #define P6GENKEYS_H__ 1
13 
14 #include "p6random.h"
15 #include "p6cryptokey.h"
16 
17 namespace P6R {
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
33 const P6GENKEYFLAGS P6GENKEY_NOFLAGS = 0x00000000;
34 const P6GENKEYFLAGS P6GENKEY_TRACEON = 0x00000001;
35 
36 
42 interface p6IGenKeys : public p6ICom
43 {
59  P6COMMETHOD initialize( P6GENKEYFLAGS flags, p6IRandom* pRandom ) = 0;
60 
80  P6COMMETHOD genDSAKeyPair( P6R::p6ICryptoKey **ppPubKey, P6R::p6ICryptoKey **ppPrvKey, P6UINT32 keySize ) = 0;
81 
100  P6COMMETHOD genRSAKeyPair( P6R::p6ICryptoKey **ppPubKey, P6R::p6ICryptoKey **ppPrvKey, P6UINT32 keySize ) = 0;
101 
122  P6COMMETHOD genSymmetricKeyRaw( P6UCHAR* pKeyBuffer, P6INT32 cKeyBuffer, P6UINT32 keySize, P6BOOL bReseed ) = 0;
123 
145  P6COMMETHOD genSymmetricKey( P6R::p6ICryptoKey **ppKey, P6UINT32 keySize, P6BOOL bReseed ) = 0;
146 
166 
190  P6COMMETHOD localizeSnmpKey( P6R::p6ICryptoKey* pInKey,P6R::p6ICryptoKey** ppOutKey, const P6CHAR* pEngineID, P6UINT32 idSize, p6IEntropySource* pEntropy ) = 0;
191 };
192 
193 // {18150F93-5C77-426b-9C47-671203BC808C}
194 #define IF_p6IGenKeys {0x18150f93,0x5c77,0x426b,{0x9c,0x47,0x67,0x12,0x3,0xbc,0x80,0x8c}}
195 
196 // {2F884654-A993-4901-97C3-8881BFA15F9C}
197 #define COMP_p6GenKeys {0x2f884654,0xa993,0x4901,{0x97,0xc3,0x88,0x81,0xbf,0xa1,0x5f,0x9c}}
198 
199 #ifdef __cplusplus
200 }
201 #endif
202 
203 } // namespace
204 
205 
206 #endif
207 
208 
virtual P6R::P6ERR genSymmetricKeyRaw(P6UCHAR *pKeyBuffer, P6INT32 cKeyBuffer, P6UINT32 keySize, P6BOOL bReseed)=0
Symetric keys are used for the bulk of encrypting data since PKI encryption is slow.
virtual P6R::P6ERR genSymmetricKey(P6R::p6ICryptoKey **ppKey, P6UINT32 keySize, P6BOOL bReseed)=0
Symetric keys are used for the bulk of encrypting data since PKI encryption is slow.
const P6GENKEYFLAGS P6GENKEY_TRACEON
Definition: p6genkeys.h:34
unsigned char P6UCHAR
Definition: p6types.h:74
This interface provides key metadata infrormation and key access.
Definition: p6cryptokey.h:787
unsigned int P6UINT32
Definition: p6types.h:40
bool P6BOOL
Boolean type.
Definition: p6types.h:101
[p6]COM Cryptographic Random Number Generator.
virtual P6R::P6ERR genSymmetricKeyFromData(P6R::p6ICryptoKey **ppKey, P6R::P6CHAR *pData, P6R::P6UINT32 cData)=0
This method allows the creation of a symmetric key from existing data supplied by the caller...
P6UINT32 P6GENKEYFLAGS
P6GENKEYFLAGS.
Definition: p6genkeys.h:32
virtual P6R::P6ERR localizeSnmpKey(P6R::p6ICryptoKey *pInKey, P6R::p6ICryptoKey **ppOutKey, const P6CHAR *pEngineID, P6UINT32 idSize, p6IEntropySource *pEntropy)=0
Takes a symmetric key and "localizes" it with the byte sequence pointed to by "pEngineID".
int P6INT32
Definition: p6types.h:41
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:96
This interface provides key generation methods for all p6Crypto supported ciphers.
Definition: p6genkeys.h:42
Provides a cryptographically strong random number generator.
Definition: p6random.h:70
virtual P6R::P6ERR genRSAKeyPair(P6R::p6ICryptoKey **ppPubKey, P6R::p6ICryptoKey **ppPrvKey, P6UINT32 keySize)=0
RSA Algorithm Generate a public - private RSA key pair and save them into the named files in PEM form...
This is a plugin interface for the customer of the ICrypto interface to enhance the built in entropy ...
Definition: p6entropy.h:58
const P6GENKEYFLAGS P6GENKEY_NOFLAGS
Definition: p6genkeys.h:33
virtual P6R::P6ERR genDSAKeyPair(P6R::p6ICryptoKey **ppPubKey, P6R::p6ICryptoKey **ppPrvKey, P6UINT32 keySize)=0
Digital Signature Algorithm (DSA) – Public Key Cryptography Generate a public and private DSA key pai...
#define P6COMMETHOD
Definition: p6types.h:872
virtual P6R::P6ERR initialize(P6GENKEYFLAGS flags, p6IRandom *pRandom)=0
Sets up the object to run properly.
char P6CHAR
Narrow character type.
Definition: p6types.h:71
P6R Cryptographic key interface definitions.