Skip to main content

Post-Quantum Addresses

POSITRONIC introduces addresses whose spending key is an ML-DSA-44 signature key (FIPS 204), the NIST post-quantum standard. They are built on AuthScript witness v1 outputs and coexist with classical addresses: the same wallet can hold both, and a transaction can mix legacy, post-quantum and asset inputs.

Address derivation

BIP39mnemonic→ 64-byte seedBIP32master key,child on the PQ pathm/100'/coin'/0'/0/iML-DSA-44keypair seeded bythe 32-byte child keyserialize0x05 ‖ pubkey1312-byte public keyhash160RIPEMD160(SHA256)20 bytesBech32mwitness v1 addressnq1… / tnq1…
StepDetail
SeedStandard BIP39 mnemonic and 64-byte seed
HD pathm/100'/1900'/0'/0/i on mainnet, m/100'/1'/0'/0/i on testnet and regtest. Chain 1 is change. Purpose 100' is reserved for PQ
Key generationThe 32-byte private key of the BIP32 child seeds a deterministic ML-DSA-44 keypair
Public keySerialized as 0x05 followed by the 1312-byte ML-DSA-44 public key
AddressBech32m witness version 1 over hash160(serialized public key). Human-readable part nq on mainnet and tnq on testnet and regtest

Because derivation is deterministic from the mnemonic, a post-quantum account has the same backup story as a classical one (NIP-022). PQ private keys are not WIF-compatible, so they cannot be swept into a legacy wallet.

Spending

A post-quantum output is an AuthScript commitment with auth type 0x01. Spending reveals the auth type, the ML-DSA-44 signature, the public key and the witness script. The node recomputes the commitment, verifies the signature and then runs the script. See Covenants and opcodes.

SizeBytes
ML-DSA-44 public key1312
ML-DSA-44 signatureabout 2420
Maximum PQ script element3072

Node and wallet support

  • Consensus: ML-DSA-44 verification in witness v1, larger script elements and stack limits when the covenant flags are active (NIP-018).
  • Policy: mempool and relay accept the larger witness items, and signing RPCs verify with the same flags as consensus (NIP-020, NIP-021).
  • Wallet and RPC: PQ keys in the keystore, address decoders, deterministic derivation and signing RPCs (NIP-019, NIP-022).
  • Mixed transactions: legacy, PQ and asset inputs can be combined in one transaction. Asset transfers to PQ addresses are non-replaceable (NIP-025).
  • Script: OP_CHECKSIGFROMSTACK and OP_CHECKSIGADD accept ML-DSA-44 keys, so oracles and threshold scripts can be post-quantum as well.

Activation

Post-quantum witness verification is active on testnet and regtest and inactive on mainnet. Wallets already recognize the nq and tnq formats so that they are ready when mainnet activates.

Reference

The derivation and encoding details for library implementers, including test vectors, are in the node repository under NIP/ (post-quantum address technique, PQ-HD derivation, mixed transactions).