ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
crypto_record Struct Reference

When code needs to work with crypto record, it keeps crypto, key_epoch, last_receive_epoch, previous_crypto here instead of scattering it across globals. Initialization establishes the handles and sizes; teardown must release any allocation, lock, thread, or callback context recorded in those fields. The caller serializes operations and keeps the borrowed crypto context alive. One previous receive epoch survives until each channel crosses its marker. More...

#include <include/ascii-chat/crypto/record.h>

Data Fields

crypto_context_t * crypto
uint64_t key_epoch
uint64_t last_receive_epoch
crypto_context_t previous_crypto
uint64_t previous_epoch
bool previous_valid
bool pending_prepared
bool previous_allowed [3]
uint64_t send_sequence [3][2]
uint64_t receive_high [3][2]
uint64_t datagram_seen [3]
unsigned last_receive_channel
unsigned last_receive_delivery
bool server

Detailed Description

When code needs to work with crypto record, it keeps crypto, key_epoch, last_receive_epoch, previous_crypto here instead of scattering it across globals. Initialization establishes the handles and sizes; teardown must release any allocation, lock, thread, or callback context recorded in those fields. The caller serializes operations and keeps the borrowed crypto context alive. One previous receive epoch survives until each channel crosses its marker.

Authenticated records over independent ordered channels and unordered delivery.

Definition at line 17 of file record.h.

Field Documentation

◆ crypto

◆ datagram_seen

uint64_t crypto_record::datagram_seen[3]

Definition at line 25 of file record.h.

◆ key_epoch

uint64_t crypto_record::key_epoch

◆ last_receive_channel

unsigned crypto_record::last_receive_channel

Definition at line 26 of file record.h.

Referenced by acip_security_decrypt().

◆ last_receive_delivery

unsigned crypto_record::last_receive_delivery

Definition at line 26 of file record.h.

◆ last_receive_epoch

uint64_t crypto_record::last_receive_epoch

Definition at line 19 of file record.h.

Referenced by crypto_rekey_session_receive().

◆ pending_prepared

bool crypto_record::pending_prepared

Definition at line 22 of file record.h.

Referenced by crypto_rekey_session_receive().

◆ previous_allowed

bool crypto_record::previous_allowed[3]

Definition at line 22 of file record.h.

Referenced by crypto_rekey_session_receive().

◆ previous_crypto

crypto_context_t crypto_record::previous_crypto

Definition at line 20 of file record.h.

◆ previous_epoch

uint64_t crypto_record::previous_epoch

Definition at line 21 of file record.h.

◆ previous_valid

bool crypto_record::previous_valid

Definition at line 22 of file record.h.

Referenced by crypto_rekey_session_receive().

◆ receive_high

uint64_t crypto_record::receive_high[3][2]

Definition at line 24 of file record.h.

◆ send_sequence

uint64_t crypto_record::send_sequence[3][2]

Definition at line 23 of file record.h.

◆ server

bool crypto_record::server

Definition at line 27 of file record.h.

Referenced by crypto_rekey_session_receive(), and crypto_rekey_session_tick().


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