summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/dev/sdc_crypto.c
diff options
context:
space:
mode:
Diffstat (limited to 'fw/fe310/eos/dev/sdc_crypto.c')
-rw-r--r--fw/fe310/eos/dev/sdc_crypto.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fw/fe310/eos/dev/sdc_crypto.c b/fw/fe310/eos/dev/sdc_crypto.c
index f0e935d..0cb7a78 100644
--- a/fw/fe310/eos/dev/sdc_crypto.c
+++ b/fw/fe310/eos/dev/sdc_crypto.c
@@ -9,9 +9,9 @@
#define SDC_CRYPTO_BLK_SIZE 16
#define SDC_CRYPTO_HASH_SIZE 20
-EOSSDCCrypto *sdc_crypto;
+static EOSSDCCrypto *sdc_crypto;
-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_init(EOSSDCCrypto *crypto, uint8_t *key, void *ctx, eos_sdcc_init_t init, eos_sdcc_crypt_t enc, eos_sdcc_crypt_t dec, void *ctx_essiv, eos_sdcc_init_t init_essiv, eos_sdcc_essiv_t enc_essiv) {
char key_essiv[SDC_CRYPTO_HASH_SIZE];
sdc_crypto = crypto;
@@ -28,7 +28,7 @@ void eos_sdcc_init(EOSSDCCrypto *crypto, uint8_t *key, void *ctx, eve_sdcc_init_
sdc_crypto->enc_essiv = enc_essiv;
}
-void eos_sdcc_encrypt(uint32_t sect, uint8_t *buffer) {
+void eos_sdc_encrypt(uint32_t sect, uint8_t *buffer) {
uint8_t iv[SDC_CRYPTO_BLK_SIZE];
if (sdc_crypto == NULL) return;
@@ -39,7 +39,7 @@ void eos_sdcc_encrypt(uint32_t sect, uint8_t *buffer) {
sdc_crypto->enc(sdc_crypto->ctx, iv, buffer, 512);
}
-void eos_sdcc_decrypt(uint32_t sect, uint8_t *buffer) {
+void eos_sdc_decrypt(uint32_t sect, uint8_t *buffer) {
uint8_t iv[SDC_CRYPTO_BLK_SIZE];
if (sdc_crypto == NULL) return;