ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
include/ascii-chat/crypto/session.h
Go to the documentation of this file.
1#pragma once
3#include <libplatform/mutex.h>
4
5#define CRYPTO_SESSION_MESSAGES 16
6
16
29
38 size_t, uint64_t now_ns, bool *consumed);
unsigned long long uint64_t
Definition common.h:63
unsigned char uint8_t
Definition common.h:60
asciichat_error_t
Error and exit codes - unified status values (0-255).
Definition error_codes.h:44
asciichat_error_t crypto_session_create(crypto_context_t *)
asciichat_error_t crypto_session_receive(crypto_session_t *, unsigned, unsigned, crypto_rekey_message_t, const void *, size_t, uint64_t now_ns, bool *consumed)
void crypto_session_unlock(crypto_session_t *)
struct crypto_session crypto_session_t
For crypto session, this is the live record that ties owner, mutex, records, rotation together....
asciichat_error_t crypto_session_lock(crypto_context_t *, crypto_session_t **)
asciichat_error_t crypto_session_tick(crypto_session_t *, uint64_t now_ns)
void crypto_session_destroy(crypto_context_t *)
#define CRYPTO_SESSION_MESSAGES
struct crypto_record crypto_record_t
When code needs to work with crypto record, it keeps crypto, key_epoch, last_receive_epoch,...
crypto_rekey_message_t
Definition rekey.h:6
#define CRYPTO_PUBLIC_KEY_SIZE
Public key size (X25519).
Definition sizes.h:67
Endpoint cryptographic state for handshake, packet protection, authentication, and rekeying.
crypto rekey session is intentionally a small, concrete record. Fields such as security,...
Definition rekey.h:20
uint8_t payload[CRYPTO_PUBLIC_KEY_SIZE]
For crypto session, this is the live record that ties owner, mutex, records, rotation together....
crypto_session_message_t messages[16]
crypto_rekey_session_t rotation