ascii-chat
Binary v0.16.114-28-gf5913657f
Library lib/v0.3.2-3302-gf5913657f
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 26 of file record.h.

Field Documentation

◆ crypto

◆ datagram_seen

uint64_t crypto_record::datagram_seen[3]

Definition at line 35 of file record.h.

Referenced by crypto_record_open_sequence().

◆ key_epoch

◆ last_receive_channel

unsigned crypto_record::last_receive_channel

Definition at line 36 of file record.h.

Referenced by acip_security_decrypt(), and crypto_record_open_sequence().

◆ last_receive_delivery

unsigned crypto_record::last_receive_delivery

Definition at line 36 of file record.h.

Referenced by crypto_record_open_sequence().

◆ last_receive_epoch

uint64_t crypto_record::last_receive_epoch

Definition at line 28 of file record.h.

Referenced by crypto_record_open_sequence(), and crypto_rekey_session_receive().

◆ pending_prepared

bool crypto_record::pending_prepared

◆ previous_allowed

bool crypto_record::previous_allowed[3]

◆ previous_crypto

crypto_context_t crypto_record::previous_crypto

◆ previous_epoch

uint64_t crypto_record::previous_epoch

Definition at line 30 of file record.h.

Referenced by crypto_record_commit_epoch(), and crypto_record_open_sequence().

◆ previous_valid

◆ receive_high

uint64_t crypto_record::receive_high[3][2]

Definition at line 34 of file record.h.

Referenced by crypto_record_open_sequence().

◆ send_sequence

uint64_t crypto_record::send_sequence[3][2]

Definition at line 33 of file record.h.

Referenced by crypto_record_seal_into_domain().

◆ server


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