assh/assh_mac.h header reference

Description  

This header file contains API descriptors for message authentication algorithm modules implemented in the library.

See also macalgos and coremod.

Header inclusion  

Members  

Types  

Functions  

  • const assh_algo_mac_s * assh_algo_mac(const assh_algo_s *algo)
  • assh_status_t assh_algo_mac_by_name(assh_context_s *c, const char *name, size_t name_len, const assh_algo_mac_s **ma, const assh_algo_name_s **namep)
  • assh_status_t assh_algo_mac_by_name_static(const assh_algo_s **table, const char *name, size_t name_len, const assh_algo_mac_s **ma, const assh_algo_name_s **namep)

Constant  

Macros  

Members detail  

const assh_algo_mac_s * assh_algo_mac(const assh_algo_s *algo)  

This function is declared in assh/assh_mac.h source file, line 94.

This function casts and returns the passed pointer if the algorithm class is ASSH_ALGO_MAC. In other cases, NULL is returned.

assh_status_t assh_algo_mac_by_name(assh_context_s *c, const char *name, size_t name_len, const assh_algo_mac_s **ma, const assh_algo_name_s **namep)  

This function is declared in assh/assh_mac.h source file, line 118.

This function finds a registered mac algorithm.

See also assh_algo_by_name.

assh_status_t assh_algo_mac_by_name_static(const assh_algo_s **table, const char *name, size_t name_len, const assh_algo_mac_s **ma, const assh_algo_name_s **namep)  

This function is declared in assh/assh_mac.h source file, line 107.

This function finds a mac algorithm in a NULL terminated array of pointers to algorithm descriptors.

See also assh_algo_by_name_static.

struct assh_algo_mac_s  

This struct is declared in assh/assh_mac.h source file, line 74.

This struct is the mac algorithm descriptor structure. It can be casted to the assh_algo_s type.

See also coremod.

FieldDescription
assh_algo_s algo;
assh_mac_init_t * f_init;
assh_mac_process_t * f_process;
assh_mac_cleanup_t * f_cleanup;
uint16_t ctx_size;Size of the context structure needed to initialize the algorithm.
uint8_t key_size:7;Mac key size in bytes.
assh_bool_t etm:1;This is set if encrypt must be performed before mac
uint8_t mac_size;Authentication tag size.

const assh_algo_mac_s assh_mac_none  

This constant is declared in assh/assh_mac.h source file, line 125.

This constant is a mac algorithm implementation descriptor.

See also macalgos.

#define ASSH_MAC_CLEANUP_FCN(n)  

This macro is for internal use only.

This macro is declared in assh/assh_mac.h source file, line 63.

This macro expands to:

void (n)(struct assh_context_s *c, void *ctx_)

See also assh_mac_cleanup_t.

#define ASSH_MAC_INIT_FCN(n)  

This macro is for internal use only.

This macro is declared in assh/assh_mac.h source file, line 40.

This macro expands to:

ASSH_WARN_UNUSED_RESULT assh_status_t (n)(struct assh_context_s *c,
void *ctx_, const uint8_t *key,
assh_bool_t generate)

See also assh_mac_init_t.

#define ASSH_MAC_PROCESS_FCN(n)  

This macro is for internal use only.

This macro is declared in assh/assh_mac.h source file, line 52.

This macro expands to:

ASSH_WARN_UNUSED_RESULT assh_status_t (n)(void *ctx_,
const uint8_t *data, size_t len,
uint8_t *mac, uint32_t seq)

See also assh_mac_process_t.

typedef void (assh_mac_cleanup_t)(assh_context_s *c, void *ctx_)   

This typedef is for internal use only.

This typedef is declared in assh/assh_mac.h source file, line 68.

This declaration involves expansion of the ASSH_MAC_CLEANUP_FCN macro.

This typedef defines the function type for the cleanup operation of the mac module interface.

typedef assh_status_t (assh_mac_init_t)(assh_context_s *c, void *ctx_, const uint8_t *key, assh_bool_t generate)   

This typedef is for internal use only.

This typedef is declared in assh/assh_mac.h source file, line 50.

This declaration involves expansion of the ASSH_MAC_INIT_FCN macro.

This typedef defines the function type for the mac initialization operation of the mac module interface. The ctx_ argument must points to a buffer allocated in secure memory of size given by assh_algo_mac_s::ctx_size.

typedef assh_status_t (assh_mac_process_t)(void *ctx_, const uint8_t *data, size_t len, uint8_t *mac, uint32_t seq)   

This typedef is for internal use only.

This typedef is declared in assh/assh_mac.h source file, line 60.

This declaration involves expansion of the ASSH_MAC_PROCESS_FCN macro.

This typedef defines the function type for the mac computation operation of the mac module interface.

Valid XHTML 1.0 StrictGenerated by diaxen on Sun Sep 27 13:33:19 2020 using MkDoc