Questions tagged [checksum]

24 questions
13
votes
2 answers

How do I check the checksum of a Bitcoin address?

I'm working on a Bitcoin ATM. We want to detect addresses that are entered incorrectly. There's a checksum on Bitcoin addresses - but how can we check it?
Willipm
  • 433
  • 1
  • 5
  • 11
10
votes
2 answers

BIP39 Manual Phrase Calculations - How are Multiple checksums valid?

Need some help understanding the math regarding why multiple checksums work for mnemonic phrase generation (BIP39). Let's assume a 12 word passphrase. If we divide the 2048 wordlist into groups of 16 ... exactly 1 word out of 16 word "block" will be…
Ryan Ellis
  • 213
  • 2
  • 5
8
votes
5 answers

checksum = SHA256(SHA256(prefix+data)) - why double hashing?

From 'Mastering bitcoin' - checksum = SHA256(SHA256(prefix+data)) The 'data' is, for example, an address, which was calculated using SHA256 and then RIPEMD160. Why do we need double hashing when calculating the checksum?
Rony Tesler
  • 299
  • 1
  • 8
4
votes
1 answer

How to validate bitcoin address

How I can validate a standard bitcoin address?
Alex
  • 183
  • 11
3
votes
1 answer

Pseudo code to find Bip39 checksum?

I'm trying to find the checksum for a 12-word BIP39. I can find the first eleven words just fine, but my 12th word is always off by a few positions. For example, take the 128-bit entropy e84eaa26330ccbb2f866a1dc155e94ba. In binary that is…
3
votes
1 answer

bip39 checksum python

Is there any Python package which will allow me to verify if the checksum of a bip39 mnemonic is valid? For instance, I have a 24-word bip39 mnemonic, and I might have made a mistake for one of the words. I want to see which words will result in a…
3
votes
2 answers

Checksum vs. Hash: Differences and Similarities ?

What are similarities and differences between a "checksum" algorithm and a "hash" function? Can they be used instead of each other? Or their usage are different? For example, for verifying the integrity of a text, which one is better to be used?
Questioner
  • 1,151
  • 8
  • 22
2
votes
1 answer

What is the probability of different public key hash that produce the same checksum value

checksum = 1st4byte(sha256(sha256(PubKeyHash))) checksum1 = 1st4byte(sha256(sha256(PubKeyHash1))) What is the P(checksum == checksum1)? where PubKeyHash != PubKeyHash1 Is it 1/(2^^32)?
Cisco Mmu
  • 335
  • 1
  • 9
2
votes
1 answer

How to manually compute a descriptors checksum?

In the docs it says: The checksum for a descriptor without one can be computed using the getdescriptorinfo RPC. I would like to build a recovery tool where many descriptors are imported, calling getdescriptorinfo for each is cumbersome. Manually…
2
votes
1 answer

Is the checksum used in BIP39 mnemonic sentences too short?

In the BIP39 specification, you add 1 bit of checksum for every 32 bits of entropy you generate. Therefore, with a common entropy size of 128 bits, you are only adding 4 bits of checksum. This means that if you were to write down the words in the…
inersha
  • 2,928
  • 1
  • 17
  • 41
2
votes
1 answer

Why is getdescriptorinfo returning an error "Invalid descriptor (code -5)"

I am using Bitcoin Core bitcoin-cli with getdescriptorinfo like so: curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getdescriptorinfo",…
2
votes
1 answer

bitcoin-cli deriveaddresses always returns an error

I am copying and pasting the example from the bitcoin-cli help: deriveaddresses "wpkh([d34db33f/84h/0h/0h] xpub6EuEBhzm7KD3yxmt9wFHisymSNmK8w2CFmfgUgXi74ChFa79YouJ1w3hpZmFAWiuLezZqD38fY6K8PkxUfPifzSEB35skuBBNf1efmSp12K/0/*)#trd0mf0l" "[0,2]" And…
2
votes
1 answer

Compute checksum for Bech32 address

The Bitcoin Wiki page for Bech32 addresses explains how one can create a bech32 address from a public key. In step 6 it says- Compute the checksum by using the data from step 5 and the H.R.P (bc for MainNet and tb for TestNet) I went through the…
Nissim R
  • 123
  • 6
1
vote
1 answer

Missing Checksum error when importing multisig wallet via descriptor

I'm trying to import a multisig wallet on regtest, but getting a strange error. What am I doing wrong? I've tried it with xpubs, tpubs, and Vpubs (converted here) and get the same error for all. Command: bitcoin-cli -regtest importmulti '[{"desc":…
Daniel
  • 13
  • 2
1
vote
1 answer

How to calculate the checksum of an extended public key?

Very difficult to find definitive info on this. From what I can find on google and looking at BIP32 it seems like the process to calculate a checksum for an extended key is to decode the base58 string to data, then perform a double sha256 on the…
Fontaine
  • 466
  • 2
  • 10
1
2