Mixes for Privacy and Anonymity in the Internet
|
This class could be used for encryption/decryption of data (streams) with AES using 128bit GCM mode. More...
Public Member Functions | |
CASymCipherGCM () | |
~CASymCipherGCM () | |
bool | isKeyValid () |
void | setGCMKeys (UINT8 *keyRecv, UINT8 *keySend) |
SINT32 | encryptMessage (const UINT8 *in, UINT32 inlen, UINT8 *out) |
SINT32 | decryptMessage (const UINT8 *in, UINT32 inlen, UINT8 *out, bool integrityCheck) |
Public Member Functions inherited from CALockAble | |
CALockAble () | |
virtual | ~CALockAble () |
SINT32 | lock () |
Locks the lockable object by threadsafe incrementing a reference counter. More... | |
SINT32 | unlock () |
Unlocks the lockable object by threadsafe decrementing a reference counter. More... | |
Protected Attributes | |
bool | m_bKeySet |
Private Attributes | |
CAMutex * | m_pcsEnc |
CAMutex * | m_pcsDec |
gcm_ctx_64k * | m_pGCMCtxEnc |
gcm_ctx_64k * | m_pGCMCtxDec |
UINT32 | m_nEncMsgCounter |
UINT32 * | m_pEncMsgIV |
UINT32 | m_nDecMsgCounter |
UINT32 * | m_pDecMsgIV |
Additional Inherited Members | |
Protected Member Functions inherited from CALockAble | |
SINT32 | waitForDestroy () |
If called checks if the reference counter equals zero. More... | |
This class could be used for encryption/decryption of data (streams) with AES using 128bit GCM mode.
CASymCipherGCM::CASymCipherGCM | ( | ) |
References m_bKeySet, m_nDecMsgCounter, m_nEncMsgCounter, m_pcsDec, m_pcsEnc, m_pDecMsgIV, m_pEncMsgIV, m_pGCMCtxDec, and m_pGCMCtxEnc.
CASymCipherGCM::~CASymCipherGCM | ( | ) |
References m_pcsDec, m_pcsEnc, m_pDecMsgIV, m_pEncMsgIV, m_pGCMCtxDec, m_pGCMCtxEnc, and CALockAble::waitForDestroy().
SINT32 CASymCipherGCM::decryptMessage | ( | const UINT8 * | in, |
UINT32 | inlen, | ||
UINT8 * | out, | ||
bool | integrityCheck | ||
) |
References E_SUCCESS, E_UNKNOWN, m_nDecMsgCounter, m_pDecMsgIV, and m_pGCMCtxDec.
Referenced by CALastMixA::loop().
References E_SUCCESS, m_nEncMsgCounter, m_pEncMsgIV, and m_pGCMCtxEnc.
Referenced by CALastMixA::loop().
bool CASymCipherGCM::isKeyValid | ( | ) |
References m_bKeySet.
References m_nDecMsgCounter, m_nEncMsgCounter, m_pDecMsgIV, m_pEncMsgIV, m_pGCMCtxDec, and m_pGCMCtxEnc.
Referenced by CALastMixA::loop().
|
protected |
Referenced by CASymCipherGCM(), and isKeyValid().
|
private |
Referenced by CASymCipherGCM(), decryptMessage(), and setGCMKeys().
|
private |
Referenced by CASymCipherGCM(), encryptMessage(), and setGCMKeys().
|
private |
Referenced by CASymCipherGCM(), and ~CASymCipherGCM().
|
private |
Referenced by CASymCipherGCM(), and ~CASymCipherGCM().
|
private |
Referenced by CASymCipherGCM(), decryptMessage(), setGCMKeys(), and ~CASymCipherGCM().
|
private |
Referenced by CASymCipherGCM(), encryptMessage(), setGCMKeys(), and ~CASymCipherGCM().
|
private |
Referenced by CASymCipherGCM(), decryptMessage(), setGCMKeys(), and ~CASymCipherGCM().
|
private |
Referenced by CASymCipherGCM(), encryptMessage(), setGCMKeys(), and ~CASymCipherGCM().