5. CMOX_CHACHAPOLY ¶
5.1. ChaCha20-Poly1305 public ¶
- group CMOX_CHACHAPOLY_PUBLIC_CONSTANTS
-
constants
Variables
-
const
cmox_chachapoly_impl_t
CMOX_CHACHAPOLY_ENC
¶
-
Implementation of ChaCha20-Poly1305 encryption (Defined internally).
-
const
cmox_chachapoly_impl_t
CMOX_CHACHAPOLY_DEC
¶
-
Implementation of ChaCha20-Poly1305 decryption (Defined internally).
-
const
cmox_chachapoly_impl_t
CMOX_CHACHAPOLY_ENC
¶
5.2. ChaCha20-Poly1305 public method ¶
- group CMOX_CHACHAPOLY_PUBLIC_METHODS
-
prototypes
Functions
-
cmox_cipher_handle_t
*
cmox_chachapoly_construct
(
cmox_chachapoly_handle_t
*
P_pThis
,
cmox_chachapoly_impl_t
P_impl
)
¶
-
ChaCha20-Poly1305 constructor.
The function is used for specifying if the algorithm will be used for encryption or decryption.
- Parameters :
-
P_pThis – Pointer to the ChaCha20-Poly1305 handle to initialize
P_impl – Constant that specifies the implementation to use. This parameter can be one of the following values:
CMOX_CHACHAPOLY_ENC
CMOX_CHACHAPOLY_DEC
- Returns :
-
cmox_cipher_handle_t* Pointer to a general cipher handle. This will be used by the general purpose cipher functions in order to perform the algorithm
-
cmox_cipher_handle_t
*
cmox_chachapoly_construct
(
cmox_chachapoly_handle_t
*
P_pThis
,
cmox_chachapoly_impl_t
P_impl
)
¶
5.3. ChaCha20-Poly1305 public types ¶
- group CMOX_CHACHAPOLY_PUBLIC_TYPES
-
Typedefs
-
typedef
const
struct
cmox_chachapoly_implStruct_st
*
cmox_chachapoly_impl_t
¶
-
ChaCha20-Poly1305 mode implementation.
This type specifies if the algorithm will be used for encryption or decryption. This type is defined as a pointer to a structure, that contains the functions needed for the specific implementation, defined in the library internally
-
struct
cmox_chachapoly_handle_t
¶
-
#include <cmox_chachapoly.h>
ChaCha20-Poly1305 handle structure definition.
Public Members
-
cmox_cipher_handle_t
super
¶
-
General cipher handle
-
size_t
mAadLen
¶
-
Size of the processed AAD
-
size_t
mCipherLen
¶
-
Size of the processed CipherText
-
uint32_t
rValue
[
5
]
¶
-
Internal: value of r
-
uint32_t
hValue
[
5
]
¶
-
Internal: value of h
-
uint32_t
pad
[
4
]
¶
-
Internal: value of Poly nonce
-
uint32_t
internalState
[
16
]
¶
-
Internal: ChaCha Internal State
-
cmox_cipher_handle_t
super
¶
-
typedef
const
struct
cmox_chachapoly_implStruct_st
*
cmox_chachapoly_impl_t
¶