Author

Topic: Is this correct? (Read 229 times)

legendary
Activity: 1596
Merit: 1026
February 25, 2018, 04:01:44 AM
#3
legendary
Activity: 2450
Merit: 2190
February 24, 2018, 12:21:05 PM
#2
Is the relationship between public key and private key the same for Ethereum and Bitcoin?

Ethereum uses the digital signature ECDSA with secp256k1 curve too, but for generating the ETH-address it uses the "cutted" KECCAK256, not RIPEMD160 function.


Quote
ie if you convert a Base58Check to hex will it function as the public key / Ethereum address?

No. The results of those hash functions differ.


Quote
If not, what is the relationship between priv/pub keys in Ethereum?

How to create a keypair in Ethereum:

# At the first, generate the private and public keys
> openssl ecparam -name secp256k1 -genkey -noout  |  openssl ec -text -noout > Key

# At the second, extract the public key and remove the Elliptic Curve prefix 0x04
> cat Key  |  grep pub -A 5  |  tail -n +2  |  tr -d '\n[:space:]:'  |  sed 's/^04//' > pub

# Then extract the private key and remove the leading zero byte
> cat Key  |  grep priv -A 3  |  tail -n +2  |  tr -d '\n[:space:]:'  |  sed 's/^00//' > priv

# At the end, generate the hash and take the address part
> cat pub  |  keccak-256sum -x -l  |  tr -d ' -' | tail -c 41 > address

Read more here.

As you can see, here is no using RIPEMD160 function.
legendary
Activity: 1596
Merit: 1026
February 24, 2018, 11:23:41 AM
#1
Is the relationship between public key and private key the same for Ethereum and Bitcoin?  

ie if you convert a Base58Check to hex will it function as the public key / Ethereum address?

If not, what is the relationship between priv/pub keys in Ethereum? 
Jump to: