ksp explain
ksp explain
Command ReferenceExplain any KSP error code, frame type, header flag, or RFC specification concept in plain English.
Protocol Utilities
Purpose
Explain any KSP error code, frame type, header flag, or RFC specification concept in plain English.
Syntax
Command-line specificationbash / powershell
ksp explain <TOPIC_OR_ERROR_CODE>
Arguments
| Argument | Description |
|---|---|
| <TOPIC_OR_ERROR_CODE> | Error code (e.g., `ERR_REPLAY_DETECTED` or `0x04`) or topic (`handshake`, `hkdf`). |
Example Usage
Example command
ksp explain ERR_REPLAY_DETECTED
Expected Output
════════════════════════════════════════════════════════════
══ KSP Protocol Explanation Engine ══
════════════════════════════════════════════════════════════
Topic: ERR_REPLAY_DETECTED (Error Code: 0x0004)
Description:
This error occurs when a receiving KSP endpoint detects a packet sequence
number that has either already been processed or falls completely behind the
current sliding replay protection window (1024 packets).
Why it happens:
1. A malicious attacker is replaying intercepted wire frames.
2. Extreme network packet reordering across multiple ISP hops.
3. Sequence counter desynchronization between client and server.
How to resolve:
- If testing over lossy networks, increase window via `ksp config --window 2048`.
- If persistent, execute `ksp session reset` to renegotiate fresh keys.Implementation Notes
An invaluable interactive learning companion built right into the command line to demystify complex cryptography terms.