# Post-quantum signatures for a blockchain project

For a protocol, validator or wallet team. Blockchains depend on signatures more than on anything else: accounts, validators, bridges and governance all rest on ECDSA (secp256k1) or EdDSA, which a large quantum computer could forge. Aegis gives you post-quantum keys and signatures today. It does not change your chain: accepting a new signature scheme on chain is a protocol upgrade only your community can make. This guide separates the two.

> **Hand it to your agent:**
>
> The [blockchain prompt](https://docs.qblackbit.com/prompts/blockchain.md) briefs a coding agent to do the inventory, the release signing and an off-chain prototype, with new test keys only.

## What Aegis offers

| | Aegis Cloud | Aegis Core |
| --- | --- | --- |
| ML-DSA (FIPS 204) | `ml-dsa-65` on Free; `ml-dsa-44`, `-65`, `-87` on Pro | All three |
| SLH-DSA (FIPS 205) | Six sets on Pro | All twelve |
| Composite ML-DSA (ML-DSA with ECDSA or EdDSA in one signature) | (Planned) | 16 sets |
| Existing secp256k1 and Ed25519 signatures | No | Verification (`POST /v1/tools/verify`); Ed25519 keys for signing too |

## 1. Inventory the keys

List every key that signs, with its algorithm, where it lives, how often it signs and what verifies it: user wallets, validator or block-producer keys, bridge and multisig keys, governance keys, node-to-node transport keys, and the keys that sign your node and wallet releases.

## 2. Start where the chain does not change: releases

Release signing moves today, with no protocol change. Create an ML-DSA-65 key in Aegis Cloud and sign the release's checksums file:

```bash
curl -sS -X POST "$AEGIS_URL/api/v1/keys" -H "Authorization: Bearer $AEGIS_API_KEY" \
  -H "Content-Type: application/json" -d '{"name": "node-releases", "algorithm": "ml-dsa-65"}'
sha256sum node-v1.2.3-* > SHA256SUMS
curl -sS -X POST "$AEGIS_URL/api/v1/keys/node-releases/sign" -H "Authorization: Bearer $AEGIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"message\": \"$(base64 < SHA256SUMS | tr -d '\n')\"}" | jq -r .signature | base64 -d > SHA256SUMS.mldsa65.sig
```

Publish `SHA256SUMS.mldsa65.sig` and the public key (`GET /api/v1/keys/node-releases/public`) beside your current release signature, and keep both. Users and package maintainers can check the ML-DSA signature with any FIPS 204 implementation, or with `POST /api/v1/keys/node-releases/verify`.

## 3. Prototype on-chain signatures off chain

With new test keys only, define a transaction that carries two signatures over the same bytes: the existing secp256k1 or Ed25519 signature, and an ML-DSA-65 signature. Verify the ML-DSA part with Aegis and with an independent implementation inside your client, so the format never depends on one vendor. Then measure what changes:

| Signature | Public key | Signature |
| --- | --- | --- |
| secp256k1 ECDSA (today) | 33 bytes, compressed | 64 to 72 bytes |
| ML-DSA-44 | 1,312 bytes | 2,420 bytes |
| ML-DSA-65 | 1,952 bytes | 3,309 bytes |
| SLH-DSA-SHA2-128s | 32 bytes | 7,856 bytes |

Sizes are from FIPS 204 and FIPS 205. Measure transaction and block size, bandwidth, storage growth and verification time in your client, and record how you measured each.

## 4. Write the protocol proposal

Your proposal, not Aegis, decides:

- Which accounts and validators sign with what, and whether a hybrid (classical plus post-quantum) is required during the transition.
- How a key migrates, for example a classically signed transaction that registers the account's post-quantum public key before a deadline.
- When classical-only signatures stop being accepted, and how old signatures and lost keys are treated.
- How validators hold their new keys, and how the size increase is paid for.

## 5. Validators and custody

Keep validator and custody keys where they are today while you prototype on a test network. Aegis Core can hold post-quantum signing keys in its vault under dual control, with every signature in the audit chain; keys held in an HSM are (Planned).

## Rules for this work

- Never move, import, export or expose a key that holds funds or stake. Use new test keys.
- Never broadcast a test transaction to a main network.
- Keep every classical path working until the new one is verified and the protocol change is live.

## Planned, not available yet

- SDKs: (Planned). Aegis offers no chain-specific SDK or wallet integration.
- Composite ML-DSA in Aegis Cloud: (Planned) (Aegis Core has it).
- HSM-held keys for validators in Aegis Core: (Planned).
