Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

fsl_shw_auth.c File Reference


Detailed Description

This file contains the routines which do the combined encrypt+authentication functions. For now, only AES-CCM is supported.

Definition in file fsl_shw_auth.c.

#include "sahara.h"
#include "adaptor.h"
#include "sf_util.h"

Go to the source code of this file.

Defines

#define CBC_BUF_LEN   4096
#define COMPUTE_NIST_AUTH_LEN_SIZE(l)
#define STORE_NIST_AUTH_LEN(l, p)

Functions

static fsl_shw_return_t add_assoc_preamble (sah_Head_Desc **desc_chain, fsl_shw_uco_t *user_ctx, fsl_shw_acco_t *auth_ctx, int encrypt, const uint8_t *auth_data, uint32_t auth_data_length)
fsl_shw_return_t fsl_shw_auth_decrypt (fsl_shw_uco_t *user_ctx, fsl_shw_acco_t *auth_ctx, fsl_shw_sko_t *cipher_key_info, fsl_shw_sko_t *auth_key_info, uint32_t auth_data_length, const uint8_t *auth_data, uint32_t payload_length, const uint8_t *ct, const uint8_t *auth_value, uint8_t *payload)
 Authenticate and decrypt a (CCM) stream.
fsl_shw_return_t fsl_shw_gen_encrypt (fsl_shw_uco_t *user_ctx, fsl_shw_acco_t *auth_ctx, fsl_shw_sko_t *cipher_key_info, fsl_shw_sko_t *auth_key_info, uint32_t auth_data_length, const uint8_t *auth_data, uint32_t payload_length, const uint8_t *payload, uint8_t *ct, uint8_t *auth_value)
 Generate a (CCM) auth code and encrypt the payload.
static fsl_shw_return_t process_assoc_from_nist_params (sah_Link **link1, uint32_t *data_len, fsl_shw_uco_t *user_ctx, fsl_shw_acco_t *auth_ctx, const uint8_t *auth_data, uint32_t auth_data_length, uint8_t **temp_buf)

Variables

static uint8_t block_zeros [16]
static uint8_t garbage_output [16]


Generated by  Doxygen 1.6.0   Back to index