online resources

Test vector 1 BIP32 in Python

i tried to replicate code in this git https://github.com/tongokongo/bitcoin-basics/blob/master/HD_wallet/bip32.py . I'm not familiar with python but the xpub is correct (this is the Test Vector 1 from BIP32) while the xpriv is: b'Har3K3MhV5fiuEp6ztqjoMJejPsfnrLHAzSWDpkzLGomKaoUPLkSrwPxsdKMbzgsi6eegKG5BMwPyk8RMbDEe6zpHSUnRZMNJkX2HEhDzo41ds7qJVyRkhb3jsGezXb8XB4hW12QKUuxc3pDstNHMuYwEyV' b'xpub661MyMwAqRbcFtXgS5sYJABqqG9YLmC4Q1Rdap9gSE8NqtwybGhePY2gZ29ESFjqJoCu1Rupje8YtGqsefD265TMg7usUDFdp6W1EGMcet8' what's the mistake? Below the code: import binascii import hmac import hashlib import struct import ecdsa import base58 from ecdsa.curves import SECP256k1 from ecdsa.ecdsa import int_to_string, string_to_int #chain m seed = binascii.unhexlify("000102030405060708090a0b0c0d0e0f") #generiamo il seed, importiamo la stringa del test vector #calcolaiamo ora I come HMAC-SHA512 (seed key="Bitcoin seed" Data = seed) - occorre importare hmac e hashlib I = hmac.new(b"Bitcoin seed", seed, hashlib.sha512).digest() #il risultato…

Continue Reading Test vector 1 BIP32 in Python

Clarifications on hd multisig wallet

I need clarification on multisig hd wallets. Let's imagine we have a 2/3 multisig. The first key is generated by the user on a mobile wallet, the second is kept on a server while the third is off-line (for emergencies). In an hd wallet the seed is generated from the seed phrase and, from this, the Master Private Key. How does the generation of the other 2 Master Keys happen? What do these keys share? When new private keys are generated by the user are new keys derived also on the server?

Continue Reading Clarifications on hd multisig wallet

How genereate pub key from priv key ? algo

How to generate pub key from prive key ? All examples and explain skip this. but i dont need steps to address etc . i only need steps from priv to pub ( compressed or not ) what using at that. if possible example or python , or simple algo what used. example i hv priv key 981F3AF336E23EEFF4384A939065C4C623E394F1AE7E4D922C045CEDC3F258D2 i want make from them pub key , (i not need generation priv key i have them!) compressed or uncompressed . what steps i need to do for make valid public key for bitcoin address .

Continue Reading How genereate pub key from priv key ? algo

Howto convert mnemonic->seed->root key->derived addresses with c library (libWally)

I am trying to use the cryptowallet library LibWally to convert a 12-word mnemonic into a set of derived addresses. I believe my mistake is not with the library itself, but a process flow/algorithmic one, so even if you don't aren't familiar with the library, you may be able to help. First I validate and convert the mnemonic to a seed with the following code: char *mnemonic = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about"; bip39_mnemonic_to_seed((const char *)mnemonic, "", (unsigned char *)bytes_output, HMAC_SHA512_LEN, &size_written) wally_hex_from_bytes((unsigned char*)bytes_output, size_written, &hex_output) This gives me the proper seed value;…

Continue Reading Howto convert mnemonic->seed->root key->derived addresses with c library (libWally)

Which public extended key should I use?

I'm trying to make sense of the information shown here and how the extended public keys work. The web wallet I'm using only supports this derivation path m/44'/242'/0'/i, so if I understood correctly: (1) It doesn't matter what the index is for some coin, the extended private and public keys should be the same, that's why the same words can be used for any coin. (2) Since the derivation path uses hardened derivation for some indices, the extended public key won't be able to generate the same addresses available for i from the web wallet. Imagine I want to share…

Continue Reading Which public extended key should I use?

Public Keys Prefixes and Derivation Paths

When importing an zpub, for example, to a wallet, does the wallet understand it should recreate a set of addresses using the derivation path "m/84'/0'/0'" and the script type "p2wpkh" ? So if I generate an zpub with correct script type but choose an arbitrary path like "m/77'/0'/0'", would it be conceptually wrong and can cause problems when exporting to other wallets ? I just trying to understanding if the concept of version bytes / prefixes in extended public keys are also path-dependent or can change just according script type. The SLIP 0132 mentions the path for some prefixes. But…

Continue Reading Public Keys Prefixes and Derivation Paths

Why is BIP32 root key different for different standards(purposes)?

When generating key on https://iancolemen.com/bip39/, the BIP32 Root Key changes as I change the derivation path tab, e.g. BIP32, BIP44, BIP39 etc. Why is this the case? Isn't BIP32 Root Key the m at the beginning of the derivation path and the different standards are subsequent purpose that should not affect the root key? Contrary to the above, when I generate addresses with the following code in go, the master key printed always matches the BIP32 Root Key on iancolemen.com. And changing the purpose does not affect the address generated in the end, it is always a BIP32(legacy) address, instead…

Continue Reading Why is BIP32 root key different for different standards(purposes)?

Diffrent address prefix generated for same Altcoin

I created a altcoin with ltc 0.18 fork and I set the magic bytes to be : pchMessageStart[0] = 0x4d; pchMessageStart[1] = 0x41; pchMessageStart[2] = 0x4e; pchMessageStart[3] = 0x4e; and address prefix to be same as that of ltc i.e base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,48); base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5); base58Prefixes[SCRIPT_ADDRESS2] = std::vector<unsigned char>(1,50); base58Prefixes[SECRET_KEY] = std::vector<unsigned char>(1,176); base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x88, 0xB2, 0x1E}; base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x88, 0xAD, 0xE4}; But every time I generate a new address with RPC command getnewaddress i get 2 diffrent sets of addresses, one with prefix L other M. Surprisingly transaction between both of them is…

Continue Reading Diffrent address prefix generated for same Altcoin

Search Derivation Path for an Address

Has anyone written an utility or something able to search/identify which Derivation Path an Address belongs? For example, giving a mnemonic like "unaware open elite rabbit grunt spread session exotic legal satoshi trend electric" and Address "12rfNtgHFjLoK1y58S3gHijmGHV8t8iteT", the program should return its Derivation Path "m/44'/0'/1'/2/6".

Continue Reading Search Derivation Path for an Address

Bip39 tool – BIP32 Extended Private Key vs BIP32 Root Key

In the bip39 mnemonic tool there is three sections : Mnemonic : we input our words or a BIP39 seed and the tool compute for us the BIP32 Root Key Derivation Path: there is a BIP32 Extended Private/Public Key Derived Addresses Questions : 1- If i want to use Electrum wallet and I have already a wallet. Which key should I have to import ? What is the difference if I import the BIP32 Root Key or if I import the BIP32 Extended Private Key ? 2- Should I use BIP44 instead of BIP32 to import my wallet in an…

Continue Reading Bip39 tool – BIP32 Extended Private Key vs BIP32 Root Key

how to get extended private key with public key and master seed key

I have a master seed from a Ledger wallet. I know how to transform it into a master root private key. I have also several public keys, which all was derivated from corresponding extended private key of the root private key. Questions: How can I get all the private keys corresponding to the public keys mentioned above? What is the best tool to do this thing ? My ultimate goals is then to import all these private keys in a Electrum wallet for instance.

Continue Reading how to get extended private key with public key and master seed key

How to retrieve extended private key from extended public key + master seed / root private master key

I have a master seed (I use a hardware wallet). I know how to transform it into a (root) private key. I have also several public keys, which all was obtained by derived a private/public keys of the root private key. Questions: How can I get all the private keys corresponding to the public keys mentioned above? What is the best tool to do this thing ? In otherm term, I want to do: derivated private key = function(derivated public key, master root key) My ultimate goals is then to import all these private keys in a Electrum wallet for…

Continue Reading How to retrieve extended private key from extended public key + master seed / root private master key

End of content

No more pages to load