From 412a8f99928beff605805807b0f07f6bf8d0a965 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Fri, 13 May 2022 12:45:53 +0200 Subject: code rename --- fw/fe310/eos/dev/sdc_crypto.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 fw/fe310/eos/dev/sdc_crypto.h (limited to 'fw/fe310/eos/dev/sdc_crypto.h') diff --git a/fw/fe310/eos/dev/sdc_crypto.h b/fw/fe310/eos/dev/sdc_crypto.h new file mode 100644 index 0000000..015bf8a --- /dev/null +++ b/fw/fe310/eos/dev/sdc_crypto.h @@ -0,0 +1,18 @@ +#include +#include + +typedef void (*eve_sdcc_init_t) (void *, uint8_t *); +typedef void (*eve_sdcc_crypt_t) (void *, uint8_t *, uint8_t *, size_t); +typedef void (*eve_sdcc_essiv_t) (void *, uint8_t *); + +typedef struct EOSSDCCrypto { + void *ctx; + eve_sdcc_crypt_t enc; + eve_sdcc_crypt_t dec; + void *ctx_essiv; + eve_sdcc_essiv_t enc_essiv; +} EOSSDCCrypto; + +void eos_sdcc_init(EOSSDCCrypto *crypto, uint8_t *key, void *ctx, eve_sdcc_init_t init, eve_sdcc_crypt_t enc, eve_sdcc_crypt_t dec, void *ctx_essiv, eve_sdcc_init_t init_essiv, eve_sdcc_essiv_t enc_essiv); +void eos_sdcc_encrypt(uint32_t sect, uint8_t *buffer); +void eos_sdcc_decrypt(uint32_t sect, uint8_t *buffer); \ No newline at end of file -- cgit v1.2.3