Triple Key API
Post-quantum multi-layer digital signatures combining Ed25519 + Dilithium-5 (ML-DSA-87) + FALCON-512 into a single unified signing and verification API. Three algorithms, one API call.
Overview
The Triple Key API generates keypairs, signs, and verifies using three independent signature algorithms in one call: Ed25519 (classical), Dilithium-5 / ML-DSA-87 (FIPS 204), and FALCON-512 (FN-DSA, FIPS 206 draft). A composite signature verifies only if all three layers pass, so an attacker must break three unrelated hardness assumptions at once. This is the signing primitive H33 uses to produce the portable 74-byte post-quantum attestation — the small, self-contained proof-of-signature that can be verified independently of H33 infrastructure.
Use it when you need a signature that stays trustworthy through the post-quantum transition and whose validity a third party can confirm without trusting your servers. Use a different H33 component when: you need to protect an existing API key or secret at point of use → H33-Key; you need to compute on data while it stays encrypted → FHE Platform; you need to prove a fact without revealing the underlying data → ZK Platform. To independently validate a signature, see Verification.
Authentication
All requests to the Triple Key API require an API key passed via the X-API-Key header. You can generate an API key from your dashboard.
h33_demo_triple_key_public for testing. Limited to 100 operations per day. Do not use in production.Example Request
Error Codes
The API uses standard HTTP status codes. All error responses include a JSON body with error and message fields.
| Status | Error Code | Description |
|---|---|---|
400 |
invalid_base64 |
Request contains malformed base64 data |
400 |
key_not_found |
The specified key_id does not exist |
400 |
invalid_security_level |
security_level must be standard, high, or critical |
400 |
missing_field |
A required field is missing from the request body |
400 |
key_revoked |
The specified key has been revoked |
401 |
unauthorized |
Missing or invalid API key |
500 |
internal |
Unexpected server error. Contact support if persistent |
Generate Keypair
Generate a new Triple Key keypair. Creates linked Ed25519, Dilithium-5 (ML-DSA-87), and FALCON-512 key material. The private keys are stored server-side in an HSM-backed vault. Public keys are returned in the response.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
label |
string | optional | Human-readable label for the keypair |
security_level |
string | optional | standard | high | critical. Defaults to standard |
rotation_period_days |
integer | optional | Auto-rotation period in days. Defaults to 90 |
Example Request
Response
| Field | Type | Description |
|---|---|---|
key_id |
string | Unique identifier for the keypair |
ed25519_public_key |
string | Ed25519 public key (base64) |
dilithium_public_key |
string | Dilithium-5 public key (base64, 2592 bytes) |
falcon_public_key |
string | FALCON-512 public key (base64, 897 bytes) |
security_level |
string | Applied security level |
rotation_period_days |
integer | Configured rotation period |
created_at |
string | ISO 8601 timestamp |
latency_us |
integer | Server-side latency in microseconds |
Example Response
Sign Message
Sign a message with all three algorithms in a single API call. The message is signed with Ed25519, Dilithium-5, and FALCON-512 sequentially, producing a unified composite signature.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
key_id |
string | required | The keypair identifier returned from /generate |
message_b64 |
string | required | Base64-encoded message to sign (max 10MB) |
Example Request
Response
| Field | Type | Description |
|---|---|---|
signature_b64 |
string | Composite signature (base64). Contains Ed25519 + Dilithium + FALCON signatures concatenated |
version |
string | Signature format version (e.g. "1.0") |
algorithm |
string | Always "triple-key-v1" |
key_version |
integer | Key version used for signing (increments on rotation) |
latency_us |
integer | Server-side latency in microseconds |
Example Response
Verify Signature
Verify a Triple Key composite signature against a message. All three signature layers (Ed25519, Dilithium-5, FALCON-512) are verified independently. The signature is valid only if all three layers pass.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
message_b64 |
string | required | Base64-encoded original message |
signature_b64 |
string | required | Composite signature from /sign endpoint |
ed25519_public_key |
string | required | Ed25519 public key (base64) |
dilithium_public_key |
string | required | Dilithium-5 public key (base64) |
falcon_public_key |
string | required | FALCON-512 public key (base64) |
Example Request
Response
| Field | Type | Description |
|---|---|---|
valid |
boolean | true if all three layers verified successfully |
algorithm |
string | Always "triple-key-v1" |
layers_verified |
array | List of algorithms that passed verification |
latency_us |
integer | Server-side latency in microseconds |
Example Response
Configure Rotation
Configure the automatic key rotation policy for a Triple Key keypair. Security level determines rotation frequency and whether NFT-binding is enabled for audit trails.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
key_id |
string | required | The keypair identifier |
security_level |
string | required | standard (90 days) | high (30 days) | critical (7 days) |
Example Request
Response
| Field | Type | Description |
|---|---|---|
status |
string | Always "configured" on success |
rotation_period_days |
integer | Effective rotation period based on security level |
nft_binding |
boolean | Whether rotation events are anchored on-chain |
Example Response
critical level rotates keys every 7 days and creates an on-chain NFT audit trail for each rotation event. This incurs additional blockchain transaction fees.Rotation Status
Check the current rotation status of a keypair. Returns whether the key needs rotation, the current version, and the next scheduled rotation date.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
key_id |
string | required | The keypair identifier |
Example Request
Response
| Field | Type | Description |
|---|---|---|
key_id |
string | The keypair identifier |
key_version |
integer | Current key version number |
needs_rotation |
boolean | true if the key has exceeded its rotation period |
rotation_in_progress |
boolean | true if a rotation is currently being executed |
next_rotation |
string | ISO 8601 timestamp of next scheduled rotation |
last_rotated |
string | ISO 8601 timestamp of most recent rotation |
Example Response
Execute Rotation
Manually trigger an immediate key rotation. New key material is generated for all three algorithms. Previous key versions remain available for signature verification but can no longer sign new messages.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
key_id |
string | required | The keypair identifier |
reason |
string | optional | Reason for manual rotation (logged in audit trail) |
Example Request
Response
| Field | Type | Description |
|---|---|---|
status |
string | "rotated" on success |
rotation_id |
string | Unique rotation event identifier |
new_key_version |
integer | The new key version number |
ed25519_public_key |
string | New Ed25519 public key (base64) |
dilithium_public_key |
string | New Dilithium-5 public key (base64) |
falcon_public_key |
string | New FALCON-512 public key (base64) |
latency_us |
integer | Server-side latency in microseconds |
Example Response
Rotation History
Retrieve the complete rotation history for a keypair. Returns a chronological list of all rotation events, including the reason, trigger type, and version transitions.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
key_id |
string | required | The keypair identifier |
Example Request
Response
| Field | Type | Description |
|---|---|---|
key_id |
string | The keypair identifier |
current_version |
integer | Current active key version |
events |
array | Array of rotation event objects |
events[].rotation_id |
string | Unique rotation event identifier |
events[].from_version |
integer | Previous key version |
events[].to_version |
integer | New key version after rotation |
events[].trigger |
string | "manual" | "scheduled" | "policy" |
events[].reason |
string | Reason for rotation (if provided) |
events[].timestamp |
string | ISO 8601 timestamp of rotation |
Example Response
Code Examples
Complete working examples for the generate, sign, and verify flow in multiple languages.
curl
Python
Node.js
Rust
FAQ
What does the Triple Key API do?
It generates a linked keypair, signs a message with Ed25519 + Dilithium-5 (ML-DSA-87) + FALCON-512 in one call, and verifies the resulting composite signature. All three layers must verify for the signature to be valid.
What's the minimal call to get started?
POST /api/v1/triple-key/generate with your X-API-Key header returns a keypair; then /sign and /verify use it. The demo key h33_demo_triple_key_public allows 100 operations per day for testing (not for production).
What doesn't it do?
It signs and verifies; it does not encrypt data, does not compute over ciphertext (that's FHE), and does not prove statements without revealing them (that's ZK). It is a multi-algorithm signature API, not a key-management vault.
How is it different from H33-Key?
H33-Key controls how an existing secret is used without exposing its plaintext. Triple Key produces signatures from key material it generates and stores server-side. Use H33-Key to protect a Stripe or cloud key; use Triple Key to sign artifacts with post-quantum durability.
Why three algorithms instead of one?
Defense in depth. Ed25519, Dilithium-5, and FALCON-512 rest on independent hardness assumptions (classical ECC, Module-LWE, and NTRU lattices). A break in one does not compromise the others; a valid composite signature requires all three to pass.
Is FALCON a finalized standard?
FALCON is being standardized as FN-DSA under FIPS 206, which is still in draft. Dilithium-5 corresponds to ML-DSA-87 (FIPS 204). Treat maturity claims as scoped to those standards' status.