23 #ifndef LWCRYPTO_XOODYAK_H
24 #define LWCRYPTO_XOODYAK_H
59 #define XOODYAK_KEY_SIZE 16
64 #define XOODYAK_TAG_SIZE 16
69 #define XOODYAK_NONCE_SIZE 16
74 #define XOODYAK_HASH_SIZE 32
82 unsigned char state[48];
122 (
unsigned char *c,
unsigned long long *clen,
123 const unsigned char *m,
unsigned long long mlen,
124 const unsigned char *ad,
unsigned long long adlen,
125 const unsigned char *nsec,
126 const unsigned char *npub,
127 const unsigned char *k);
152 (
unsigned char *m,
unsigned long long *mlen,
154 const unsigned char *c,
unsigned long long clen,
155 const unsigned char *ad,
unsigned long long adlen,
156 const unsigned char *npub,
157 const unsigned char *k);
171 (
unsigned char *out,
const unsigned char *in,
unsigned long long inlen);
193 unsigned long long inlen);
206 unsigned long long outlen);
unsigned long long align
Definition: xoodyak.h:86
Meta-information about an AEAD cipher.
Definition: aead-common.h:185
Definitions that are common across AEAD schemes.
aead_cipher_t const xoodyak_cipher
Meta-information block for the Xoodyak cipher.
Definition: xoodyak.c:27
void xoodyak_hash_init(xoodyak_hash_state_t *state)
Initializes the state for a Xoodyak hashing operation.
Definition: xoodyak.c:237
int xoodyak_aead_encrypt(unsigned char *c, unsigned long long *clen, const unsigned char *m, unsigned long long mlen, const unsigned char *ad, unsigned long long adlen, const unsigned char *nsec, const unsigned char *npub, const unsigned char *k)
Encrypts and authenticates a packet with Xoodyak.
Definition: xoodyak.c:112
aead_hash_algorithm_t const xoodyak_hash_algorithm
Meta-information block for the Xoodyak hash algorithm.
Definition: xoodyak.c:37
void xoodyak_hash_squeeze(xoodyak_hash_state_t *state, unsigned char *out, unsigned long long outlen)
Squeezes output data from a Xoodyak hashing state.
Definition: xoodyak.c:281
Meta-information about a hash algorithm that is related to an AEAD.
Definition: aead-common.h:204
int xoodyak_hash(unsigned char *out, const unsigned char *in, unsigned long long inlen)
Hashes a block of input data with Xoodyak to generate a hash value.
Definition: xoodyak.c:221
State information for Xoodyak incremental hashing modes.
Definition: xoodyak.h:79
unsigned char mode
Definition: xoodyak.h:84
int xoodyak_aead_decrypt(unsigned char *m, unsigned long long *mlen, unsigned char *nsec, const unsigned char *c, unsigned long long clen, const unsigned char *ad, unsigned long long adlen, const unsigned char *npub, const unsigned char *k)
Decrypts and authenticates a packet with Xoodyak.
Definition: xoodyak.c:165
void xoodyak_hash_finalize(xoodyak_hash_state_t *state, unsigned char *out)
Returns the final hash value from a Xoodyak hashing operation.
Definition: xoodyak.c:318
void xoodyak_hash_absorb(xoodyak_hash_state_t *state, const unsigned char *in, unsigned long long inlen)
Aborbs more input data into a Xoodyak hashing state.
Definition: xoodyak.c:244
unsigned char count
Definition: xoodyak.h:83