8. CMOX_CTR

8.1. CMOX CTR PUBLIC CONSTANTS

group CMOX_CTR_PUBLIC_CONSTANTS

8.2. CMOX CTR PUBLIC CONSTANTS:CMOX CTR ALGO

group CMOX_CTR_ALGO

Variables

const cmox_cipher_algo_t CMOX_AESSMALL_CTR_ENC_ALGO

Identifier of the CTR encryption using AES (small implementation) for single-call function (Defined internally).

const cmox_cipher_algo_t CMOX_AESSMALL_CTR_DEC_ALGO

Identifier of the CTR decryption using AES (small implementation) for single-call function (Defined internally).

const cmox_cipher_algo_t CMOX_AESFAST_CTR_ENC_ALGO

Identifier of the CTR encryption using AES (fast implementation) for single-call function (Defined internally).

const cmox_cipher_algo_t CMOX_AESFAST_CTR_DEC_ALGO

Identifier of the CTR decryption using AES (fast implementation) for single-call function (Defined internally).

const cmox_cipher_algo_t CMOX_SM4_CTR_ENC_ALGO

Identifier of the CTR encryption using SM4 for single-call function (Defined internally).

const cmox_cipher_algo_t CMOX_SM4_CTR_DEC_ALGO

Identifier of the CTR decryption using SM4 for single-call function (Defined internally).

8.3. CMOX CTR PUBLIC CONSTANTS:CMOX CTR IMPL

group CMOX_CTR_IMPL

Variables

const cmox_ctr_impl_t CMOX_AESFAST_CTR_ENC

Implementation of CTR encryption using AES (fast implementation) (Defined internally).

const cmox_ctr_impl_t CMOX_AESFAST_CTR_DEC

Implementation of CTR decryption using AES (fast implementation) (Defined internally).

const cmox_ctr_impl_t CMOX_AESSMALL_CTR_ENC

Implementation of CTR encryption using AES (small implementation) (Defined internally).

const cmox_ctr_impl_t CMOX_AESSMALL_CTR_DEC

Implementation of CTR decryption using AES (small implementation) (Defined internally).

const cmox_ctr_impl_t CMOX_SM4_CTR_ENC

Implementation of CTR encryption using SM4 (Defined internally).

const cmox_ctr_impl_t CMOX_SM4_CTR_DEC

Implementation of CTR decryption using SM4 (Defined internally).

8.4. CMOX CTR PUBLIC METHODS

group CMOX_CTR_PUBLIC_METHODS

Functions

cmox_cipher_handle_t * cmox_ctr_construct ( cmox_ctr_handle_t * P_pThis , cmox_ctr_impl_t P_impl )

CTR constructor.

The function is used for specifying which block cipher algorithm to use in order to implement the CTR algorithm and if the algorithm will be used for encryption or decryption.

Parameters :
  • P_pThis – Pointer to the CTR handle to initialize

  • P_impl – Constant that specifies the implementation to use. This parameter can be one of the following values:

    • CMOX_AESFAST_CTR_ENC

    • CMOX_AESFAST_CTR_DEC

    • CMOX_AESSMALL_CTR_ENC

    • CMOX_AESSMALL_CTR_DEC

    • CMOX_SM4_CTR_ENC

    • CMOX_SM4_CTR_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

8.5. CMOX CTR PUBLIC TYPES

group CMOX_CTR_PUBLIC_TYPES

Typedefs

typedef const struct cmox_ctr_implStruct_st * cmox_ctr_impl_t

CTR mode implementation.

This type specifies the used block cipher for the CTR 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_ctr_handle_t
#include <cmox_ctr.h>

CTR handle structure definition.