23 #ifndef LWCRYPTO_SKINNY_AEAD_H
24 #define LWCRYPTO_SKINNY_AEAD_H
68 #define SKINNY_AEAD_KEY_SIZE 16
73 #define SKINNY_AEAD_M1_TAG_SIZE 16
78 #define SKINNY_AEAD_M1_NONCE_SIZE 16
83 #define SKINNY_AEAD_M2_TAG_SIZE 16
88 #define SKINNY_AEAD_M2_NONCE_SIZE 12
93 #define SKINNY_AEAD_M3_TAG_SIZE 8
98 #define SKINNY_AEAD_M3_NONCE_SIZE 16
103 #define SKINNY_AEAD_M4_TAG_SIZE 8
108 #define SKINNY_AEAD_M4_NONCE_SIZE 12
113 #define SKINNY_AEAD_M5_TAG_SIZE 16
118 #define SKINNY_AEAD_M5_NONCE_SIZE 12
123 #define SKINNY_AEAD_M6_TAG_SIZE 8
128 #define SKINNY_AEAD_M6_NONCE_SIZE 12
182 (
unsigned char *c,
unsigned long long *clen,
183 const unsigned char *m,
unsigned long long mlen,
184 const unsigned char *ad,
unsigned long long adlen,
185 const unsigned char *nsec,
186 const unsigned char *npub,
187 const unsigned char *k);
212 (
unsigned char *m,
unsigned long long *mlen,
214 const unsigned char *c,
unsigned long long clen,
215 const unsigned char *ad,
unsigned long long adlen,
216 const unsigned char *npub,
217 const unsigned char *k);
241 (
unsigned char *c,
unsigned long long *clen,
242 const unsigned char *m,
unsigned long long mlen,
243 const unsigned char *ad,
unsigned long long adlen,
244 const unsigned char *nsec,
245 const unsigned char *npub,
246 const unsigned char *k);
271 (
unsigned char *m,
unsigned long long *mlen,
273 const unsigned char *c,
unsigned long long clen,
274 const unsigned char *ad,
unsigned long long adlen,
275 const unsigned char *npub,
276 const unsigned char *k);
300 (
unsigned char *c,
unsigned long long *clen,
301 const unsigned char *m,
unsigned long long mlen,
302 const unsigned char *ad,
unsigned long long adlen,
303 const unsigned char *nsec,
304 const unsigned char *npub,
305 const unsigned char *k);
330 (
unsigned char *m,
unsigned long long *mlen,
332 const unsigned char *c,
unsigned long long clen,
333 const unsigned char *ad,
unsigned long long adlen,
334 const unsigned char *npub,
335 const unsigned char *k);
359 (
unsigned char *c,
unsigned long long *clen,
360 const unsigned char *m,
unsigned long long mlen,
361 const unsigned char *ad,
unsigned long long adlen,
362 const unsigned char *nsec,
363 const unsigned char *npub,
364 const unsigned char *k);
389 (
unsigned char *m,
unsigned long long *mlen,
391 const unsigned char *c,
unsigned long long clen,
392 const unsigned char *ad,
unsigned long long adlen,
393 const unsigned char *npub,
394 const unsigned char *k);
418 (
unsigned char *c,
unsigned long long *clen,
419 const unsigned char *m,
unsigned long long mlen,
420 const unsigned char *ad,
unsigned long long adlen,
421 const unsigned char *nsec,
422 const unsigned char *npub,
423 const unsigned char *k);
448 (
unsigned char *m,
unsigned long long *mlen,
450 const unsigned char *c,
unsigned long long clen,
451 const unsigned char *ad,
unsigned long long adlen,
452 const unsigned char *npub,
453 const unsigned char *k);
477 (
unsigned char *c,
unsigned long long *clen,
478 const unsigned char *m,
unsigned long long mlen,
479 const unsigned char *ad,
unsigned long long adlen,
480 const unsigned char *nsec,
481 const unsigned char *npub,
482 const unsigned char *k);
507 (
unsigned char *m,
unsigned long long *mlen,
509 const unsigned char *c,
unsigned long long clen,
510 const unsigned char *ad,
unsigned long long adlen,
511 const unsigned char *npub,
512 const unsigned char *k);
Meta-information about an AEAD cipher.
Definition: aead-common.h:185
Definitions that are common across AEAD schemes.
aead_cipher_t const skinny_aead_m5_cipher
Meta-information block for the SKINNY-AEAD-M5 cipher.
Definition: skinny-aead.c:68
int skinny_aead_m6_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 SKINNY-AEAD-M6.
Definition: skinny-aead.c:748
aead_cipher_t const skinny_aead_m6_cipher
Meta-information block for the SKINNY-AEAD-M6 cipher.
Definition: skinny-aead.c:78
int skinny_aead_m1_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 SKINNY-AEAD-M1.
Definition: skinny-aead.c:273
int skinny_aead_m3_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 SKINNY-AEAD-M3.
Definition: skinny-aead.c:420
int skinny_aead_m1_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 SKINNY-AEAD-M1.
Definition: skinny-aead.c:302
int skinny_aead_m2_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 SKINNY-AEAD-M2.
Definition: skinny-aead.c:361
int skinny_aead_m6_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 SKINNY-AEAD-M6.
Definition: skinny-aead.c:777
int skinny_aead_m5_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 SKINNY-AEAD-M5.
Definition: skinny-aead.c:689
int skinny_aead_m5_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 SKINNY-AEAD-M5.
Definition: skinny-aead.c:718
int skinny_aead_m3_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 SKINNY-AEAD-M3.
Definition: skinny-aead.c:391
aead_cipher_t const skinny_aead_m1_cipher
Meta-information block for the SKINNY-AEAD-M1 cipher.
Definition: skinny-aead.c:28
aead_cipher_t const skinny_aead_m2_cipher
Meta-information block for the SKINNY-AEAD-M2 cipher.
Definition: skinny-aead.c:38
aead_cipher_t const skinny_aead_m3_cipher
Meta-information block for the SKINNY-AEAD-M3 cipher.
Definition: skinny-aead.c:48
int skinny_aead_m2_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 SKINNY-AEAD-M2.
Definition: skinny-aead.c:332
aead_cipher_t const skinny_aead_m4_cipher
Meta-information block for the SKINNY-AEAD-M4 cipher.
Definition: skinny-aead.c:58
int skinny_aead_m4_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 SKINNY-AEAD-M4.
Definition: skinny-aead.c:450
int skinny_aead_m4_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 SKINNY-AEAD-M4.
Definition: skinny-aead.c:479