Get started

Introduction

In development. These pages describe the planned API. Endpoint and field names may change before launch.

What Qurebit does

Qurebit is an HTTPS API for post-quantum cryptography. It handles three jobs for a DeFi app: signing and verifying, sealing and opening data, and managing the keys behind both.

Your app, bot or relayer
Qurebit API
SignaturesML-DSA, SLH-DSAEncryptionML-KEM, AES-256-GCMKeyscreate, rotate, retire

Every algorithm it uses is a finalized NIST standard: ML-DSA (FIPS 204) and SLH-DSA (FIPS 205) for signatures, and ML-KEM (FIPS 203) for key exchange.

Where it fits

Chains verify ECDSA for transactions today, and Qurebit does not change that. It protects what your app signs and encrypts around the chain: orders, intents, oracle reports, relayer messages, backups and the calls between your own services.

Where to go next

Start with the quickstart to sign and verify your first message, then read core concepts to pick parameter sets.

Get started

Quickstart

Create a signing key

Every call needs an API key in the Authorization header. Create an ML-DSA key and keep the returned key_id.

Create a keySignVerify
Request
POST /v1/keys
Authorization: Bearer $QUREBIT_API_KEY
{
  "algorithm": "ml-dsa-65"
}
Response
201 Created
{
  "key_id": "key_7Hc2",
  "algorithm": "ml-dsa-65",
  "public_key": "0x3e9d…b28a"
}

Sign a message

Send the message as hex. Set hybrid to also get an ECDSA signature from the same call.

Request
POST /v1/sign
Authorization: Bearer $QUREBIT_API_KEY
{
  "key_id": "key_7Hc2",
  "message": "0x4f72646572202332303831",
  "hybrid": true
}

Verify it

Anyone with the public key can verify, through the API or with any library that implements FIPS 204.

Request
POST /v1/verify
{
  "public_key": "0x3e9d…b28a",
  "message": "0x4f72646572202332303831",
  "signature": "0x9a3c…e71f"
}

Get started

Core concepts

Keys and key IDs

Qurebit keys are addressed by ID. A key has an algorithm and one or more versions; rotating creates a new version without changing the ID, so your code keeps working.

Parameter sets

Each algorithm comes in parameter sets that trade size for strength. NIST groups them into security categories from 1 to 5.

Parameter setStandardUseSecurity category
ml-dsa-44FIPS 204Signatures2
ml-dsa-65FIPS 204Signatures3
ml-dsa-87FIPS 204Signatures5
slh-dsa-128sFIPS 205Signatures1
ml-kem-512FIPS 203Key exchange1
ml-kem-768FIPS 203Key exchange3
ml-kem-1024FIPS 203Key exchange5
Highlighted rows are the defaults. Categories are NIST's, from 1 (lowest) to 5.

Hybrid by default

New signing keys are created in hybrid mode, which pairs the post-quantum signature with an ECDSA one. See hybrid mode for how verification decides.

Signatures

Signing

How signing works

You send a message and a key ID. Qurebit signs with the key's current version and returns the signature, the algorithm and the key version used.

Message0x4f72…3831key_7Hc2ml-dsa-65Signature3,309 bytes

Request fields

  • key_idThe signing key.
  • messageHex-encoded bytes to sign.
  • hybridAlso return an ECDSA signature. Defaults to the key's setting.
  • contextOptional context string, as defined in FIPS 204, to bind a signature to one use.

Signatures

Hybrid mode

The rule

In hybrid mode a message carries two signatures, one classical and one post-quantum. A verifier accepts it only when both are valid.

ML-DSA validML-DSA invalid ECDSA validAcceptedRejected ECDSA invalidRejectedRejected
How a verifier decides in hybrid mode.

Why it helps

An attacker who breaks ECDSA, for example with a future quantum computer, still cannot produce the ML-DSA signature. An unexpected flaw in a newer algorithm is covered the same way by ECDSA.

Dropping the classical half

When your verifiers no longer need ECDSA, switch the key to post-quantum only. The key ID stays the same.

Signatures

Verifying

Verify through the API

Send the public key, the message and the signature. The response says whether it is valid and which algorithm checked it.

Signature formatmatches ml-dsa-65
Public keykey_7Hc2, version 2
Messageunchanged
Resultvalid

Verify anywhere

Signatures follow the FIPS standards, so any library that implements them can verify without calling Qurebit, for example the Open Quantum Safe project's liboqs.

Encryption

Key exchange

The flow

ML-KEM gives two parties the same 32-byte secret. One side publishes an encapsulation key, the other encapsulates to it and sends back a ciphertext, and the first side decapsulates it.

Your appCounterparty
encapsulation key1,184 bytes
ciphertext1,088 bytes
shared secret, 32 bytesshared secret, 32 bytes
Sizes for ml-kem-768, from FIPS 203.

The calls

Request
POST /v1/kem/encapsulate
{
  "public_key": "0x77c1…0d5e",
  "algorithm": "ml-kem-768"
}

Encapsulate returns the ciphertext and the shared secret. The holder of the key calls /v1/kem/decapsulate with the ciphertext to get the same secret.

Encryption

Sealing data

Seal for a key

Seal runs ML-KEM and AES-256-GCM in one call: it encapsulates to the recipient's key and encrypts your data under the shared secret.

KEM ciphertext1,088 BNonce12 BEncrypted datayour lengthTag16 B
What a sealed payload carries with ml-kem-768 and AES-256-GCM. Widths are not to scale.

Open it

Request
POST /v1/open
{
  "key_id": "key_Q81x",
  "sealed": "0xd04e…19ab"
}

Only the holder of the recipient key can open it. Changing any byte makes the open fail.

Reference

API overview

In development. These pages describe the planned API. Endpoint and field names may change before launch.

Basics

The API takes and returns JSON over HTTPS. Authenticate with Authorization: Bearer and your API key. Binary values are hex strings starting with 0x.

Endpoints

POST/v1/keysCreate a key
GET/v1/keys/{id}Read a key and its public key
POST/v1/keys/{id}/rotateRotate to a new version
POST/v1/signSign a message
POST/v1/verifyVerify a signature
POST/v1/kem/encapsulateEncapsulate to a public key
POST/v1/kem/decapsulateDecapsulate a ciphertext
POST/v1/sealSeal data for a key
POST/v1/openOpen sealed data

Reference

Errors

Error shape

Response
400 Bad Request
{
  "error": {
    "code": "invalid_request",
    "message": "message must be a hex string"
  }
}

Codes

StatusCodeMeaning
400invalid_requestA field is missing or has the wrong format.
401unauthorizedThe API key is missing or not valid.
404key_not_foundNo key with that ID exists in your account.
409algorithm_mismatchThe signature or ciphertext does not match the key's algorithm.
429rate_limitedToo many requests. Wait and retry.