Mixes for Privacy and Anonymity in the Internet
Public Member Functions | Protected Attributes | Private Attributes | List of all members
CASymCipherGCM Class Reference

This class could be used for encryption/decryption of data (streams) with AES using 128bit GCM mode. More...

Inheritance diagram for CASymCipherGCM:
CALockAble

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

CAMutexm_pcsEnc
 
CAMutexm_pcsDec
 
gcm_ctx_64k * m_pGCMCtxEnc
 
gcm_ctx_64k * m_pGCMCtxDec
 
UINT32 m_nEncMsgCounter
 
UINT32m_pEncMsgIV
 
UINT32 m_nDecMsgCounter
 
UINT32m_pDecMsgIV
 

Additional Inherited Members

- Protected Member Functions inherited from CALockAble
SINT32 waitForDestroy ()
 If called checks if the reference counter equals zero. More...
 

Detailed Description

This class could be used for encryption/decryption of data (streams) with AES using 128bit GCM mode.

Constructor & Destructor Documentation

◆ CASymCipherGCM()

CASymCipherGCM::CASymCipherGCM ( )

◆ ~CASymCipherGCM()

CASymCipherGCM::~CASymCipherGCM ( )

Member Function Documentation

◆ decryptMessage()

SINT32 CASymCipherGCM::decryptMessage ( const UINT8 in,
UINT32  inlen,
UINT8 out,
bool  integrityCheck 
)

◆ encryptMessage()

SINT32 CASymCipherGCM::encryptMessage ( const UINT8 in,
UINT32  inlen,
UINT8 out 
)

◆ isKeyValid()

bool CASymCipherGCM::isKeyValid ( )

References m_bKeySet.

◆ setGCMKeys()

void CASymCipherGCM::setGCMKeys ( UINT8 keyRecv,
UINT8 keySend 
)

Member Data Documentation

◆ m_bKeySet

bool CASymCipherGCM::m_bKeySet
protected

Referenced by CASymCipherGCM(), and isKeyValid().

◆ m_nDecMsgCounter

UINT32 CASymCipherGCM::m_nDecMsgCounter
private

◆ m_nEncMsgCounter

UINT32 CASymCipherGCM::m_nEncMsgCounter
private

◆ m_pcsDec

CAMutex* CASymCipherGCM::m_pcsDec
private

Referenced by CASymCipherGCM(), and ~CASymCipherGCM().

◆ m_pcsEnc

CAMutex* CASymCipherGCM::m_pcsEnc
private

Referenced by CASymCipherGCM(), and ~CASymCipherGCM().

◆ m_pDecMsgIV

UINT32* CASymCipherGCM::m_pDecMsgIV
private

◆ m_pEncMsgIV

UINT32* CASymCipherGCM::m_pEncMsgIV
private

◆ m_pGCMCtxDec

gcm_ctx_64k* CASymCipherGCM::m_pGCMCtxDec
private

◆ m_pGCMCtxEnc

gcm_ctx_64k* CASymCipherGCM::m_pGCMCtxEnc
private