Bitcoin Forum
September 18, 2018, 08:39:21 PM *
News: Latest stable version of Bitcoin Core: 0.16.2  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Question about SHA256 address  (Read 331 times)
Fizak
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
August 29, 2017, 01:23:13 PM
 #1

So, a SHA256 private key is just a random 256 bits number. Does it means that I can use a bitcoin address on any coin using the SHA256 algo?
What about others algo?
I think I missed something.
1537303161
Hero Member
*
Offline Offline

Posts: 1537303161

View Profile Personal Message (Offline)

Ignore
1537303161
Reply with quote  #2

1537303161
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1537303161
Hero Member
*
Offline Offline

Posts: 1537303161

View Profile Personal Message (Offline)

Ignore
1537303161
Reply with quote  #2

1537303161
Report to moderator
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 1526
Merit: 1624


3F1Y9yquzvY6RWvKbw2n2zeo9V5mvBhADU


View Profile WWW
August 29, 2017, 02:05:45 PM
 #2

So, a SHA256 private key is just a random 256 bits number.
There is no such thing as "a SHA256 private key". SHA256 is not a private key generation algorithm, it is a hashing algorithm. Do not use SHA256 to generate your private keys as it is not secure. The data that you are hashing will most likely not be random enough to be a secure private key.

Private keys are ECDSA private keys, specifically private keys for the secp256k1 curve. They are just 256 bit random integers.

Does it means that I can use a bitcoin address on any coin using the SHA256 algo?
You can use your Bitcoin private keys with anything that uses ECDSA and secp256k1. You won't have the same address and the import formats will be different because there is additional encoding to differentiate so that people don't accidentally use the wrong addresses.

DannyHamilton
Legendary
*
Offline Offline

Activity: 2198
Merit: 1373



View Profile
August 29, 2017, 02:11:58 PM
 #3

So, a SHA256 private key

What is a SHA256 private key?

A bitcoin private key is just a random number between 1 and 115792089237316195423570985008687907852837564279074904382605163141518161494336.

While the results of the SHA256 algorithm typically fall within that range, there is no need to use SHA256 when generating private keys. Any number chosen randomly enough will work.

Does it means that I can use a bitcoin address on any coin using the SHA256 algo?

That depends on the signature algorithm that the altcoin is using and how the altcoin generates their addresses.

What about others algo?

If the coin uses a different algorithm for generating addresses, then their address won't be the same for the same private key.

I think I missed something.

I think you missed a LOT.

  • You missed the fact that Bitcoin uses ECDSA key pairs.
  • You missed the fact that the standard version 1 Bitcoin addresses requires hashing the public key with SHA256
  • You missed the fact that the standard version 1 Bitcoin addresses requires hashing the SHA256 hash with RIPEMD160
  • You missed the fact that the standard version 1 Bitcoin addresses requires a version byte in the front that tells the wallet what to do with the address.
  • You missed the fact that the standard version 1 Bitcoin addresses requires the resulting value to be base58check encoded.

Fizak
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
August 29, 2017, 02:25:25 PM
 #4

Thanks for your answers! I go back to learn  Grin
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!