ascii-chat 0.11.33
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 981 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 993 of file packet.h.

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

◆ hmac_size

uint8_t crypto_parameters_packet_t::hmac_size

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

Definition at line 1003 of file packet.h.

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

◆ 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 991 of file packet.h.

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

◆ mac_size

uint8_t crypto_parameters_packet_t::mac_size

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

Definition at line 1001 of file packet.h.

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

◆ nonce_size

uint8_t crypto_parameters_packet_t::nonce_size

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

Definition at line 999 of file packet.h.

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

◆ reserved

uint8_t crypto_parameters_packet_t::reserved[3]

Reserved bytes for future use (must be zero)

Definition at line 1005 of file packet.h.

◆ selected_auth

uint8_t crypto_parameters_packet_t::selected_auth

Selected authentication algorithm (AUTH_ALGO_*)

Definition at line 985 of file packet.h.

Referenced by client_crypto_handshake(), crypto_handshake_server_send_parameters(), and server_crypto_handshake().

◆ selected_cipher

uint8_t crypto_parameters_packet_t::selected_cipher

Selected cipher algorithm (CIPHER_ALGO_*)

Definition at line 987 of file packet.h.

Referenced by client_crypto_handshake(), crypto_handshake_server_send_parameters(), and server_crypto_handshake().

◆ selected_kex

uint8_t crypto_parameters_packet_t::selected_kex

Selected key exchange algorithm (KEX_ALGO_*)

Definition at line 983 of file packet.h.

Referenced by client_crypto_handshake(), crypto_handshake_server_send_parameters(), and server_crypto_handshake().

◆ shared_secret_size

uint16_t crypto_parameters_packet_t::shared_secret_size

◆ 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 995 of file packet.h.

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

◆ verification_enabled

uint8_t crypto_parameters_packet_t::verification_enabled

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

Definition at line 989 of file packet.h.

Referenced by client_crypto_handshake(), crypto_handshake_server_send_parameters(), and server_crypto_handshake().


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