23 #ifndef LWCRYPTO_SATURNIN_H
24 #define LWCRYPTO_SATURNIN_H
53 #define SATURNIN_KEY_SIZE 32
59 #define SATURNIN_TAG_SIZE 32
64 #define SATURNIN_NONCE_SIZE 16
69 #define SATURNIN_HASH_SIZE 32
77 unsigned char hash[32];
78 unsigned char block[32];
123 (
unsigned char *c,
unsigned long long *clen,
124 const unsigned char *m,
unsigned long long mlen,
125 const unsigned char *ad,
unsigned long long adlen,
126 const unsigned char *nsec,
127 const unsigned char *npub,
128 const unsigned char *k);
153 (
unsigned char *m,
unsigned long long *mlen,
155 const unsigned char *c,
unsigned long long clen,
156 const unsigned char *ad,
unsigned long long adlen,
157 const unsigned char *npub,
158 const unsigned char *k);
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);
231 (
unsigned char *out,
const unsigned char *in,
unsigned long long inlen);
253 unsigned long long inlen);
Meta-information about an AEAD cipher.
Definition: aead-common.h:185
Definitions that are common across AEAD schemes.
unsigned long long align
Definition: saturnin.h:82
aead_cipher_t const saturnin_cipher
Meta-information block for the SATURNIN-CTR-Cascade cipher.
Definition: saturnin.c:27
Meta-information about a hash algorithm that is related to an AEAD.
Definition: aead-common.h:204
unsigned char count
Definition: saturnin.h:79
int saturnin_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 SATURNIN-CTR-Cascade.
Definition: saturnin.c:179
int saturnin_hash(unsigned char *out, const unsigned char *in, unsigned long long inlen)
Hashes a block of input data with SATURNIN to generate a hash value.
Definition: saturnin.c:314
aead_cipher_t const saturnin_short_cipher
Meta-information block for the SATURNIN-Short cipher.
Definition: saturnin.c:37
int saturnin_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 SATURNIN-CTR-Cascade.
Definition: saturnin.c:140
int saturnin_short_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 SATURNIN-Short.
Definition: saturnin.c:224
int saturnin_short_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 SATURNIN-Short.
Definition: saturnin.c:256
aead_hash_algorithm_t const saturnin_hash_algorithm
Meta-information block for SATURNIN-Hash.
Definition: saturnin.c:47
void saturnin_hash_update(saturnin_hash_state_t *state, const unsigned char *in, unsigned long long inlen)
Updates an SATURNIN-Hash state with more input data.
Definition: saturnin.c:331
unsigned char mode
Definition: saturnin.h:80
void saturnin_hash_finalize(saturnin_hash_state_t *state, unsigned char *out)
Returns the final hash value from an SATURNIN-Hash hashing operation.
Definition: saturnin.c:368
State information for SATURNIN-Hash incremental modes.
Definition: saturnin.h:74
void saturnin_hash_init(saturnin_hash_state_t *state)
Initializes the state for an SATURNIN-Hash hashing operation.
Definition: saturnin.c:325