Class that handles encryption algorithms
Cipherer::Cipherer (LogFile * ciphererLogFile) Cipherer constructor | |
Err | Cipherer::DecryptBlockWithPrivateKey (GMessage *gmPrivateKey, char *dataIn, Size dataInLen, char **dataOut, Size *dataOutLen) Decrypts one PKCS1 block by private key |
Err | Cipherer::DecryptBlockWithPublicKey (GMessage *gmPublicKey, char *dataIn, Size dataInLen, char **dataOut, Size *dataOutLen) Decrypts one PKCS1 block by public key |
Err | Cipherer::DecryptKeyWithPrivateKey (GMessage *privKey, MsgField *eSymKey, GMessage **pSymKey) Decrypts symetric key with private key |
Err | Cipherer::DecryptWithPrivateKey (GMessage * privateKey, MsgField * eData, MsgField ** pData) Decrypts data with private key |
Err | Cipherer::DecryptWithPublicKey (GMessage * publicKey, MsgField * eData, MsgField ** pData) Decrypts data with public key |
Err | Cipherer::DecryptWithSymetricKey (GMessage * symKey, MsgField * eData, MsgField ** dData) Decrypt data using symetric key |
Err | Cipherer::DecryptWithSymetricKeys (GMessage * symKeys, MsgField * eData, MsgField ** dData) Decrypt multiple encrypted data using symetric keys |
Err | Cipherer::EncryptBlockWithPrivateKey (GMessage *gmPrivateKey, char *dataIn, Size dataInLen, char **dataOut, Size *dataOutLen) Encrypts one PKCS1 block by private key |
Err | Cipherer::EncryptBlockWithPublicKey (GMessage *gmPublicKey, char *dataIn, Size dataInLen, char **dataOut, Size *dataOutLen) Encrypts one PKCS1 block by public key |
Err | Cipherer::EncryptKeyWithPublicKey (GMessage *pubKey, GMessage *pSymKey, MsgField **eSymKey) Encrypts symetric key with asymetric |
Err | Cipherer::EncryptWithPrivateKey (GMessage * privateKey, MsgField * pData, MsgField ** eData) Encrypts data with private key |
Err | Cipherer::EncryptWithPublicKey (GMessage * publicKey, MsgField * pData, MsgField ** eData) Encrypt data with public key |
Err | Cipherer::EncryptWithSymetricKey (GMessage * symKey, MsgField * pData, MsgField ** eData) Encrypt data using symetric key |
Err | Cipherer::EncryptWithSymetricKeys (GMessage * symKeys, MsgField * pData, MsgField ** eData, int useAlsoKeyOne) Encrypt data using multiple symetric keys |
GMessage* | Cipherer::GenerateAsymetricKey (GMessage *parameters = NULL) Generate asymetric key pair |
char unsigned | Cipherer::GenerateRandomByte () Very simple method for generation of one byte |
GMessage* | Cipherer::GenerateSymetricKey (GMessage *parameters = NULL) Generate symetric key |
Err | Cipherer::MessageDigest (MsgField *dataToDigest, MsgField **dig, GMessage *parameters = NULL) Creates a message digest over given data |
Err | Cipherer::OpenSealed (GMessage *privateKeyInfo, GMessage *publicKeyInfo, MsgField *dataIn, MsgField **dataOut) Opens sealed data |
Err | Cipherer::ProcessWithSymetricKey (GMessage * symKey, MsgField * mfDataIn, MsgField ** mfDataOut, int actionFlag) Generic method for symetric procession |
Err | Cipherer::ProcessWithSymetricKey_RawVersion (GMessage *symKey, char *dataIn, Size dataInLen, char **dataOut, Size *dataOutLen, int actionFlag) Generic method for symetric procession |
GMessage* | Cipherer::ReturnGMsgFullOfSymKeys (Size hopCount, GMessage *parameters = NULL) Returns GMessage full of symetric keys |
Err | Cipherer::Seal (GMessage *privateKeyInfo, GMessage *publicKeyInfo, MsgField *dataIn, MsgField **dataOut, GMessage *parameters = NULL) Seals given data |
Err | Cipherer::Sign (GMessage *privKeyGM, MsgField *dataToSign, MsgField **sig, GMessage *parameters = NULL) Signs given data |
Err | Cipherer::VerifySignature (GMessage *pubKeyGM, MsgField *dataToVerify, MsgField *sig, GMessage *parameters = NULL) Verifies signed data |
Cipherer::~Cipherer () Cipherer destructor |
methods
|
methods
|
attributes
Class that handles encryption algorithms. It implements various algorithms like DES, RSA, MD5 ... All the data passed to it should be in a message field (MsgField). The data returned is also a message field. (data + length)
Uses auxiliary method ProcessWithSymetricKey() defined in another
module, in RSAEuro decrypting with DES is not the same as encrypting.
Currently we use 512 bits long modulus, so we can have symetric key's
gMessages 64 bytes long (ie. gMessage converted to an octet stream can
be maximally 64 bytes in length).
eData is encoded octet-stream createt from gMessage, ie. the whole
gMessage is saved to an octet-stream, encoded and then BytesMsgField is
initialized from it.
Uses auxiliary method ProcessWithSymetricKey() defined in another
module, in RSAEuro decrypting with DES is not the same as encrypting.
dataIn - Input data octet stream.
dataInLen - Length of input data octet stream.
dataOut - Output data octet stream.
dataOutLen - Length of output data octet stream.
dataIn - Input data octet stream.
dataInLen - Length of input data octet stream.
dataOut - Output data octet stream.
dataOutLen - Length of output data octet stream.
eSymKey - Symetric key to process.
pSymKey - Decrypted symetric key to process.
eData - Encrypted data to process.
pData - Processed data.
eData - Encrypted data to process.
pData - Processed data.
eData - Encrypted data
pData - Plain data to process.
eData - Encrypted data
pData - Plain data to process.
dataIn - Input data octet stream.
dataInLen - Length of input data octet stream.
dataOut - Output data octet stream.
dataOutLen - Length of output data octet stream.
dataIn - Input data octet stream.
dataInLen - Length of input data octet stream.
dataOut - Output data octet stream.
dataOutLen - Length of output data octet stream.
pSymKey - Symetric key to process.
eSymKey - Encrypted symetric key to process.
pData - Plain data to process.
eData - Processed data.
pData - Plain data to process.
eData - Encrypted data.
pData - Plain data.
eData - Encrypted data to process.
GM_PUBLIC_KEY_INFO
GM_PUBLIC_KEY - native structure from RSAEuro
GM_ASYMETRIC_CIPHER_TYPE - ie. "RSA"
GM_ASYMETRIC_CIPHER_VERSION - obsolete, still supported, not used
GM_PRIVATE_KEY_INFO
GM_PRIVATE_KEY - native structure from RSAEuro
GM_ASYMETRIC_CIPHER_TYPE - ie. "RSA"
GM_ASYMETRIC_CIPHER_VERSION - obsolete, still supported, not used
GM_SYMETRIC_KEY - ie. 8 random bytes of DES key
GM_INITIALIZATION_VECTOR - ie. 8 random bytes of DES iv
GM_SYMETRIC_CIPHER_TYPE - ie. "DES" by default
dig - Created digest.
parameters - Parameters - which digest to use.
publicKeyInfo - Public key used to data verification.
dataIn - Data to process.
dataOut - Processed data.
mfDataIn - Input data in a MsgField.
mfDataOut - Output data in a MsgField.
dataIn - Input data stream.
dataInLen - Input data stream length.
dataOut - Output data stream.
dataOutLen - Output data stream length.
GM_SYMETRIC_KEY_COUNT
GM_SYMETRIC_KEY_INFO_1
...
...
GM_SYMETRIC_KEY_INFO_"hopCount"
parameters - What types of keys do we need.
dataToSign - Data to sign.
sig - Created signature.
parameters - Parameters - which algorithms to use.
dataToSign - Data to sign.
sig - Created signature.
parameters - Parameters - which algorithms to use.
dataToVerify - Data to verify.
sig - Given signature.
parameters - Parameters - which algorithms to use.
alphabetic index hierarchy of classes
generated by doc++