# Quantum safety

> Large quantum computers could forge today's signatures. Pearl's rules support post-quantum XMSS and P2MR, but they are opt-in, not the default.

Source: https://pearlcodex.com/beginners/quantum-safety/ · Last updated: 2026-11-02 · Checked against Pearl's source code at v1.5.5

Every key on this site so far rests on one assumption: nobody can work backwards from a public key to its private key.

Quantum computers could, in principle, break that assumption. This page explains the threat, what Pearl has built against it, and, just as important, what is and isn’t switched on today.

## What is a quantum computer?

A [quantum computer](https://pearlcodex.com/glossary/#quantum-computer) uses quantum physics to compute in a fundamentally different way. It isn’t faster at everything. It is enormously faster at a handful of specific math problems.

Unfortunately, one of those problems is exactly the one elliptic-curve keys rely on.

## What could one break?

**Signatures.** A large enough quantum computer, running a method called Shor’s algorithm, could compute a private key from its public key on curves like secp256k1. With the private key, it could sign anything, including transactions that spend your coins.

**Hashes, much less.** Hash functions such as SHA-256 and BLAKE3 hold up far better. The best known quantum attacks weaken them somewhat, but don’t break them.

**When?** Nobody knows. Machines anywhere near large enough haven’t been shown publicly. The worry is about the long term, and about coins that sit untouched for years.

## Where is your public key exposed?

Remember from the keys page: a normal Pearl address, starting `prl1p`, contains a public key itself, slightly tweaked.

So a strong enough quantum computer could, in principle, attack a Taproot address straight from the blockchain, even if its coins had never been spent. That’s equally true of Taproot addresses on Bitcoin.

## What is XMSS?

[XMSS](https://pearlcodex.com/glossary/#xmss) is a signature scheme built only from hash functions. Since hash functions resist quantum attacks, XMSS is believed to be [post-quantum](https://pearlcodex.com/glossary/#post-quantum): safe even against large quantum computers.

It comes with two trade-offs.

**A limited number of signatures.** Picture a booklet of single-use stamps. Each stamp can sign exactly once, and the booklet is bound together, using a Merkle tree, so that one public key covers every stamp. Pearl’s booklets hold 32 stamps. Using a stamp twice would leak the key, so the software must keep careful track.

**Big signatures.** An XMSS signature is 2,340 bytes. A Schnorr signature is 64.

|                                  | Schnorr (the default) | XMSS (optional)     |
| -------------------------------- | --------------------- | ------------------- |
| Built from                       | elliptic curves       | hash functions only |
| Signature size                   | 64 bytes              | 2,340 bytes         |
| Public key size                  | 32 bytes              | 64 bytes            |
| Signatures per key               | unlimited             | 32                  |
| Against a large quantum computer | could be broken       | believed safe       |

**Make a guess:** Why can’t you keep using one XMSS key forever, like a normal key?

**Answer:** Each key holds only 32 one-time signatures.

An XMSS key is really a bundle of one-time keys under a single public key. Each one-time key may sign only once; signing twice with the same one would give away enough to forge signatures. After 32 signatures the bundle is used up, and the coins should move to a new key.

## How does Pearl use XMSS?

Pearl adds a new instruction to its Script language: [OP_CHECKXMSSSIG](https://pearlcodex.com/glossary/#op-checkxmsssig), opcode 0xde. It checks an XMSS signature inside an output’s hidden spending rules. Bitcoin has no such instruction.

Pearl also supports [P2MR](https://pearlcodex.com/glossary/#p2mr) outputs, with addresses starting `prl1z`. A P2MR output locks coins to a tree of spending rules with no public key in it at all. Pair it with an XMSS rule, and nothing on the way to spending the coins depends on elliptic curves.

P2MR follows a draft Bitcoin proposal, BIP-360, which Bitcoin hasn’t adopted. On Pearl, it has been valid since the first block.

## Is my wallet quantum-safe today?

Here is the honest status, as of Pearl v1.5.5, the version this site checked.

- **Default addresses: no.** Every address the Pearl Desktop Wallet or Oyster, the wallet program, creates is an ordinary Taproot address protected by a Schnorr key alone. So is every change address.
- **There’s no post-quantum option.** Until v1.5.5, Oyster could add a hidden XMSS backup rule to an address when asked. v1.5.5 removed that early option. Pearl Research Labs say it makes way for a full post-quantum wallet, built on P2MR.
- **Nothing signs with XMSS yet.** A search of the v1.5.5 code found no wallet command that makes an XMSS signature.
- **The wallet doesn’t make P2MR addresses.** P2MR works in the rules, and a few P2MR outputs exist on the chain, but they were made by other software.

> **Warning: Did you make a pq address?**
>
> If you asked Oyster v1.5.3 or earlier for an address with `pq=true`, move those coins before you upgrade. Oyster v1.5.5 can’t spend them: it now signs for the plain key, which doesn’t match that address. Pearl’s release notes say to spend them with the earlier release first.

_A Taproot address with a hidden XMSS rule, the kind Oyster could make until v1.5.5, simplified. Both doors open the same coins; only the hidden one is quantum-resistant, and the other one stays open._

So the building blocks have been in Pearl’s rules from day one. Using them by default is still to come. If quantum safety matters to you, watch Pearl’s release notes rather than assuming any address is already protected.

- **XMSS signatures per key:** 32
- **XMSS signature:** 2,340 bytes sent as five 468-byte pieces
- **XMSS public key:** 64 bytes
- **Opcode:** OP_CHECKXMSSSIG (0xde)
- **P2MR addresses:** prl1z… no public key inside
- **Default addresses:** Taproot (prl1p…) Schnorr only

> **Pearl vs Bitcoin**
>
> - Bitcoin has no XMSS and no post-quantum opcode. Pearl has OP_CHECKXMSSSIG, usable in tapscript.
> - P2MR is a draft proposal for Bitcoin (BIP-360). On Pearl it has been valid from the genesis block, with prl1z… addresses.
> - Default Pearl addresses face the same quantum question as Bitcoin’s Taproot addresses, since both put a public key in the address.

That’s the end of the main guide. The last page points to where you can go from here.

## In short

- A large enough quantum computer could work out a private key from a public key, which would let it forge ordinary signatures.
- On Pearl, as on Bitcoin’s Taproot, a normal address contains a public key, so its coins would be exposed to such a machine.
- XMSS is a signature scheme built only from hash functions, believed to resist quantum computers. Each Pearl XMSS key can sign 32 times, and signatures are 2,340 bytes.
- Pearl’s rules support XMSS through a new opcode, and P2MR outputs that contain no public key at all.
- Today no Pearl wallet uses them. Pearl’s wallet makes ordinary Taproot addresses only, and v1.5.5 removed its early post-quantum option.

## Read the code

- [Pearl's XMSS parameters (32 signatures, 2,340-byte signatures)](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/xmss/src/xmss.cpp#L11-L31) `xmss/src/xmss.cpp:11-31`
- [OP_CHECKXMSSSIG (0xde)](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/txscript/opcode.go#L2020-L2105) `node/txscript/opcode.go:2020-2105`
- [Spending a P2MR output, script path only](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/node/txscript/engine.go#L534-L568) `node/txscript/engine.go:534-568`
- [The wallet's one key scope: BIP-86 Taproot](https://github.com/pearl-research-labs/pearl/blob/v1.5.5/wallet/waddrmgr/scoped_manager.go#L155-L182) `wallet/waddrmgr/scoped_manager.go:155-182`

## Sources

### Pearl source

- [Pearl source code at v1.5.5](https://github.com/pearl-research-labs/pearl/tree/v1.5.5)
- [Pearl PR #463: removing the wallet's partial post-quantum support (v1.5.5)](https://github.com/pearl-research-labs/pearl/pull/463)

### Bitcoin standards

- [BIP-360: Pay to Merkle Root (P2MR), draft](https://github.com/bitcoin/bips/blob/master/bip-0360.mediawiki)

### Other

- [RFC 8391: XMSS, eXtended Merkle Signature Scheme](https://www.rfc-editor.org/rfc/rfc8391)
