23 #ifndef LWCRYPTO_ACE_H
24 #define LWCRYPTO_ACE_H
48 #define ACE_KEY_SIZE 16
53 #define ACE_TAG_SIZE 16
58 #define ACE_NONCE_SIZE 16
63 #define ACE_HASH_SIZE 32
81 unsigned char state[40];
110 (
unsigned char *c,
unsigned long long *clen,
111 const unsigned char *m,
unsigned long long mlen,
112 const unsigned char *ad,
unsigned long long adlen,
113 const unsigned char *nsec,
114 const unsigned char *npub,
115 const unsigned char *k);
140 (
unsigned char *m,
unsigned long long *mlen,
142 const unsigned char *c,
unsigned long long clen,
143 const unsigned char *ad,
unsigned long long adlen,
144 const unsigned char *npub,
145 const unsigned char *k);
159 (
unsigned char *out,
const unsigned char *in,
unsigned long long inlen);
181 unsigned long long inlen);
Meta-information about an AEAD cipher.
Definition: aead-common.h:185
Definitions that are common across AEAD schemes.
void ace_hash_init(ace_hash_state_t *state)
Initializes the state for an ACE-HASH hashing operation.
Definition: ace.c:279
unsigned char count
Definition: ace.h:82
Meta-information about a hash algorithm that is related to an AEAD.
Definition: aead-common.h:204
int ace_hash(unsigned char *out, const unsigned char *in, unsigned long long inlen)
Hashes a block of input data with ACE-HASH to generate a hash value.
Definition: ace.c:241
State information for the ACE-HASH incremental hash mode.
Definition: ace.h:78
aead_cipher_t const ace_cipher
Meta-information block for the ACE cipher.
Definition: ace.c:39
aead_hash_algorithm_t const ace_hash_algorithm
Meta-information block for the ACE-HASH hash algorithm.
Definition: ace.c:49
void ace_hash_update(ace_hash_state_t *state, const unsigned char *in, unsigned long long inlen)
Updates the ACE-HASH state with more input data.
Definition: ace.c:286
unsigned long long align
Definition: ace.h:84
void ace_hash_finalize(ace_hash_state_t *state, unsigned char *out)
Returns the final hash value from an ACE-HASH hashing operation.
Definition: ace.c:323
int ace_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 ACE.
Definition: ace.c:150
int ace_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 ACE.
Definition: ace.c:189