Skip to main content

Overview

Qustody keeps your private keys outside the custody service. The service prepares unsigned transactions, and you sign them in your own secure environment using quantum-safe cryptography. This is the most critical integration point. Get this right, and everything else flows automatically.

The signing flow

Step-by-step

1. Create a transfer

If no policies block it, the transaction moves to PENDING_SIGNATURE.

2. Retrieve the signing payload

Response
The signingHash is a 32-byte Keccak256 digest (hex-encoded as a 66-character string including 0x prefix). This is what you sign.

3. Sign with your quantum-safe key

Sign the hash bytes using your quantum-safe private key in your secure environment (HSM, KMS, or key vault). The signing operation takes the 32-byte hash digest as input and produces a post-quantum signature. Use the SDK or tooling provided during onboarding for your specific key management setup.
Success Response
After submission, the service:
  1. Validates the quantum-safe signature against the signing hash
  2. Verifies the public key matches the registered wallet
  3. Assembles the signed transaction
  4. Broadcasts to the Quantum Chain network
  5. Tracks confirmations until the required depth is reached

What happens on failure

Security considerations

Signing should happen in an air-gapped HSM, AWS KMS, Azure Key Vault, or similar isolated environment. The signing hash is all that leaves the custody service.
Before signing, your backend can independently reconstruct the expected transaction hash from the parameters (destination, amount, nonce, gas) to verify the custody service hasn’t been tampered with.
For high-throughput systems, don’t block on signing. Instead:
  1. Create the transfer
  2. Listen for the transaction.status_changed webhook (status = PENDING_SIGNATURE)
  3. Fetch the signing payload
  4. Sign and submit asynchronously
When you register a wallet, the API requires a signature proving you control the private key. The challenge is deterministic: Keccak256("qustody:register:" + lowercase_address). Sign this 32-byte digest with your quantum-safe key and include the hex-encoded signature in the registration request. See Vaults and wallets for the full flow.