|
AM64x MCU+ SDK
08.01.00
|
|
Go to the documentation of this file.
49 #include <security/crypto.h>
65 #define CRYPTO_SHA_AUTHMODE_NULL (0U)
67 #define CRYPTO_SHA_AUTHMODE_SHA1 (1U)
69 #define CRYPTO_SHA_AUTHMODE_SHA2_224 (2U)
71 #define CRYPTO_SHA_AUTHMODE_SHA2_256 (3U)
73 #define CRYPTO_SHA_AUTHMODE_SHA2_384 (4U)
75 #define CRYPTO_SHA_AUTHMODE_SHA2_512 (5U)
77 #define CRYPTO_SHA_AUTHMODE_HMAC_SHA1 (6U)
79 #define CRYPTO_SHA_AUTHMODE_HMAC_SHA2_224 (7U)
81 #define CRYPTO_SHA_AUTHMODE_HMAC_SHA2_256 (8U)
83 #define CRYPTO_SHA_AUTHMODE_HMAC_SHA2_384 (9U)
85 #define CRYPTO_SHA_AUTHMODE_HMAC_SHA2_512 (10U)
94 #define CRYPTO_HMAC_SHA_SW_MAX_KEYLEN_BYTES (128U)
110 typedef struct Crypto_ShaParams_s
129 typedef int32_t (*
Crypto_hmacShaFxn)(Crypto_ShaContext *ctx,
const uint8_t *input, uint32_t ilen, uint8_t *output);
132 typedef struct Crypto_ShaFxns_s
int32_t Crypto_shaStarts(Crypto_ShaHandle handle)
This function starts a Secure Hash Algorithm (SHA ) checksum calculation.
int32_t Crypto_shaFinish(Crypto_ShaHandle handle, uint8_t *output)
This function finishes the Secure Hash Algorithm (SHA ) operation, and writes the result to the outpu...
int32_t Crypto_shaUpdate(Crypto_ShaHandle handle, const uint8_t *input, uint32_t ilen)
This function feeds an input buffer into an ongoing Secure Hash Algorithm (SHA ) checksum calculation...
Crypto_ShaUpdateFxn updateFxn
Definition: crypto_sha.h:140
Crypto_ShaStartFxn startFxn
Definition: crypto_sha.h:138
int32_t(* Crypto_ShaFinishFxn)(Crypto_ShaContext *ctx, uint8_t *output)
Definition: crypto_sha.h:127
int32_t(* Crypto_ShaSingleShotFxn)(Crypto_ShaContext *ctx, const uint8_t *input, uint32_t ilen, uint8_t *output)
Definition: crypto_sha.h:128
uint32_t authMode
Definition: crypto_sha.h:112
int32_t Crypto_hmacSha(Crypto_ShaHandle handle, const uint8_t *input, uint32_t ilen, uint8_t *output)
This function calculates the Keyed-Hash Message Authentication Code Secure Hash Algorithm (HMAC-SHA) ...
Crypto_ShaSingleShotFxn singleShotFxn
Definition: crypto_sha.h:144
uintptr_t rsv[60U]
Definition: crypto_sha.h:159
CRYPTO SHA global configuration array.
Definition: crypto_sha.h:170
Crypto_ShaParams params
Definition: crypto_sha.h:153
Crypto_ShaCloseFxn closeFxn
Definition: crypto_sha.h:136
int32_t(* Crypto_ShaUpdateFxn)(Crypto_ShaContext *ctx, const uint8_t *input, uint32_t ilen)
Definition: crypto_sha.h:126
Parameters passed during Crypto_shaOpen()
Definition: crypto_sha.h:111
Driver implementation callbacks.
Definition: crypto_sha.h:133
void * drvHandle
Definition: crypto_sha.h:157
int32_t(* Crypto_ShaCloseFxn)(Crypto_ShaContext *ctx)
Definition: crypto_sha.h:124
#define CRYPTO_HMAC_SHA_SW_MAX_KEYLEN_BYTES
Definition: crypto_sha.h:94
Crypto_hmacShaFxn hmacShaFxn
Definition: crypto_sha.h:146
Crypto_ShaFxns * fxns
Definition: crypto_sha.h:155
int32_t Crypto_shaSingleShot(Crypto_ShaHandle handle, const uint8_t *input, uint32_t ilen, uint8_t *output)
This function calculates the Secure Hash Algorithm (SHA) checksum of a buffer.
Crypto_ShaConfig gCryptoShaConfig[CRYPTO_NUM_TYPE]
Externally defined SHA driver configuration array.
Crypto_ShaFxns * fxns
Definition: crypto_sha.h:171
uint32_t keySizeInBits
Definition: crypto_sha.h:118
void * Crypto_ShaHandle
Handle to the Crypto SHA driver returned by Crypto_shaOpen()
Definition: crypto_sha.h:98
uint32_t type
Definition: crypto_sha.h:114
Crypto_ShaHandle Crypto_shaOpen(Crypto_ShaContext *ctx, const Crypto_ShaParams *params)
This function gives the configuration based on type.
CRYPTO SHA driver context.
Definition: crypto_sha.h:152
Crypto_ShaFinishFxn finishFxn
Definition: crypto_sha.h:142
int32_t Crypto_shaClose(Crypto_ShaHandle handle)
This function clears a Secure Hash Algorithm (SHA ) context.
int32_t(* Crypto_hmacShaFxn)(Crypto_ShaContext *ctx, const uint8_t *input, uint32_t ilen, uint8_t *output)
Definition: crypto_sha.h:129
Crypto_ShaOpenFxn openFxn
Definition: crypto_sha.h:134
int32_t(* Crypto_ShaOpenFxn)(Crypto_ShaContext *ctx, const Crypto_ShaParams *params)
callback functions declarations
Definition: crypto_sha.h:123
int32_t(* Crypto_ShaStartFxn)(Crypto_ShaContext *ctx)
Definition: crypto_sha.h:125
void Crypto_ShaParams_init(Crypto_ShaParams *params)
Set default parameters in the Crypto_ShaParams structure.