Module handshake

Source
Expand description

Secure handshake protocol implementation using Elliptic Curve Diffie-Hellman (ECDH)

This module implements a secure cryptographic handshake based on x25519-dalek with protection against replay attacks using timestamped nonces.

Functions§

clear_handshake_data
Clears handshake data for clean test runs
client_derive_session_key
In test mode, can accept an explicit nonce for testing purposes
client_handshake_initDeprecated
Legacy client handshake function for compatibility Now uses the secure handshake implementation
client_secure_handshake_init
Initiates secure handshake from the client side. Generates a new key pair and nonce for the client.
client_secure_handshake_verify
Client verifies server response and sends verification message
server_secure_handshake_finalize
Server verifies client’s confirmation and finalizes the handshake
server_secure_handshake_response
Generates server response to client handshake initialization. Validates client timestamp, generates server key pair and nonce, and returns verification data.
verify_timestamp
Verify that a timestamp is recent enough Default threshold is 30 seconds