Question for Bitcoin experts:

How do I derive Bitcoin addresses from a seed (12 words) OFFLINE and without using any bitcoin software?

ie: what is the mathematical formula?

Will zap ⚡ good answers!

Reply to this note

Please Login to reply.

Discussion

The first step is to generate a random number (dice or coin flips) then you can create the first 11 or first 23 words with a lookup table and the final word is mostly complicated by the need for using sha256.

This is a good resource even if you're not trying to seed xor. There's a python script that you can read and run on a non bitcoin related computer there somewhere too.

The sad thing is you have to give your whole key to a computer to generate a valid checksum.

https://github.com/dipunm/seedxor/blob/main/assets/dice-xor-instructions.md

pretty sure there is programmable calculators that could compute SHA256 hashes, if you had the code to do it

seedsigners do this also

Calculators and seed signers count as computers to me.

i agree but most of these types of devices have no networking capabilities, if they even have USB

Btw, I couldn't find a calculator that could do sha256, I did look 😂

But seed signer works, tails OS is a poor man's option, I was trying to make it work on this microcontroller: https://shop.pimoroni.com/products/badger-2040?variant=39752959852627

They were £16 at the time and I got it working actually but then I wanted it to give you the XPUB as a qr code and I couldn't get the secp256k1 library working on it properly.

These guys now focus on the version of this with WiFi.

Some pics, caveat, the checksum is real, the fingerprint is fake.

#m=image%2Fjpeg&dim=768x1020&blurhash=_XJar%7DENRPX9RPofae%7EpoLIpR%2Bayayj%5B4TM%7CoMM%7Ct7WBoynhNGa%7Ds.R%2Bs%3Aayx%5DxGf%2BofjtkCaeWBWBt7s.bHjaj%3FX9xZkBs%3Aayayj%5BogxtoKbIoLWBa%23M%7Bt7j%40oLazaybH&x=0ac9a8dc67b1a1a3049c922e5517382a6ad80f43c5f5bb8dea51e4ece2035330

#m=image%2Fjpeg&dim=768x1020&blurhash=_bI%3B%40jELe.WXWBkBoL%7Epn%25M%7CbHaefkj%5B4nR%2CRkR*jsWVj%5BR5NGjZWCWWofj%5Bt7jFWWWBofa%7CjsV%40NGt6aeofjtayWVRkofoLWXoLj%5BtRn%25kCjsj%5Baya%7CWVj%5BoeoeWVjZay&x=21c26a6d93c11e2e2cb3c9291fe520dab94690e044632c8e52059c7ea9124579

that is very cool

Do you find it crazy that the checksum for 01234..... In sequence is just a continuation of the sequence? 😂

it's a 12 word code and there is 4 bits so the checksum is 0-9a-f that's it

literally the first hex digit of a hash

not sure why the fingerprint is fake though

why is the fingerprint fake?, what difference does it make that's one of the lowest entropy numbers you could imagine

There is a specific algorithm you are supposed to use to calculate the fingerprint. It involves using the secp256k1 algorithm and I think possibly because of memory constraints, I had issues getting that library to run on the device.

It also wasn't giving very helpful feedback, I think the device just crashed after attempting to perform a memory allocation step.

oh, fingerprint would require generating the public key, it's a truncated hash of the pubkey usually

surely there must be a memory constrained version for deriving a public key using secp256k1?

it doesn't require that much memory actually, so the library isn't well coded

I'll jump back on this project some time this year. Hopefully I'll have more luck. I also have had advice on debugging hardware I can buy to help me zero in on the root cause.

I'm a little out of it depth with all this low level c++ coding, and most complex for me: compiling for non standard CPU architecture.

it would be easier if it was C probably, C++ complex syntax often masks underlying wasteful abstractions

Si buscas conocimiento: Capitulo 4 de mastering bitcoin.

A nivel de herramienta: iancoleman.io/bip39

#Bitfluencer 😂 me gusta

No hay técnica de engagement que supere un zap ⚡

Los libros de historia de redes sociales se están escribiendo en #Nostr

Seguimos

#Nostr #Hispano #España #Venezuela #Argentina #Mexico #ElSalavador #Amethyst #Bitcoin

nostr:nevent1qqsru0vh4nzggmdq4mzz3a4a5gk54ucr75ucudjz7ydv4zpfx0gfu8cpz3mhxue69uhhyetvv9ujumn0wd68ytnzvupzqcv9f9mt5xjn3wwla5d3m7d59etkqfusay65ckvfr0nmxufakcmuqvzqqqqqqyj0txek

Todo lo que necesitas esta en el bip32

https://en.bitcoin.it/wiki/BIP_0032 hacer esta derivacion matematicamente para una persona es bastante complicado ya que necesitas hacer operaciones criptograficas con la curva eliptica y funciones de hashes. Lo mejor es hacer un pequeño script que lo calcule por ti, o usar la pagina de iancoleman, es muy buena para esto, ademas esta hecha para que puedas guardarla como documento y utilizarla offline

it's bip 39 he is talking about, mnemonic keys

Bip39 its just mnemonic abstraction, you cannot derive keys just using bip39, but reading again the question maybe i misunderstood a bit 😬

https://en.bitcoin.it/wiki/BIP_0039#Generating_the_mnemonic

12 word keys contain 128 bits of entropy and 4 bits of checksum

to do it all offline first you need a good entropy source, like 128 coin flips, and then you need to take that number and compute the checksum which is the first 4 bits (single hex character, in fact) of the SHA256 hash of the 128 bit value

making the raw key in hex is probably easier than computing it into a valid word mnemonic, since you just group your bits into 4s and change them into 0-9a-f to get the hex format

i believe that this is one of the things you can do with a seed signer - take that hex, or even binary string and change it into a word key

assuming you can find an old, airgapped computation device that has an implementation of SHA256 you could use that also, most scientific calculators understand hex, just not sure how many of them you can program to do a hash

nostr:npub1ltt9gry09lf2z6396rvzmk2a8wkh3yx5xhgkjzzg5znh62yr53rs0hk97y has a great guide on this … (his site has a ton of useful information, it would be a good idea to browse it a little bit)

https://armantheparman.com/dicev2/