23 #ifndef LWCRYPTO_KNOT_MASKED_H
24 #define LWCRYPTO_KNOT_MASKED_H
40 #define KNOT_AEAD_MASKED_128_KEY_SIZE 16
46 #define KNOT_AEAD_MASKED_128_TAG_SIZE 16
51 #define KNOT_AEAD_MASKED_128_NONCE_SIZE 16
56 #define KNOT_AEAD_MASKED_192_KEY_SIZE 24
61 #define KNOT_AEAD_MASKED_192_TAG_SIZE 24
66 #define KNOT_AEAD_MASKED_192_NONCE_SIZE 24
71 #define KNOT_AEAD_MASKED_256_KEY_SIZE 32
76 #define KNOT_AEAD_MASKED_256_TAG_SIZE 32
81 #define KNOT_AEAD_MASKED_256_NONCE_SIZE 32
125 (
unsigned char *c,
unsigned long long *clen,
126 const unsigned char *m,
unsigned long long mlen,
127 const unsigned char *ad,
unsigned long long adlen,
128 const unsigned char *nsec,
129 const unsigned char *npub,
130 const unsigned char *k);
155 (
unsigned char *m,
unsigned long long *mlen,
157 const unsigned char *c,
unsigned long long clen,
158 const unsigned char *ad,
unsigned long long adlen,
159 const unsigned char *npub,
160 const unsigned char *k);
184 (
unsigned char *c,
unsigned long long *clen,
185 const unsigned char *m,
unsigned long long mlen,
186 const unsigned char *ad,
unsigned long long adlen,
187 const unsigned char *nsec,
188 const unsigned char *npub,
189 const unsigned char *k);
214 (
unsigned char *m,
unsigned long long *mlen,
216 const unsigned char *c,
unsigned long long clen,
217 const unsigned char *ad,
unsigned long long adlen,
218 const unsigned char *npub,
219 const unsigned char *k);
244 (
unsigned char *c,
unsigned long long *clen,
245 const unsigned char *m,
unsigned long long mlen,
246 const unsigned char *ad,
unsigned long long adlen,
247 const unsigned char *nsec,
248 const unsigned char *npub,
249 const unsigned char *k);
274 (
unsigned char *m,
unsigned long long *mlen,
276 const unsigned char *c,
unsigned long long clen,
277 const unsigned char *ad,
unsigned long long adlen,
278 const unsigned char *npub,
279 const unsigned char *k);
303 (
unsigned char *c,
unsigned long long *clen,
304 const unsigned char *m,
unsigned long long mlen,
305 const unsigned char *ad,
unsigned long long adlen,
306 const unsigned char *nsec,
307 const unsigned char *npub,
308 const unsigned char *k);
333 (
unsigned char *m,
unsigned long long *mlen,
335 const unsigned char *c,
unsigned long long clen,
336 const unsigned char *ad,
unsigned long long adlen,
337 const unsigned char *npub,
338 const unsigned char *k);
aead_cipher_t const knot_aead_128_384_masked_cipher
Meta-information block for the masked KNOT-AEAD-128-384 cipher.
Definition: knot-masked.c:42
Meta-information about an AEAD cipher.
Definition: aead-common.h:185
Definitions that are common across AEAD schemes.
aead_cipher_t const knot_aead_128_256_masked_cipher
Meta-information block for the masked KNOT-AEAD-128-256 cipher.
Definition: knot-masked.c:28
int knot_masked_192_384_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 masked KNOT-AEAD-192-384.
Definition: knot-masked.c:1063
int knot_masked_192_384_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 masked KNOT-AEAD-192-384.
Definition: knot-masked.c:1121
aead_cipher_t const knot_aead_192_384_masked_cipher
Meta-information block for the masked KNOT-AEAD-192-384 cipher.
Definition: knot-masked.c:56
int knot_masked_128_384_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 masked KNOT-AEAD-128-384.
Definition: knot-masked.c:989
int knot_masked_128_384_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 masked KNOT-AEAD-128-384.
Definition: knot-masked.c:924
int knot_masked_256_512_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 masked KNOT-AEAD-256-512.
Definition: knot-masked.c:1244
int knot_masked_256_512_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 masked KNOT-AEAD-256-512.
Definition: knot-masked.c:1186
int knot_masked_128_256_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 masked KNOT-AEAD-128-256.
Definition: knot-masked.c:867
int knot_masked_128_256_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 masked KNOT-AEAD-128-256.
Definition: knot-masked.c:815
aead_cipher_t const knot_aead_256_512_masked_cipher
Meta-information block for the masked KNOT-AEAD-256-512 cipher.
Definition: knot-masked.c:70