27#if !defined(CRYPTO_COMMON_H)
28#define CRYPTO_COMMON_H
30#if defined(MBEDTLS_CONFIG_FILE)
31#include MBEDTLS_CONFIG_FILE
38#include "cy_crypto_core_sha.h"
40#include "cyhal_crypto_common.h"
44#if defined(CY_IP_MXCRYPTO_INSTANCES) || defined(CPUSS_CRYPTO_PRESENT)
46 cyhal_resource_inst_t resource;
47 cyhal_crypto_feature_t feature;
51bool cy_hw_crypto_reserve(
cy_hw_crypto_t *obj, cyhal_crypto_feature_t feature);
53void cy_hw_zeroize(
void *data, uint32_t dataSize);
55void cy_hw_sha_init(
void *ctx, uint32_t ctxSize);
56void cy_hw_sha_free(
void *ctx, uint32_t ctxSize);
58int cy_hw_sha_start (
cy_hw_crypto_t *obj, cy_stc_crypto_sha_state_t *hashState,
59 cy_en_crypto_sha_mode_t shaMode,
void *shaBuffers);
61int cy_hw_sha_update(
cy_hw_crypto_t *obj, cy_stc_crypto_sha_state_t *hashState,
62 const uint8_t *in, uint32_t inlen);
64int cy_hw_sha_finish(
cy_hw_crypto_t *obj, cy_stc_crypto_sha_state_t *hashState,
67void cy_hw_sha_clone(
void *ctxDst,
const void *ctxSrc, uint32_t ctxSize,
68 cy_stc_crypto_sha_state_t *hashStateDst,
void *shaBuffersDst);
70int cy_hw_sha_process(
cy_hw_crypto_t *obj, cy_stc_crypto_sha_state_t *hashState,
Configuration options (set of defines)
This file provides an API for Elliptic Curves over GF(P) (ECP).