PQCaaS Documentation

Post-quantum cryptography in 3 steps. Get your API key, sign your first message, verify.

API Base URL

https://pq-api.cyclecore.ai

Quickstart

01 Get an API Key

bash
curl -X POST https://pq-api.cyclecore.ai/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "name": "Your Name",
    "terms_accepted": true
  }'

Response includes your api_key (shown once) and auto-generated Dilithium3 + Kyber768 key pairs.

02 Sign Your First Message

bash
curl -X POST https://pq-api.cyclecore.ai/v1/sign \
  -H "X-API-Key: pq_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message": "aGVsbG8gd29ybGQ="}'

All messages are base64-encoded. Response includes signature (base64) and public_key (hex).

03 Verify

bash
curl -X POST https://pq-api.cyclecore.ai/v1/verify \
  -H "X-API-Key: pq_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "aGVsbG8gd29ybGQ=",
    "signature": "THE_SIGNATURE"
  }'

Returns {"valid": true} if the signature is valid.

SDKs

Python
pip install cyclecore-pq
Node.js (planned)
npm install @cyclecore/pq
Python SDK Usage
from cyclecore_pq import CycleCoreClient

client = CycleCoreClient("pq_live_YOUR_KEY")

# Sign
result = client.sign(b"hello world")
print(result.signature)

# Verify
valid = client.verify(b"hello world", result.signature)
print(valid)  # True

# Encrypt
encrypted = client.encrypt(b"sensitive data")
decrypted = client.decrypt(encrypted.ciphertext)

API Reference

Signing & Verification

Endpoint Description
POST /v1/signSign a message (Dilithium3)
POST /v1/verifyVerify a signature
POST /v1/sign/batchSign up to 1,000 messages

Encryption

Endpoint Description
POST /v1/encryptEncrypt data (Kyber768 + AES-256-GCM)
POST /v1/decryptDecrypt data
POST /v1/encrypt/batchEncrypt up to 1,000 plaintexts

Key Exchange

Endpoint Description
POST /v1/handshake/initStart post-quantum key exchange
POST /v1/handshake/respondRespond to key exchange
POST /v1/handshake/finishComplete exchange, get shared secret

Attestation

Pro+
Endpoint Description
POST /v1/attestAdd entry to attestation chain
POST /v1/attest/verifyVerify chain integrity
POST /v1/attest/exportExport chain for audit

Keys & Utility

Endpoint Description
GET /v1/keysGet your public keys
POST /v1/keys/rotateRotate key pairs
GET /v1/usage/statsUsage statistics
GET /healthHealth check

Authentication & Errors

Authentication

Include your API key in every request:

X-API-Key: pq_live_YOUR_KEY

Rate limit headers:

  • X-RateLimit-Limit
  • X-RateLimit-Remaining
  • X-Usage-Percent

Error Codes

Code Description
400Validation error (bad base64, missing fields)
401Invalid or missing API key
429Rate limit exceeded (includes Retry-After header)

Ready to Build?

Register for a free API key and start signing in under a minute.