Dr. Hax on Nostr: With that finding, I'm going to call it a night. To be cleae, I believe this is just ...
With that finding, I'm going to call it a night.
To be cleae, I believe this is just a compatibility bjf, not a security issue. So no need to panic.
I'll keep digging and submit a patch when I get it sorted.
Yeah, here's my proof of work.
Library:
https://pypi.org/project/bitcoinlib/
Test vectors from: https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki
Python code to repro the error:
from bitcoinlib.keys import HDKey
m = HDKey.from_seed('000102030405060708090a0b0c0d0e0f')
assert m.wif_public() == 'xpub661MyMwAqRbcFtXgS5sYJABqqG9YLmC4Q1Rdap9gSE8NqtwybGhePY2gZ29ESFjqJoCu1Rupje8YtGqsefD265TMg7usUDFdp6W1EGMcet8'
assert m.wif_private() == 'xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi'
c1 = m.subkey_for_path("m/0")
assert c1.wif_public() == 'xpub68Gmy5EdvgibQVfPdqkBBCHxA5htiqg55crXYuXoQRKfDBFA1WEjWgP6LHhwBZeNK1VTsfTFUHCdrfp1bgwQ9xv5ski8PX9rL2dZXvgGDnw'
# fails here ^
assert c1.wif_private() == 'xprv9uHRZZhk6KAJC1avXpDAp4MDc3sQKNxDiPvvkX8Br5ngLNv1TxvUxt4cV1rGL5hj6KCesnDYUhd7oWgT11eZG7XnxHrnYeSvkzY7d2bhkJ7'
Published at
2023-09-30 04:07:00Event JSON
{
"id": "a4aa64af6916694950de639465f84f671153d64a09ba0b391745c5d486bfac0e",
"pubkey": "d30ea98ea65e953f91ab93f6b30ea51eb33c506f87d49f600a139aef00aa9511",
"created_at": 1696046820,
"kind": 1,
"tags": [
[
"e",
"fa68b7c0b77ee75ce5a3dea485abd8ceca02f2117ae249d9b90e782c9f0989db",
"",
"mention"
],
[
"p",
"d30ea98ea65e953f91ab93f6b30ea51eb33c506f87d49f600a139aef00aa9511",
"",
"mention"
]
],
"content": "With that finding, I'm going to call it a night.\n\nTo be cleae, I believe this is just a compatibility bjf, not a security issue. So no need to panic.\n\nI'll keep digging and submit a patch when I get it sorted.\n\nnostr:nevent1qqs0569hczmhae6uuk3aafy940vvajsz7ggh4cjfmxusu7pvnuycnkcppamhxue69uhkummnw3ezumt0d5pzp5cw4x82vh5487g6hylkkv82284n83gxlp75nasq5yu6auq249g3qvzqqqqqqyvulesz",
"sig": "6ab19bb416163dce3f9e8a83964ba49a89c049a91727517217a46996167b257f4a119913d1f0cfa57567162124389051ae8683900cda99046685863b4c77a337"
}