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_parameters_packet_t Struct Reference

Crypto parameters packet structure (Packet Type 15). More...

#include <include/ascii-chat/network/packet/packet.h>

Data Fields

uint8_t selected_kex
 Selected key exchange algorithm (KEX_ALGO_*).
uint8_t selected_auth
 Selected authentication algorithm (AUTH_ALGO_*).
uint8_t selected_cipher
 Selected cipher algorithm (CIPHER_ALGO_*).
uint8_t verification_enabled
 Server verification enabled flag (1=enabled, 0=disabled).
uint16_t kex_public_key_size
 Key exchange public key size in bytes (e.g., 32 for X25519, 1568 for Kyber1024).
uint16_t auth_public_key_size
 Authentication public key size in bytes (e.g., 32 for Ed25519, 1952 for Dilithium3).
uint16_t signature_size
 Signature size in bytes (e.g., 64 for Ed25519, 3309 for Dilithium3).
uint16_t shared_secret_size
 Shared secret size in bytes (e.g., 32 for X25519).
uint8_t nonce_size
 Nonce size in bytes (e.g., 24 for XSalsa20).
uint8_t mac_size
 MAC size in bytes (e.g., 16 for Poly1305).
uint8_t hmac_size
 HMAC size in bytes (e.g., 32 for HMAC-SHA256).
uint8_t reserved [3]
 Reserved bytes for future use (must be zero).

Detailed Description

Crypto parameters packet structure (Packet Type 15).

Sent by server to client during crypto handshake to communicate chosen algorithms and algorithm-specific data sizes for handshake.

Note
This packet must be sent UNENCRYPTED (handshake packet).
Structure is 24 bytes total (packed).

Definition at line 1037 of file packet.h.

Field Documentation

◆ auth_public_key_size

uint16_t crypto_parameters_packet_t::auth_public_key_size

Authentication public key size in bytes (e.g., 32 for Ed25519, 1952 for Dilithium3).

Definition at line 1049 of file packet.h.

Referenced by crypto_handshake_server_send_parameters(), crypto_handshake_set_parameters(), and send_crypto_parameters_packet().

◆ hmac_size

uint8_t crypto_parameters_packet_t::hmac_size

HMAC size in bytes (e.g., 32 for HMAC-SHA256).

Definition at line 1059 of file packet.h.

Referenced by crypto_handshake_server_send_parameters(), and crypto_handshake_set_parameters().

◆ kex_public_key_size

uint16_t crypto_parameters_packet_t::kex_public_key_size

Key exchange public key size in bytes (e.g., 32 for X25519, 1568 for Kyber1024).

Definition at line 1047 of file packet.h.

Referenced by crypto_handshake_server_send_parameters(), crypto_handshake_set_parameters(), and send_crypto_parameters_packet().

◆ mac_size

uint8_t crypto_parameters_packet_t::mac_size

MAC size in bytes (e.g., 16 for Poly1305).

Definition at line 1057 of file packet.h.

Referenced by crypto_handshake_server_send_parameters(), and crypto_handshake_set_parameters().

◆ nonce_size

uint8_t crypto_parameters_packet_t::nonce_size

Nonce size in bytes (e.g., 24 for XSalsa20).

Definition at line 1055 of file packet.h.

Referenced by crypto_handshake_server_send_parameters(), and crypto_handshake_set_parameters().

◆ reserved

uint8_t crypto_parameters_packet_t::reserved[3]

Reserved bytes for future use (must be zero).

Definition at line 1061 of file packet.h.

◆ selected_auth

uint8_t crypto_parameters_packet_t::selected_auth

Selected authentication algorithm (AUTH_ALGO_*).

Definition at line 1041 of file packet.h.

Referenced by crypto_handshake_server_send_parameters().

◆ selected_cipher

uint8_t crypto_parameters_packet_t::selected_cipher

Selected cipher algorithm (CIPHER_ALGO_*).

Definition at line 1043 of file packet.h.

Referenced by crypto_handshake_server_send_parameters(), and crypto_handshake_set_parameters().

◆ selected_kex

uint8_t crypto_parameters_packet_t::selected_kex

Selected key exchange algorithm (KEX_ALGO_*).

Definition at line 1039 of file packet.h.

Referenced by crypto_handshake_server_send_parameters().

◆ shared_secret_size

uint16_t crypto_parameters_packet_t::shared_secret_size

Shared secret size in bytes (e.g., 32 for X25519).

Definition at line 1053 of file packet.h.

Referenced by crypto_handshake_server_send_parameters(), crypto_handshake_set_parameters(), and send_crypto_parameters_packet().

◆ signature_size

uint16_t crypto_parameters_packet_t::signature_size

Signature size in bytes (e.g., 64 for Ed25519, 3309 for Dilithium3).

Definition at line 1051 of file packet.h.

Referenced by crypto_handshake_server_send_parameters(), crypto_handshake_set_parameters(), and send_crypto_parameters_packet().

◆ verification_enabled

uint8_t crypto_parameters_packet_t::verification_enabled

Server verification enabled flag (1=enabled, 0=disabled).

Definition at line 1045 of file packet.h.

Referenced by crypto_handshake_server_send_parameters(), and crypto_handshake_set_parameters().


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