Module noise

Module noise 

Source
Expand description

Noise IK encrypted IPC transport (ADR-SEC-006).

Provides forward-secret, mutually-authenticated encryption for all IPC traffic using the Noise Protocol Framework (IK pattern) via snow.

Pattern: Noise_IK_25519_ChaChaPoly_BLAKE2s

  • IK: initiator’s static key transmitted, responder’s static key pre-known
  • X25519 DH, ChaCha20-Poly1305 AEAD, BLAKE2s hash
  • 2-message handshake (1 round-trip), then forward-secret transport

UCred (PID + UID) is bound into the Noise prologue so that both sides must agree on the peer identity — cryptographically binding the OS-level transport identity to the encrypted channel.

Noise transport messages are limited to 65535 bytes. Application frames up to 16 MiB are chunked into multiple Noise messages with a chunk-count header.

Key management (generation, persistence, tamper detection) lives in noise_keys.

Structs§

NoiseTransport
Encrypted IPC transport wrapping a completed Noise session.
ZeroizingKeypair
Zeroize-on-drop wrapper for snow::Keypair.

Functions§

client_handshake
Perform the client-side (initiator) Noise IK handshake.
create_keys_dir
Create the per-daemon keys directory if it does not exist.
generate_keypair
Generate a new X25519 static keypair for Noise IK.
read_bus_public_key
Read the bus server’s public key from the runtime directory.
read_bus_public_key_from
Read the bus server’s public key from a specific directory.
read_daemon_keypair
Read a daemon’s keypair from disk. Private key wrapped in Zeroizing.
read_daemon_public_key
Read only a daemon’s public key from disk.
server_handshake
Perform the server-side (responder) Noise IK handshake.
write_bus_keypair
Write the bus server’s static keypair to the runtime directory.
write_daemon_keypair
Write a daemon’s keypair to disk. Private key gets 0600, public key gets 0644.