23 #ifndef LW_INTERNAL_GRAIN128_H
24 #define LW_INTERNAL_GRAIN128_H
26 #include "internal-util.h"
84 const unsigned char *nonce);
95 unsigned long long len);
107 unsigned long long len);
119 unsigned long long len);
uint64_t sr
Definition: internal-grain128.h:50
void grain128_encrypt(grain128_state_t *state, unsigned char *c, const unsigned char *m, unsigned long long len)
Encrypts and authenticates data with Grain-128.
Definition: internal-grain128.c:355
void grain128_compute_tag(grain128_state_t *state)
Computes the final authentiation tag.
Definition: internal-grain128.c:443
uint32_t grain128_preoutput(const grain128_state_t *state)
Generates 32 bits of pre-output data.
Definition: internal-grain128.c:119
unsigned posn
Definition: internal-grain128.h:52
Representation of the state of Grain-128.
Definition: internal-grain128.h:45
void grain128_decrypt(grain128_state_t *state, unsigned char *m, const unsigned char *c, unsigned long long len)
Decrypts and authenticates data with Grain-128.
Definition: internal-grain128.c:398
void grain128_setup(grain128_state_t *state, const unsigned char *key, const unsigned char *nonce)
Sets up the initial Grain-128 state with the key and nonce.
Definition: internal-grain128.c:200
uint64_t accum
Definition: internal-grain128.h:49
void grain128_authenticate(grain128_state_t *state, const unsigned char *data, unsigned long long len)
Authenticates data with Grain-128.
Definition: internal-grain128.c:314
void grain128_core(grain128_state_t *state, uint32_t x, uint32_t x2)
Performs 32 rounds of Grain-128 in parallel.
Definition: internal-grain128.c:43