secp256k1256-bitsecg/secp256k1 Quantum-vulnerable Renamed import 98 places See details
Cryptocurrency key derivation
A BIP-32 derivation or a secp256k1 operation. Wallet keys are secp256k1, and on a public ledger the public key is usually already visible, so an attacker with a quantum computer does not have to wait to observe a signature.
A quantum computer of sufficient size breaks this completely. It has to be replaced, not tuned. Broken by Shor's algorithm on a cryptographically relevant quantum computer. Bitcoin-family keys are additionally exposed because public keys are published on-chain, so the attacker does not have to wait for a signature.
What to do. No standardised replacement exists for consensus-level signatures. Follow the protocol's own migration plan; an application cannot make this change alone.
-
src/cjs/ecc_lib.cjs:124
const r = ecc.xOnlyPointAddTweak(h(t.pubkey), h(t.tweak)); -
src/cjs/psbt.cjs:1077
if (tools.compare(root.derivePath(d.path).publicKey, d.pubkey)) -
src/cjs/psbt.cjs:1586
const node = hdKeyPair.derivePath(bipDv.path); -
src/esm/ecc_lib.js:76
const r = ecc.xOnlyPointAddTweak(h(t.pubkey), h(t.tweak)); -
src/esm/psbt.js:1012
if (tools.compare(root.derivePath(d.path).publicKey, d.pubkey)) -
src/esm/psbt.js:1508
const node = hdKeyPair.derivePath(bipDv.path); -
test/integration/addresses.spec.ts:20
test path
const keyPair = ECPair.makeRandom({ rng }); -
test/integration/addresses.spec.ts:39
test path
const keyPair = ECPair.fromWIF( -
test/integration/addresses.spec.ts:61
test path
const keyPair = ECPair.fromWIF( -
test/integration/addresses.spec.ts:70
test path
const keyPair = ECPair.fromWIF( -
test/integration/addresses.spec.ts:113
test path
const keyPair = ECPair.makeRandom({ network: TESTNET, rng }); -
test/integration/addresses.spec.ts:140
test path
const keyPair = ECPair.makeRandom({ network: LITECOIN, rng }); -
test/integration/bip32.spec.ts:18
test path
const node = bip32.fromBase58(xpriv, bitcoin.networks.testnet); -
test/integration/bip32.spec.ts:29
test path
const seed = bip39.mnemonicToSeedSync(mnemonic); -
test/integration/bip32.spec.ts:30
test path
const node = bip32.fromSeed(seed); -
test/integration/bip32.spec.ts:32
test path
const restored = bip32.fromBase58(strng); -
test/integration/bip32.spec.ts:41
test path
const seed = bip39.mnemonicToSeedSync(mnemonic); -
test/integration/bip32.spec.ts:42
test path
const node = bip32.fromSeed(seed); -
test/integration/bip32.spec.ts:53
test path
const root = bip32.fromSeed( -
test/integration/bip32.spec.ts:60
test path
const child1 = root.derivePath(path); -
test/integration/bip32.spec.ts:76
test path
const root = bip32.fromSeed( -
test/integration/bip32.spec.ts:83
test path
const child1 = root.derivePath("m/44'/0'/0'/0/0"); -
test/integration/bip32.spec.ts:106
test path
const seed = bip39.mnemonicToSeedSync(mnemonic); -
test/integration/bip32.spec.ts:107
test path
const root = bip32.fromSeed(seed); -
test/integration/bip32.spec.ts:110
test path
const child = root.derivePath(path); -
test/integration/bip32.spec.ts:128
test path
const seed = bip39.mnemonicToSeedSync(mnemonic); -
test/integration/bip32.spec.ts:129
test path
const root = bip32.fromSeed(seed); -
test/integration/bip32.spec.ts:133
test path
getAddress(root.derivePath("m/0'/0/0")), -
test/integration/bip32.spec.ts:137
test path
getAddress(root.derivePath("m/0'/0/1")), -
test/integration/bip32.spec.ts:143
test path
getAddress(root.derivePath("m/0'/1/0")), -
test/integration/bip32.spec.ts:147
test path
getAddress(root.derivePath("m/0'/1/1")), -
test/integration/cltv.spec.ts:22
test path
const alice = ECPair.fromWIF( -
test/integration/cltv.spec.ts:26
test path
const bob = ECPair.fromWIF( -
test/integration/csv.spec.ts:24
test path
const alice = ECPair.fromWIF( -
test/integration/csv.spec.ts:28
test path
const bob = ECPair.fromWIF( -
test/integration/csv.spec.ts:32
test path
const charles = ECPair.fromWIF( -
test/integration/csv.spec.ts:36
test path
const dave = ECPair.fromWIF( -
test/integration/payments.spec.ts:37
test path
ECPair.makeRandom({ network: NETWORK, rng }), -
test/integration/payments.spec.ts:38
test path
ECPair.makeRandom({ network: NETWORK, rng }), -
test/integration/taproot.spec.ts:45
test path
const seed = await bip39.mnemonicToSeed(mnemonic); -
test/integration/taproot.spec.ts:46
test path
const rootKey = bip32.fromSeed(seed); -
test/integration/taproot.spec.ts:48
test path
const childNode = rootKey.derivePath(path); -
test/integration/taproot.spec.ts:103
test path
const internalKey = bip32.fromSeed(rng(64), regtest); -
test/integration/taproot.spec.ts:104
test path
const p2pkhKey = bip32.fromSeed(rng(64), regtest); -
test/integration/taproot.spec.ts:143
test path
const sendInternalKey = bip32.fromSeed(rng(64), regtest); -
test/integration/taproot.spec.ts:178
test path
const internalKey = bip32.fromSeed(rng(64), regtest); -
test/integration/taproot.spec.ts:179
test path
const leafKey = bip32.fromSeed(rng(64), regtest); -
test/integration/taproot.spec.ts:240
test path
const internalKey = bip32.fromSeed(rng(64), regtest); -
test/integration/taproot.spec.ts:241
test path
const leafKey = bip32.fromSeed(rng(64), regtest); -
test/integration/taproot.spec.ts:331
test path
const sendInternalKey = bip32.fromSeed(rng(64), regtest); -
test/integration/taproot.spec.ts:362
test path
const internalKey = bip32.fromSeed(rng(64), regtest); -
test/integration/taproot.spec.ts:363
test path
const leafKey = bip32.fromSeed(rng(64), regtest); -
test/integration/taproot.spec.ts:425
test path
const sendInternalKey = bip32.fromSeed(rng(64), regtest); -
test/integration/taproot.spec.ts:469
test path
const internalKey = bip32.fromSeed(rng(64), regtest); -
test/integration/taproot.spec.ts:474
test path
const leafKey = bip32.fromSeed(rng(64), regtest); -
test/integration/taproot.spec.ts:563
test path
const leafKey = bip32.fromSeed(rng(64), regtest); -
test/integration/taproot.spec.ts:644
test path
const internalKey = bip32.fromSeed(rng(64), regtest); -
test/integration/transactions.spec.ts:21
test path
): boolean => ECPair.fromPublicKey(pubkey).verify(msghash, signature); -
test/integration/transactions.spec.ts:27
test path
const alice = ECPair.fromWIF( -
test/integration/transactions.spec.ts:460
test path
keys.push(ECPair.makeRandom({ network: regtest, rng })); -
test/integration/transactions.spec.ts:608
test path
const myKey = ECPair.makeRandom({ network: regtest, rng }); -
test/integration/transactions.spec.ts:611
test path
ECPair.fromPrivateKey(myKey.privateKey!, { network: regtest }), -
test/integration/transactions.spec.ts:635
test path
const hdRoot = bip32.fromSeed(rng(64)); -
test/integration/transactions.spec.ts:638
test path
const childNode = hdRoot.derivePath(path); -
test/integration/transactions.spec.ts:712
test path
keys.push(ECPair.makeRandom({ network, rng })); -
test/integration/transactions.spec.ts:716
test path
if (!myKeys) keys.push(ECPair.makeRandom({ network, rng })); -
test/psbt.spec.ts:35
test path
): boolean => ECPair.fromPublicKey(pubkey).verify(msghash, signature); -
test/psbt.spec.ts:139
test path
const keyPair = ECPair.makeRandom({ rng }); -
test/psbt.spec.ts:191
test path
const keyPair = ECPair.fromWIF(WIF, NETWORKS.testnet); -
test/psbt.spec.ts:277
test path
ECPair.fromWIF(f.shouldSign.WIF), -
test/psbt.spec.ts:292
test path
failedAsyncSigner(ECPair.fromWIF(f.shouldSign.WIF).publicKey), -
test/psbt.spec.ts:303
test path
ECPair.fromWIF(f.shouldThrow.WIF), -
test/psbt.spec.ts:310
test path
toAsyncSigner(ECPair.fromWIF(f.shouldThrow.WIF)), -
test/psbt.spec.ts:333
test path
ECPair.fromWIF(f.shouldSign.WIF), -
test/psbt.spec.ts:344
test path
ECPair.fromWIF(f.shouldThrow.WIF), -
test/psbt.spec.ts:365
test path
ECPair.fromWIF(f.shouldSign.WIF), -
test/psbt.spec.ts:375
test path
ECPair.fromWIF(f.shouldThrow.WIF), -
test/psbt.spec.ts:396
test path
ECPair.fromWIF(f.shouldSign.WIF), -
test/psbt.spec.ts:406
test path
ECPair.fromWIF(f.shouldThrow.WIF), -
test/psbt.spec.ts:426
test path
bip32.fromBase58(f.shouldSign.xprv), -
test/psbt.spec.ts:437
test path
bip32.fromBase58(f.shouldThrow.xprv), -
test/psbt.spec.ts:459
test path
bip32.fromBase58(f.shouldSign.xprv), -
test/psbt.spec.ts:470
test path
bip32.fromBase58(f.shouldThrow.xprv), -
test/psbt.spec.ts:491
test path
bip32.fromBase58(f.shouldSign.xprv), -
test/psbt.spec.ts:501
test path
bip32.fromBase58(f.shouldThrow.xprv), -
test/psbt.spec.ts:520
test path
bip32.fromBase58(f.shouldSign.xprv), -
test/psbt.spec.ts:530
test path
bip32.fromBase58(f.shouldThrow.xprv), -
test/psbt.spec.ts:725
test path
const key = ECPair.makeRandom({ rng }); -
test/psbt.spec.ts:825
test path
const root = bip32.fromSeed(crypto.randomBytes(32)); -
test/psbt.spec.ts:826
test path
const root2 = bip32.fromSeed(crypto.randomBytes(32)); -
test/psbt.spec.ts:836
test path
pubkey: root.derivePath(path).publicKey, -
test/psbt.spec.ts:917
test path
const root = bip32.fromSeed(crypto.randomBytes(32)); -
test/psbt.spec.ts:918
test path
const root2 = bip32.fromSeed(crypto.randomBytes(32)); -
test/psbt.spec.ts:936
test path
pubkey: root.derivePath(path).publicKey, -
test/psbt.spec.ts:1216
test path
const alice = ECPair.fromWIF( -
ts_src/ecc_lib.ts:86
const r = ecc.xOnlyPointAddTweak(h(t.pubkey), h(t.tweak)); -
ts_src/psbt.ts:1355
if (tools.compare(root.derivePath(d.path).publicKey, d.pubkey)) -
ts_src/psbt.ts:2005
const node = hdKeyPair.derivePath(bipDv!.path);