HID Protocol
Overview
Section titled “Overview”The Crypt-in dongle presents as a USB HID vendor-defined device.
- VID:
0x303A(Espressif) - PID:
0x8123 - Usage Page:
0xFF00 - Report size: 64 bytes (1 byte Report-ID + 63 bytes payload)
- Report-ID:
1
Command Set
Section titled “Command Set”| Command | Code | Input | Output |
|---|---|---|---|
| PING | 0x01 |
— | 8B magic "CRYPTIN\0" |
| GET_PUBKEY | 0x02 |
— | 32B K_identity pubkey |
| CHALLENGE | 0x03 |
32B nonce | 64B Ed25519 signature (2 reports) |
| DERIVE_SESSION_KEY | 0x04 |
32B nonce | 32B derived key |
| X25519_DH | 0x05 |
32B external pubkey | 32B ECDH result |
| GET_ATTESTATION_PUBKEY | 0x06 |
— | 32B K_attestation pubkey |
Report Format
Section titled “Report Format”Request:
[0x01][command][payload...][padding to 64 bytes]Response:
[0x01][command_echo][status][data...]Key Hierarchy
Section titled “Key Hierarchy”- K_root — Root secret. Never leaves the chip.
- K_identity — Ed25519 keypair derived from K_root. Recoverable from BIP-39 seed.
- K_attestation — Hardware entropy keypair. Not recoverable. Unique per physical chip.
- K_session — Ephemeral key derived from K_root per session.
- K_file — AES-256-GCM key derived from K_session + per-file salt.