Repository navigation
Key ID and Key Derivation
This page describes encrypted key IDs, format revision 7. The repository format specification is maintained alongside the implementation.
Both stubs need the same 32-byte PSK and SAE numeric assignments. The public ID is a single AES-256 ciphertext block in lowercase, hyphenated UUID notation. Uppercase input is accepted. Its version/variant fields match UUIDv4, but its collision budget is smaller than an ordinary UUIDv4 generator's 122 random bits.
For the computational key-secrecy claim, assumptions and conditional proof sketch, see Computational security without QKD. SHA preimage resistance alone is not the security argument for this HKDF construction.

Download the editable three-page draw.io source.
Two-byte integers are unsigned big-endian; offsets are zero-based.
| Bytes | Contents |
|---|---|
| 0–1 | Key length in bytes, 1–8192 |
| 2–3 | Master SAE code |
| 4–5 | Slave SAE code |
| 6–14 | 72 OS-random bits, with no reserved version/variant bits |
| 15 | One-byte keyed checksum |
The server binary always issues with the nonzero codes of the authenticated SAE pair and checks the decrypted codes on retrieval against the certificate's slave SAE and the URL's master SAE. Only the library's registry-less mode (used by Rust API tests, not reachable from the CLI) issues zero for both SAE codes.

Concatenation is denoted by
For readability,
Accept (C[6] >> 4) == 4 and (C[8] >> 6) == 2.
Otherwise replace all nine random bytes, recompute the checksum, and encrypt
again. Never overwrite ciphertext bits. Acceptance probability is approximately
Retrieval validates the external representation and version/variant, decrypts once, validates length and checksum, then performs SAE authorization. Invalid IDs return HTTP 400; valid IDs for another pair return HTTP 401. Batches remain atomic. Keys are derived from the accepted ciphertext, including all 128 bits.
Filtering leaves approximately
The checksum is not authentication or proof of issuance. Conditional on a
plausible decrypted length, a wrong PSK passes this 8-bit check with probability
about
Authorized repeat retrieval of the same ID returns the same key while the PSK remains unchanged, including after a restart. This supports retries; retrieval does not consume the ID, and IDs do not expire. The stub keeps no issuance history.
PSK-derived keys do not have forward secrecy. PSK holders can recover metadata and keys; observers may still learn communication partners through endpoints, request paths or traffic patterns.
Previous plaintext UUIDv8 IDs and older formats are rejected. Upgrade both servers and obtain new IDs. Revision v7 in labels is unrelated to UUIDv7. The older UUID layout and key-derivation PNGs are historical, not this format.
PSK: 32 bytes of 07. Each vector has a 32-byte output key. The Python HTTPS test reproduces these using OpenSSL AES and Python HMAC.
| Plaintext (hex) | Public ID | Key (Base64) |
|---|---|---|
| 0020000000000000000000000000070e | ab531e5f-28fd-4f93-b7cf-f49a723babac | 29dcgpL9WDwAf/0CfUUAm5JptfBv9w7mr7mvu0ZYfo8= |
| 00200001000200000000000000002807 | 0a142bd6-b238-400c-9bf3-3dc2cdef20fd | GuyWf9LhOQDfzpjOFM9DVYYa2UWRk3b5RtZchFiK1jE= |
The original diagram is preserved below for reference. It describes the previous plaintext UUIDv8 format, not the current encrypted v7 format described above.

The original editable draw.io poster contains the diagram source embedded in the PNG. Download that file and open it in draw.io to edit it.