Title: Is this correct? Post by: RawDog on February 24, 2018, 03:23:41 PM 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? Title: Re: Is this correct? Post by: Coin-1 on February 24, 2018, 04:21:05 PM 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 (https://kobl.one/blog/create-full-ethereum-keypair-and-address/). As you can see, here is no using RIPEMD160 function. Title: Re: Is this correct? Post by: RawDog on February 25, 2018, 08:01:44 AM |