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.
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.
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.