mirror of
https://github.com/markqvist/OpenModem.git
synced 2025-08-14 09:26:08 -04:00
Fetch HW entropy source from SD
This commit is contained in:
parent
85626c40a8
commit
0e24b54657
7 changed files with 249 additions and 22 deletions
hardware
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue