forked from wolfSSL/wolfssl
ascon: error out when word64 not available
This commit is contained in:
@ -48,6 +48,10 @@
|
||||
* - Add support for big-endian systems
|
||||
* - Add support for 32-bit and smaller systems */
|
||||
|
||||
#ifndef WORD64_AVAILABLE
|
||||
#error "Ascon implementation requires a 64-bit word"
|
||||
#endif
|
||||
|
||||
/* Data block size in bytes */
|
||||
#define ASCON_HASH256_RATE 8
|
||||
#define ASCON_HASH256_ROUNDS 12
|
||||
|
@ -37,7 +37,9 @@ extern "C" {
|
||||
#define ASCON_AEAD128_TAG_SZ 16
|
||||
|
||||
typedef union AsconState {
|
||||
#ifdef WORD64_AVAILABLE
|
||||
word64 s64[5];
|
||||
#endif
|
||||
word32 s32[10];
|
||||
word16 s16[20];
|
||||
byte s8[40];
|
||||
@ -56,7 +58,9 @@ enum {
|
||||
|
||||
typedef struct wc_AsconAEAD128 {
|
||||
/* needed throughout both encrypt and decrypt */
|
||||
#ifdef WORD64_AVAILABLE
|
||||
word64 key[ASCON_AEAD128_KEY_SZ/sizeof(word64)];
|
||||
#endif
|
||||
AsconState state;
|
||||
byte lastBlkSz;
|
||||
byte KeySet:1; /* has the key been processed */
|
||||
|
Reference in New Issue
Block a user