25 #ifndef BR_BEARSSL_AEAD_H__ 26 #define BR_BEARSSL_AEAD_H__ 207 void (*
reset)(
const br_aead_class **cc,
const void *iv,
size_t len);
222 const void *data,
size_t len);
234 void (*
flip)(
const br_aead_class **cc);
252 void (*
run)(
const br_aead_class **cc,
int encrypt,
253 void *data,
size_t len);
277 void (*
get_tag)(
const br_aead_class **cc,
void *tag);
296 uint32_t (*
check_tag)(
const br_aead_class **cc,
const void *tag);
327 const void *tag,
size_t len);
359 #ifndef BR_DOXYGEN_IGNORE 360 const br_block_ctr_class **bctx;
363 unsigned char j0_1[12];
364 unsigned char buf[16];
367 uint64_t count_aad, count_ctr;
388 const br_block_ctr_class **bctx,
br_ghash gh);
543 const void *tag,
size_t len);
582 #ifndef BR_DOXYGEN_IGNORE 583 const br_block_ctrcbc_class **bctx;
584 unsigned char L2[16];
585 unsigned char L4[16];
586 unsigned char nonce[16];
587 unsigned char head[16];
588 unsigned char ctr[16];
589 unsigned char cbcmac[16];
590 unsigned char buf[16];
604 #ifndef BR_DOXYGEN_IGNORE 605 unsigned char st[3][16];
683 const void *nonce,
size_t len);
704 const void *nonce,
size_t len);
747 memcpy(st->st[1], ctx->head,
sizeof ctx->head);
856 const void *tag,
size_t len);
897 #ifndef BR_DOXYGEN_IGNORE 898 const br_block_ctrcbc_class **bctx;
899 unsigned char ctr[16];
900 unsigned char cbcmac[16];
901 unsigned char tagmask[16];
902 unsigned char buf[16];
966 uint64_t aad_len, uint64_t data_len,
size_t tag_len);
uint32_t(* check_tag)(const br_aead_class **cc, const void *tag)
Compute and check authentication tag.
Definition: bearssl_aead.h:296
Context structure for CCM.
Definition: bearssl_aead.h:896
void(* reset)(const br_aead_class **cc, const void *iv, size_t len)
Reset an AEAD context.
Definition: bearssl_aead.h:207
EAX captured state.
Definition: bearssl_aead.h:603
Context structure for GCM.
Definition: bearssl_aead.h:355
Context structure for EAX.
Definition: bearssl_aead.h:578
void(* flip)(const br_aead_class **cc)
Finish injection of additional authenticated data.
Definition: bearssl_aead.h:234
uint32_t(* check_tag_trunc)(const br_aead_class **cc, const void *tag, size_t len)
Compute and check authentication tag (with truncation).
Definition: bearssl_aead.h:326
void(* get_tag_trunc)(const br_aead_class **cc, void *tag, size_t len)
Compute authentication tag (with truncation).
Definition: bearssl_aead.h:311
Class type of an AEAD algorithm.
Definition: bearssl_aead.h:181
void(* aad_inject)(const br_aead_class **cc, const void *data, size_t len)
Inject additional authenticated data.
Definition: bearssl_aead.h:221
const br_aead_class * vtable
Pointer to vtable for this context.
Definition: bearssl_aead.h:580
void(* get_tag)(const br_aead_class **cc, void *tag)
Compute authentication tag.
Definition: bearssl_aead.h:277
size_t tag_size
Size (in bytes) of authentication tags created by this AEAD algorithm.
Definition: bearssl_aead.h:187
void(* run)(const br_aead_class **cc, int encrypt, void *data, size_t len)
Encrypt or decrypt some data.
Definition: bearssl_aead.h:252
const br_aead_class * vtable
Pointer to vtable for this context.
Definition: bearssl_aead.h:357