Skip to content

Instantly share code, notes, and snippets.

View jdlcdl's full-sized avatar

Jean Do jdlcdl

View GitHub Profile
@jdlcdl
jdlcdl / bitcoinrpc_liana_expanding_multi_p2tr.md
Last active February 11, 2025 09:22
Bitcoin Core Watch-Only Liana Expanding-Multi TR

Bitcoin Core Watch-Only Liana Expanding-Multi TR

Exploring how to use Bitcon Core as a Watch-Only wallet, accessed via python-bitcoinrpc, "glued" w/ SeedQReader for air-gapped QR-Code signing w/ stateless devices like Krux and SeedSigner

@jdlcdl
jdlcdl / bitcoinrpc_liana_expanding_multi_p2wsh.md
Last active February 19, 2025 13:58
Bitcoin Core Watch-Only Liana Expanding-Multi WSH

Bitcoin Core Watch-Only Liana Expanding-Multi WSH

Exploring how to use Bitcon Core as a Watch-Only wallet, accessed via python-bitcoinrpc, "glued" w/ SeedQReader for air-gapped QR-Code signing w/ stateless devices like Krux and SeedSigner

@jdlcdl
jdlcdl / bitcoinrpc_liana_simple_inheritance_p2tr.md
Last active February 7, 2025 14:36
Bitcoin Core Watch-Only Liana Simple-Inheritance TR

Bitcoin Core Watch-Only Liana Simple-Inheritance TR

Exploring how to use Bitcon Core as a Watch-Only wallet, accessed via python-bitcoinrpc, "glued" w/ SeedQReader for air-gapped QR-Code signing w/ stateless devices like Krux

Note: The sample python sessions below have been done on signet, a bitcoin testnet where coins have no value.

@jdlcdl
jdlcdl / bitcoinrpc_liana_simple_inheritance_p2wsh.md
Last active February 7, 2025 14:30
Bitcoin Core Watch-Only Liana Simple-Inheritance WSH

Bitcoin Core Watch-Only: Liana Simple-Inheritance WSH

Exploring how to use Bitcon Core as a Watch-Only wallet, accessed via python-bitcoinrpc, "glued" w/ SeedQReader for air-gapped QR-Code signing w/ stateless devices like Krux.

Note: The sample python sessions below have been done on signet, a bitcoin testnet where coins have no value.

@jdlcdl
jdlcdl / bitcoinrpc_multisig_p2wsh.md
Last active February 1, 2025 16:01
Bitcoin Core Watch-Only 2-of-3 Multisig Native Segwit

Bitcoin Core Watch-Only 2-of-3 Multisig Native Segwit

Exploring how to use Bitcon Core as a Watch-Only wallet, accessed via python-bitcoinrpc, "glued" w/ SeedQReader for air-gapped QR-Code signing w/ stateless devices like Krux and SeedSigner

@jdlcdl
jdlcdl / bitcoinrpc_single_p2wpkh.md
Last active February 1, 2025 12:46
Bitcoin Core Watch-Only Single-sig Native Segwit

Bitcoin Core Watch-Only Single-sig Native Segwit

Exploring how to use Bitcon Core as a Watch-Only wallet, accessed via python-bitcoinrpc, "glued" w/ SeedQReader for air-gapped QR-Code signing w/ stateless devices like Krux and SeedSigner

@jdlcdl
jdlcdl / liana-v9rc1_and_krux-pull-498.md
Last active March 4, 2025 12:53
liana v9rc1 and krux pull/498

Between liana v9rc1 and krux pull/498/head (as of jan 11th):

when recovering an expired utxo (taproot, single primary key, single recovery key after(6)):

  • can update w/krux's sign-to-sdcard and broadcast
  • can update w/krux's sign-to-qr but cannot broadcast: complains "422: failed to finalize PSBT"
  • can copy from liana after above error, delete psbt, import from clipboard and broadcast w/o error

Wallet Output Descriptor:

tr([d63dc4a7/48'/1'/0'/2']tpubDEXCvh2aPYzMz2xfgsh9ZM6dQZxioYfCafUgw16keqschYbED4VeS46Qhr7EoonDHNr9dSsKPEGeRP5WRzDGdY3aazneR7wKmtDVNTf6qic/<0;1>/*,and_v(v:pk([c98cbe58/48'/1'/0'/2']tpubDFXZ3rcRyvU6AvNrb4kRQFomJbtCTCyMX9jDJmfN5XfHLEAZq7a8h3CrYDZYtdexk6XWfT5DB8PYgySWA5GSdyWdzWwveQcbrzvVQw3u7bV/<0;1>/*),older(6)))#v4dwzex2
@jdlcdl
jdlcdl / mnemonic_to_bytes_speedup.md
Last active August 17, 2024 13:24
diybitcoinhardware/embit.bip39.mnemonic_to_bytes() speedup

diybitcoinhardware/embit.bip39.mnemonic_to_bytes() speedup

Back Story (a branch I do not intend to PR)

In the spring of 2024, while brute-forcing mnemonics, I took a look at improving the performance of embit.bip39.mnemonic_to_bytes(), which is:

  • well peer-reviewed
  • tested... arguably enough
  • stable and in-use by a number of projects

I ended up re-implementing this function using a big-integer accumulator. I call the branch "bip39_via_accumulator".

Fountain QR Reading

Completely untested with actual qrcodes: based on fact that python's set.symmetric_difference is analogous to XOR.

This is an exploration of extrapolating more XOR-mixed frames than have been received while reading a fountain qrcode.

ie: If we get 2 frames with parts [0, 1, 3, 5] and [3, 5, 7, 9], then we also have [0, 1, 7, 9]