4. CMOX_CFB ¶
4.1. CFB single-call algorithms ¶
- group CMOX_CFB_ALGO
-
Variables
-
const
cmox_cipher_algo_t
CMOX_AESSMALL_CFB_ENC_ALGO
¶
-
Identifier of the CFB encryption using AES (small implementation) for single-call function (Defined internally).
-
const
cmox_cipher_algo_t
CMOX_AESSMALL_CFB_DEC_ALGO
¶
-
Identifier of the CFB decryption using AES (small implementation) for single-call function (Defined internally).
-
const
cmox_cipher_algo_t
CMOX_AESFAST_CFB_ENC_ALGO
¶
-
Identifier of the CFB encryption using AES (fast implementation) for single-call function (Defined internally).
-
const
cmox_cipher_algo_t
CMOX_AESFAST_CFB_DEC_ALG
¶
-
Identifier of the CFB decryption using AES (fast implementation) for single-call function (Defined internally).
-
const
cmox_cipher_algo_t
CMOX_SM4_CFB_ENC_ALGO
¶
-
Identifier of the CFB encryption using SM4 for single-call function (Defined internally).
-
const
cmox_cipher_algo_t
CMOX_SM4_CFB_DEC_ALGO
¶
-
Identifier of the CFB decryption using SM4 for single-call function (Defined internally).
-
const
cmox_cipher_algo_t
CMOX_AESSMALL_CFB_ENC_ALGO
¶
4.2. CFB implementations ¶
- group CMOX_CFB_IMPL
-
Variables
-
const
cmox_cfb_impl_t
CMOX_AESFAST_CFB_ENC
¶
-
Implementation of CFB encryption using AES (fast implementation) (Defined internally).
-
const
cmox_cfb_impl_t
CMOX_AESFAST_CFB_DEC
¶
-
Implementation of CFB decryption using AES (fast implementation) (Defined internally).
-
const
cmox_cfb_impl_t
CMOX_AESSMALL_CFB_ENC
¶
-
Implementation of CFB encryption using AES (small implementation) (Defined internally).
-
const
cmox_cfb_impl_t
CMOX_AESSMALL_CFB_DEC
¶
-
Implementation of CFB decryption using AES (small implementation) (Defined internally).
-
const
cmox_cfb_impl_t
CMOX_SM4_CFB_ENC
¶
-
Implementation of CFB encryption using SM4 (Defined internally).
-
const
cmox_cfb_impl_t
CMOX_SM4_CFB_DEC
¶
-
Implementation of CFB decryption using SM4 (Defined internally).
-
const
cmox_cfb_impl_t
CMOX_AESFAST_CFB_ENC
¶
4.3. CFB public method prototypes ¶
- group CMOX_CFB_PUBLIC_METHODS
-
Functions
-
cmox_cipher_handle_t
*
cmox_cfb_construct
(
cmox_cfb_handle_t
*
P_pThis
,
cmox_cfb_impl_t
P_impl
)
¶
-
CFB constructor.
The function is used for specifying which block cipher algorithm to use in order to implement the CFB algorithm and if the algorithm will be used for encryption or decryption.
- Parameters :
-
P_pThis – Pointer to the CFB handle to initialize
P_impl – Constant that specifies the implementation to use. This parameter can be one of the following values:
CMOX_AESFAST_CFB_ENC
CMOX_AESFAST_CFB_DEC
CMOX_AESSMALL_CFB_ENC
CMOX_AESSMALL_CFB_DEC
CMOX_SM4_CFB_ENC
CMOX_SM4_CFB_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_cfb_construct
(
cmox_cfb_handle_t
*
P_pThis
,
cmox_cfb_impl_t
P_impl
)
¶
4.4. CFB public types ¶
- group CMOX_CFB_PUBLIC_TYPES
-
Typedefs
-
typedef
const
struct
cmox_cfb_implStruct_st
*
cmox_cfb_impl_t
¶
-
CFB mode implementation.
This type specifies the used block cipher for the CFB construct and 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_cfb_handle_t
¶
-
#include <cmox_cfb.h>
CFB handle structure definition.
Public Members
-
cmox_cipher_handle_t
super
¶
-
General cipher handle
-
cmox_blockcipher_handle_t
blockCipher
¶
-
Block cipher handle
-
uint32_t
iv
[
CMOX_CIPHER_BLOCK_SIZE
]
¶
-
Buffer containing the Initialization Vector
-
size_t
cfb_blockLen
¶
-
Size of the CFB block. Currently only 16 bytes block supported
-
cmox_cipher_handle_t
super
¶
-
typedef
const
struct
cmox_cfb_implStruct_st
*
cmox_cfb_impl_t
¶