mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-01-31 07:39:23 +00:00
- ASM is disabled - Neug needs full rewrite - Flash is based on PiMoroni 4MB flash (needs adjust) Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
17 lines
503 B
C
17 lines
503 B
C
#define SHA512_DIGEST_SIZE 64
|
|
#define SHA512_BLOCK_SIZE 128
|
|
|
|
typedef struct
|
|
{
|
|
uint64_t total[2];
|
|
uint64_t state[8];
|
|
uint64_t wbuf[16];
|
|
} sha512_context;
|
|
|
|
void sha512 (const unsigned char *input, unsigned int ilen,
|
|
unsigned char output[64]);
|
|
void sha512_start (sha512_context *ctx);
|
|
void sha512_finish (sha512_context *ctx, unsigned char output[64]);
|
|
void sha512_update (sha512_context *ctx, const unsigned char *input,
|
|
unsigned int ilen);
|
|
void sha512_process (sha512_context *ctx);
|