Fetch HW entropy source from SD

This commit is contained in:
Mark Qvist 2019-02-07 13:16:42 +01:00
parent 85626c40a8
commit 0e24b54657
7 changed files with 249 additions and 22 deletions
hardware

View file

@ -5,10 +5,24 @@
#include <stdlib.h>
#include <stdbool.h>
#include <stdio.h>
#include "crypto/aes.h"
#include "hardware/crypto/aes.h"
#include "hardware/LED.h"
#include "hardware/SD.h"
#define PATH_ENTROPY_INDEX "OpenModem/entropy.index"
#define PATH_ENTROPY_SOURCE "OpenModem/entropy.source"
#define PATH_AES_128_KEY "OpenModem/aes128.key"
#define CRYPTO_KEY_SIZE_BITS 128
#define CRYPTO_KEY_SIZE (CRYPTO_KEY_SIZE_BITS/8)
#define MAX_IVS_PER_ENTROPY_BLOCK 128
void crypto_init(void);
void crypto_test(void);
bool load_key(void);
bool load_entropy(void);
bool load_entropy_index(void);
#endif