Bitcoin Forum
May 21, 2024, 05:39:33 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Can someone explain why Bitcoin addresses are generated in the way that they are  (Read 1584 times)
Stuffe (OP)
Newbie
*
Offline Offline

Activity: 29
Merit: 0


View Profile
January 31, 2015, 11:32:06 AM
 #1

So according to the link below, Bitcoin addresses are ECDSA public keys that have gone through a bunch of hash functions.
I understand why you would RIPEMD hash it, to make it shorter and I also understand why you would base 58 encode it to make it even shorter.
Lastly, I also understand why they hash it one more time to create a checksum that ensures people don't accidentally send to bogus addresses.

But what are the other steps for? Why for example SHA-256 hash before you RIPEMD hash?

List of steps are found here.
https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses
hexafraction
Sr. Member
****
Offline Offline

Activity: 392
Merit: 259

Tips welcomed: 1CF4GhXX1RhCaGzWztgE1YZZUcSpoqTbsJ


View Profile
February 10, 2015, 11:20:04 AM
 #2

I'm simply speculating, but it could be to keep addresses secure (until their first outbound txn) even if RIPEMD or ECDSA is broken. Your comment about the checksum is exactly on point.

I have recently become active again after a long period of inactivity. Cryptographic proof that my account has not been compromised is available.
lophie
Hero Member
*****
Offline Offline

Activity: 924
Merit: 1001

Unlimited Free Crypto


View Profile
February 12, 2015, 04:32:26 AM
 #3

Quote from: Stuffe link=topic=941841.msg10318514#msg10318514
I understand why you would RIPEMD hash it, to make it shorter
[/quote

Didn't you in a way answer yourself just now? Why would you make it shorter then hash it SHA256 and make it longer again?

Will take me a while to climb up again, But where is a will, there is a way...
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
February 12, 2015, 04:38:20 AM
 #4

Satoshi seemed overly fond of double hashing algorithms SHA-256(SHA-256(x)) and RIPEMD-160(SHA-256()).  To my knowledge he never provided an explanation.  A common usage of double hashing is to prevent length extension attacks but this is a very specific kind of attack which is applicable to Bitcoin.  Honestly it really serves no purpose, a simple RIPEMD-160 of the PubKey (or Script) would have worked equally well.  We probably will never know for sure.

There are a few other design choices which are best chalked up to "they are that way because Satoshi made it that way".
Dabs
Legendary
*
Offline Offline

Activity: 3416
Merit: 1912


The Concierge of Crypto


View Profile
February 12, 2015, 08:05:23 AM
 #5

Yeah, it started that way, and it will probably be best to continue it that way. If SHA-256 is ever broken, it is extremely unlikely that SHA-256(SHA-256(x)) would get broken.

DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
February 12, 2015, 08:23:34 AM
 #6

Yeah, it started that way, and it will probably be best to continue it that way. If SHA-256 is ever broken, it is extremely unlikely that SHA-256(SHA-256(x)) would get broken.

Corrected it for you.

Bitcoin relies on the second preimage resistance of the hashing function.  If you can find a second input that produces the same output of a single hashing function [ SHA256(x) == SHA256(y) ] then the output of the second round of hashing will also be identical [ If SHA256(x) == SHA256(y) then SHA256(SHA256(x) == SHA256(SHA256(y)) ].

Dabs
Legendary
*
Offline Offline

Activity: 3416
Merit: 1912


The Concierge of Crypto


View Profile
February 12, 2015, 08:52:55 AM
 #7

Yeah, I think I was thinking of that or something like that. But let me try to clarify, and see if this makes sense. If SHA-256 gets a minor break, nothing much will be affected. If SHA-256 gets a major break, as in catastrophic, then we have a lot of things to worry about and bitcoin would be the least of those.

Such much easier to steal from fiat banks than from attempting to brute force bitcoin private keys.

onemorebtc
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250


View Profile
February 12, 2015, 08:59:23 AM
 #8

afaik to get btc from "unspent addresses" (sorry for that really bad term) you need to break RIPEMD160 too?
or did i misunderstand sth?

transfer 3 onemorebtc.k1024.de 1
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!