SH2SC-EDT
Self-Healing Hardware and Software Complex for Encrypted Data Transmission
Loading...
Searching...
No Matches
HelloPacket Struct Reference

Session-open handshake packet (FLAG_SYN). More...

#include <protocol.h>

Data Fields

uint8_t flags
 Frame type — must equal FLAG_SYN (0x01).
 
uint8_t nonce [HELLO_NONCE_SIZE]
 96-bit session nonce for ChaChaPoly per-packet IV derivation.
 

Detailed Description

Session-open handshake packet (FLAG_SYN).

Sent by TX at the start of every melody session to deliver a fresh 12-byte session nonce to RX. The nonce is generated by the CSPRNG (ChaCha20 seeded with hardware entropy) and is unique per session, ensuring each DATA-packet ciphertext is distinct even when the plaintext note repeats across sessions.

Wire layout (13 bytes total, preceded by 2-byte sync preamble):

Byte 0 : flags (FLAG_SYN = 0x01)
Bytes 1–12 : nonce[12] — 96-bit CSPRNG session nonce
const uint8_t FLAG_SYN
Session open — HelloPacket carrying the 12-byte CSPRNG nonce.
Definition protocol.h:45
uint8_t nonce[HELLO_NONCE_SIZE]
96-bit session nonce for ChaChaPoly per-packet IV derivation.
Definition protocol.h:95
uint8_t flags
Frame type — must equal FLAG_SYN (0x01).
Definition protocol.h:94

Definition at line 93 of file protocol.h.

Field Documentation

◆ flags

uint8_t HelloPacket::flags

Frame type — must equal FLAG_SYN (0x01).

Definition at line 94 of file protocol.h.

Referenced by sendHelloPacket().

◆ nonce

uint8_t HelloPacket::nonce

96-bit session nonce for ChaChaPoly per-packet IV derivation.

Definition at line 95 of file protocol.h.

Referenced by sendHelloPacket().


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