4 static unsigned char const iv[8] = {
5 0x80, 0x40, 0x0c, 0x06, 0xFF, 0xFF, 0xFF, 0xFF
28 for (posn = 0; (posn + 16) <= len; posn += 16) {
42 for (posn = 0; (posn + 16) <= len; posn += 16) {
58 for (posn = 0; (posn + 16) <= len; posn += 16) {
74 for (posn = 0; (posn + 16) <= len; posn += 16) {
87 static unsigned char const pad[1] = {0x80};
89 for (posn = 0; (posn + 16) <= len; posn += 16) {
#define ascon_permute12(state)
Permutes the ASCON state with 12 rounds of the permutation.
void ascon_overwrite_with_zeroes(ascon_state_t *state, unsigned offset, unsigned size)
Overwrites a part of the ASCON state with zeroes.
void ascon_overwrite_bytes(ascon_state_t *state, const uint8_t *data, unsigned offset, unsigned size)
Overwrites existing bytes in the ASCON state.
void ascon_extract_bytes(const ascon_state_t *state, uint8_t *data, unsigned offset, unsigned size)
Extracts bytes from the ASCON state.
void ascon_extract_and_overwrite_bytes(ascon_state_t *state, const uint8_t *input, uint8_t *output, unsigned offset, unsigned size)
Extracts bytes from the ASCON state and XOR's them with input bytes to produce output bytes....
void ascon_add_bytes(ascon_state_t *state, const uint8_t *data, unsigned offset, unsigned size)
Adds bytes to the ASCON state by XOR'ing them with existing bytes.
void ascon_extract_and_add_bytes(const ascon_state_t *state, const uint8_t *input, uint8_t *output, unsigned offset, unsigned size)
Extracts bytes from the ASCON state and XOR's them with input bytes to produce output bytes.
void ascon_init(ascon_state_t *state)
Initializes the words of the ASCON permutation state to zero.
#define ascon_permute8(state)
Permutes the ASCON state with 8 rounds of the permutation.
ascon_state_t state
[snippet_key]
void cfb_decrypt(ascon_state_t *state, unsigned char *m, const unsigned char *c, int len)
[snippet_encrypt_cfb]
void cfb_auth_encrypt(ascon_state_t *state, unsigned char *c, const unsigned char *m, int len, unsigned char tag[16])
[snippet_decrypt_cfb2]
unsigned char data[8]
[snippet_key]
ascon_clean(data, sizeof(data))
void cfb_encrypt(ascon_state_t *state, unsigned char *c, const unsigned char *m, int len)
[snippet_encrypt_ofb]
void ofb_encrypt(ascon_state_t *state, unsigned char *c, const unsigned char *m, int len)
[snippet_zero2]
Structure of the internal state of the ASCON permutation.