LibAscon 1.2.1
Lightweight Authenticated Encryption & Hashing, also with Init-Update-Final paradigm.
Data Fields
ascon_bufstate Struct Reference

Internal cipher sponge state associated with a buffer holding for less-than-rate updates. More...

#include <ascon.h>

Collaboration diagram for ascon_bufstate:
Collaboration graph
[legend]

Data Fields

ascon_sponge_t sponge
 Cipher sponge state. More...
 
uint8_t buffer [ASCON_DOUBLE_RATE]
 Buffer caching the less-than-rate long input between update calls. More...
 
uint8_t buffer_len
 Currently used bytes of the buffer. More...
 
uint8_t flow_state
 State of the order of Init-Update-Final function calls, checked to know when to finalise the associated data processing and for the runtime assertions on the correct order of the functions. More...
 
uint8_t pad [6]
 Unused padding to the next uint64_t (sponge.x0 or ctx.k0) to avoid errors when compiling with -Wpadding on any platform. More...
 

Detailed Description

Internal cipher sponge state associated with a buffer holding for less-than-rate updates.

Used for the Init-Update-Final implementation.

Field Documentation

◆ sponge

ascon_sponge_t ascon_bufstate::sponge

Cipher sponge state.

◆ buffer

uint8_t ascon_bufstate::buffer[ASCON_DOUBLE_RATE]

Buffer caching the less-than-rate long input between update calls.

◆ buffer_len

uint8_t ascon_bufstate::buffer_len

Currently used bytes of the buffer.

◆ flow_state

uint8_t ascon_bufstate::flow_state

State of the order of Init-Update-Final function calls, checked to know when to finalise the associated data processing and for the runtime assertions on the correct order of the functions.

See also
ASCON_INPUT_ASSERTS

Note: this variable is not semantically relevant in THIS struct, as it should belong in the struct ascon_aead_ctx_t, but by having it here we spare bytes of padding (7 on 64-bit systems, 3 on 32-bit, 1 on 16-bit) at the end of the struct ascon_aead_ctx_t, by using some of the padding space this struct anyway has.

◆ pad

uint8_t ascon_bufstate::pad[6]

Unused padding to the next uint64_t (sponge.x0 or ctx.k0) to avoid errors when compiling with -Wpadding on any platform.


The documentation for this struct was generated from the following file: