Questions tagged [ripemd160]
19 questions
35
votes
1 answer
Why are Bitcoin addresses hashes of public keys?
Currently, Bitcoin addresses and their checksums are constructed from the public key by a using repeated hashing with SHA256 and RIPEMD160. Now I understand the reasoning behind using hashing for constructing the checksum, but why wasn't just the…
Noah
- 1,469
- 12
- 19
6
votes
2 answers
Why was the RIPEMD-160 hash algorithms chosen before SHA-1?
Bitcoin uses both SHA-256 and RIPEMD-160 hashes. Most often a double-round SHA-256 is used, but for address generating, RIPEMD-160 is used because it generates a shorter hash value. RIPEMD-160 has a 160-bit or 20-byte hash value while SHA-256 has a…
Steven Roose
- 11,473
- 8
- 44
- 71
3
votes
1 answer
Is there any known 80-bit collision attack?
Regarding [bitcoin-dev] Time to worry about 80-bit collision attacks or not?
considering that it is from July 2016, is there any known instance of this attack in practice?
Also what addresses are valid to use if a person wants to avoid 80-bit…
WebOrCode
- 323
- 7
3
votes
1 answer
Why does the TXID have 256 bits when Bitcoin's address security is 160-bit?
Commonly used Bitcoin addresses have the security of 2160 (due to the RIPEMD-160 hash). This means that Bitcoin is based on the fact that 160-bit security is good enough. If someone breaks 160-bit security, most bitcoins are in trouble.
The TXID is…
Aleš Janda
- 41
- 2
2
votes
3 answers
Convert between String/Hex/Byte in Java for sha256 - wrong format?
I am trying to convert a bitcoin address and have the following code from here (Calculate Segwit address from public address, 2nd answer):
Step1: $ printf 1L88S26C5oyjL1gkXsBeYwHHjvGvCcidr9 > adr.txt
Step2: $ printf $( cat adr.txt | sed…
A.c
- 135
- 2
- 13
2
votes
1 answer
The bitcoin address space seems to be closer to 2^40, not 2^160
The Base58 Encoding of a public key hash outputs: "A set of 58 alphanumeric symbols consisting of easily distinguished uppercase and lowercase letters (0OIl are not used)"
This set is a fixed string of 34 characters.
That is to say, "A bit coin…
Robert Christian
- 204
- 1
- 7
1
vote
1 answer
Bitcoin RIPEMD160 purpose
Bitcoin uses RIPEMD160 on top of SHA256. Is its sole purpose to make public key address shorter or does it strengthen security in any way?
Jamol
- 13
- 5
1
vote
2 answers
Two addresses with same hash160?
It seems that two addresses have same hash160 69665e2c4fac771e340f8c6f91c719b0c37a6a8f:
here 0 BTC: https://blockchain.info/address/1AcJanbHGrBFwS3KJMDW8kEZMtHiJhatzE
here 0.00720407 BTC:…
Basj
- 354
- 2
- 19
1
vote
1 answer
In a perfect world, should RIPE160 be used as the block ID or transaction ID?
Edit: In this question I'm looking at storage advantages, and network bandwidth savings.
Given that the TxID and BlockID uses SHA256 to uniquely identify a transaction (and block) is there any reason that RIPEMD shouldn't be used in a brand…
makerofthings7
- 12,656
- 11
- 60
- 129
1
vote
1 answer
Can a brainwallet passphrase be derived if an attacker has obtained the private keys of an empty wallet.dat file?
Someone robbed me at gunpoint and took my laptop. The laptop contained an encrypted hardrive with a wallet.dat file. Both the hardrive and wallet.dat had at best weak passphrases for the encryption. I have assumed both to be compromised.
My question…
user12247
- 11
- 2
1
vote
1 answer
replicating Hash160 with SHA256/RIPEMD160
I have a dumb question about Hash160 (specifically, going from a public key to Hash160).
If I take a public key: 04ce0ed35340803b0c21f2f7f5d5ab9d687e5fa95a79471c9b5c9d97a0bb170eac1045230cc51d13b85a5f64feb80f8fc19358a396797926e3f89d49066b1abc07
and I…
FKAjasmine
- 13
- 2
1
vote
1 answer
Baffled by endianness: How do I compute the HASH160 of the public key of a base58 address?
Given an address as follows:
> spend_address=$(btc-cli getnewaddress '' legacy)
> btc-cli getaddressinfo $spend_address
spend_address info {
"address": "moHaAMoTLRZ7dCyP4SunTBRvSfdFxUNrCe",
"scriptPubKey":…
davidbak
- 261
- 1
- 7
0
votes
1 answer
How to generate the hash of public key in Bitcoin
I'm trying to hash the public key with SHA256 and then ripemed160 and get the hash. but it gives the wrong hash
Public key: 2b4632d08485ff1df2db55b9dafd23347d1c47a457072a1e87be26896549a8737
Hash should be:…
Pretty Girl
- 5
- 3
0
votes
1 answer
Learning + checking the bitcoin address creation process at each step
I’m learning how hashing algorithms are used around the process of bitcoin address creation.
I’ve read lots of great examples online that, step by step, show the output of each sequential hashing stage - start to finish.
I’ve occasionally copied one…
CB1066
- 3
- 3
0
votes
2 answers
SHA256 vs RIPEMD160 in SegWit
In Pay-To-Witness-Public-Key-Hash (P2WPKH), the RIPEMD160 hash function is used to hash the public key of the recipient in the locking script.
On the contrary, Pay-To-Witness-Script-Hash (P2WSH) uses the SHA256 for hashing the redeem script.
Why has…
dc_Bita98
- 394
- 3
- 14