Bitcoin Forum
May 15, 2024, 06:16:03 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 [3]  All
  Print  
Author Topic: SHA-2* family maybe broken in several years.  (Read 7716 times)
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
December 22, 2013, 06:58:11 AM
Last edit: December 22, 2013, 04:38:19 PM by DeathAndTaxes
 #41

In either case it's not enough to break SHA256, it's also needed to break RIPEMD160 and ECDSA.

You could "just" break RIPEMD-160 & SHA-256 OR ECDSA (limited to addresses where the PubKey is known).

Find a PubKeyB such that for an existing PubKey A they both produce the same PubKeyHash.

i.e.
PubKeyA =/= PubKey B
RIPEMD-160(SHA-256(PubKeyA)) == PubKeyHashA
RIPEMD-160(SHA-256(PubKeyB)) == PubKeyHashB
PubKeyHashA == PubKeyHashB

If PubKeyHashA == PubKeyHashB then the private key for either PubKeyA or PubKeyB can spend coins sent to Address A or B. In a "normal" Bitcoin tx (PayToPubKeyHash) you are not locking funds to a specific PubKey but locking them to a specific PubKeyHash.

 
fusion7
Newbie
*
Offline Offline

Activity: 34
Merit: 0



View Profile
December 22, 2013, 08:06:37 AM
 #42

In either case it's not enough to break SHA256, it's also needed to break RIPEMD160 and ECDSA.

You could "just" break RIPEMD-160 & SHA-256 OR ECDSA (limited to addresses where the PubKey is known).

Find a PubKeyB such that for an existing PubKey A they both produce the same PubKeyHash.

i.e.
RIPEMD-160(SHA-256(SHA-256(PubKeyA)) == PubKeyHashA
RIPEMD-160(SHA-256(SHA-256(PubKeyB)) == PubKeyHashB

If PubKeyHashA == PubKeyHashB then the private key for either PubKeyA or PubKeyB can spend coins sent to Address A or B even if PubKeyA =/= PubKeyB.

Remember in a normal Bitcoin tx you are not paying to the PubKey you are paying to the hash of the PubKey.

 

1. How do you get Private Key B that's needed to sign the transaction?

2. Isn't address generation RIPEMD-160(SHA-256(PubKey)) rather than RIPEMD-160(SHA-256(SHA-256(PubKey))?
prezbo
Sr. Member
****
Offline Offline

Activity: 430
Merit: 250


View Profile
December 22, 2013, 10:49:05 AM
 #43

Find a PubKeyB such that for an existing PubKey A they both produce the same PubKeyHash.

This implies a break in EC crypto as well, since by definition there is no efficient way to generate the private key from the public key the only way of doing this is by trial and error.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
December 22, 2013, 04:35:23 PM
Last edit: December 23, 2013, 03:00:26 AM by DeathAndTaxes
 #44

1. How do you get Private Key B that's needed to sign the transaction?

You would compute PubKeyB from PrivKeyB.  

Quote
2. Isn't address generation RIPEMD-160(SHA-256(PubKey)) rather than RIPEMD-160(SHA-256(SHA-256(PubKey))?

Yes.  Posting technical answers after bedtime is not recommended.  I fixed it.

Find a PubKeyB such that for an existing PubKey A they both produce the same PubKeyHash.

This implies a break in EC crypto as well, since by definition there is no efficient way to generate the private key from the public key the only way of doing this is by trial and error.

It depends on how severe the break in the hashing algorithm is.   Current to find a PubKeyHash preimage requires 2^160 inputs.  That is computationally infeasible.  If both RIPEMD-160 & SHA-256 were found to be significantly weakened through cryptanalysis it is possible (although unlikely in my opinion) that the average number of operations to produce a preimage would be reduced to a level that would make it computationally possible feasible to produce that number of keypairs.

That being said I honestly don't think this will be a useful attack vector, just pointing it out for he sake of completeness.  IMHO it is far more likely that ECDSA (or ECC in general or the specific curve used for Bitcoin) will be "broken" (and Bitcoin will migrate to new stronger address systems)  than either hashing algorithm (much less both of them).   Hashing algorithms have stood the test of time better than Public Key crypto and that advantage is compounded by the fact that Bitcoin uses two different algorithms.

Slight off topic but related: One thing I have always wondered is why Satoshi didn't "harden" mining the same way.  Something made Satoshi decide to "harden" the PubKeyHash by using two separate algorithms.  Why didn't he use the same hashing algorithm for both mining and pubkeys (i.e.  hash = RIPEMD-160(SHA-2(SHA-2(input)))  or hash = RIPEMD-160(SHA-2(input)) for both PubKeyHash and BlockHash )?  Whatever enhanced protected (however small or academic) it provides one it would provide the other.    It is likely academical because a break in SHA-256 might not even undermine mining but the code was there why not use it in both places?  We likely will never know.




eac15678
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
December 22, 2013, 09:49:16 PM
 #45

interesting to know this Smiley

Earthcoin (EAC) is one of the best coin!
Pages: « 1 2 [3]  All
  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!