Mistake on this page? Email us
Data Structures | Macros | Typedefs
sec_api.h File Reference

AES and random number security service API. More...

#include "wsf_types.h"
Include dependency graph for sec_api.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  secAes_t
 AES Security callback parameters structure. More...
 
struct  secCmacMsg_t
 CMAC Security callback parameters structure. More...
 
struct  secCcmEncMsg_t
 CCM-Mode encrypt callback parameters structure. More...
 
struct  secCcmDecMsg_t
 CCM-Mode decrypt and authenticate callback parameters structure. More...
 
union  secMsg_t
 Generic security callback parameters structure. More...
 
struct  secEccKey_t
 ECC Security public/private key pair. More...
 
struct  secEccSharedSec_t
 ECC security DH Key shared secret. More...
 
struct  secEccMsg_t
 ECC Security callback parameters structure. More...
 

Macros

#define SEC_CMAC_KEY_LEN   16
 CMAC algorithm key length.
 
#define SEC_CMAC_HASH_LEN   16
 CMAC algorithm result length.
 
#define SEC_ECC_KEY_LEN   32
 ECC algorithm key length.
 
#define SEC_TOKEN_INVALID   0xFF
 Invalid AES Token.
 
CCM-Mode algorithm lengths
#define SEC_CCM_KEY_LEN   16
 
#define SEC_CCM_MAX_ADDITIONAL_LEN   ((1<<16) - (1<<8))
 
#define SEC_CCM_L   2
 
#define SEC_CCM_NONCE_LEN   (15-SEC_CCM_L)
 

Typedefs

typedef void(* SecBlkEncFunc_t) (uint8_t *pKey, uint8_t *pMessage, void *pParam)
 Block encryption function.
 

Functions

Security Initialization Functions
void SecInit (void)
 Initialize the security service. This function should only be called once upon system initialization. More...
 
void SecRandInit (void)
 Initialize the random number service. This function should only be called once upon system initialization. More...
 
void SecAesInit (void)
 Initialize the AES service. This function should only be called once upon system initialization. More...
 
void SecAesRevInit (void)
 Initialize the AES (reverse) service. This function should only be called once upon system initialization. More...
 
void SecCmacInit (void)
 Called to initialize CMAC security. This function should only be called once upon system initialization. More...
 
void SecCcmInit (void)
 Called to initialize CCM security. More...
 
void SecEccInit (void)
 Called to initialize ECC security. This function should only be called once upon system initialization. More...
 
Security AES, CMAC and CCM Functions
uint8_t SecAes (uint8_t *pKey, uint8_t *pPlaintext, wsfHandlerId_t handlerId, uint16_t param, uint8_t event)
 Execute an AES calculation. When the calculation completes, a WSF message will be sent to the specified handler. This function returns a token value that the client can use to match calls to this function with messages. More...
 
uint8_t SecAesRev (uint8_t *pKey, uint8_t *pPlaintext, wsfHandlerId_t handlerId, uint16_t param, uint8_t event)
 Execute an AES calculation. When the calculation completes, a WSF message will be sent to the specified handler. This function returns a token value that the client can use to match calls to this function with messages. Note this version reverses the key and plaintext bytes. More...
 
bool_t SecCmac (const uint8_t *pKey, uint8_t *pPlaintext, uint16_t textLen, wsfHandlerId_t handlerId, uint16_t param, uint8_t event)
 Execute the CMAC algorithm. More...
 
bool_t SecCcmEnc (const uint8_t *pKey, uint8_t *pNonce, uint8_t *pPlainText, uint16_t textLen, uint8_t *pClear, uint16_t clearLen, uint8_t micLen, uint8_t *pResult, wsfHandlerId_t handlerId, uint16_t param, uint8_t event)
 Execute the CCM-Mode encryption algorithm. More...
 
bool_t SecCcmDec (const uint8_t *pKey, uint8_t *pNonce, uint8_t *pCypherText, uint16_t textLen, uint8_t *pClear, uint16_t clearLen, uint8_t *pMic, uint8_t micLen, uint8_t *pResult, wsfHandlerId_t handlerId, uint16_t param, uint8_t event)
 Execute the CCM-Mode verify and decrypt algorithm. More...
 
Security ECC Functions
bool_t SecEccGenKey (wsfHandlerId_t handlerId, uint16_t param, uint8_t event)
 Generate an ECC key. More...
 
bool_t SecEccGenSharedSecret (secEccKey_t *pKey, wsfHandlerId_t handlerId, uint16_t param, uint8_t event)
 Generate an ECC key. More...
 
Security Random Number Generator Functions
void SecRand (uint8_t *pRand, uint8_t randLen)
 This function returns up to 16 bytes of random data to a buffer provided by the client. More...
 

Detailed Description

AES and random number security service API.

Copyright (c) 2010-2019 Arm Ltd. All Rights Reserved. Arm Ltd. confidential and proprietary.

IMPORTANT. Your use of this file is governed by a Software License Agreement ("Agreement") that must be accepted in order to download or otherwise receive a copy of this file. You may not use or copy this file for any purpose other than as described in the Agreement. If you do not agree to all of the terms of the Agreement do not use this file and delete all copies in your possession or control; if you do not have a copy of the Agreement, you must contact Arm Ltd. prior to any use, copying or further distribution of this software.

Definition in file sec_api.h.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.