I have been trying to read about how Public key cryptography works and I have just understand what public key cryptography is and how it differs from symmetric key cryptography.

I have also just read that the bitcoin uses "Elliptic Curve Digital Signature Algorithm (ECDSA)" to generate Public/Private key pairs, and then

the public key is hashed several times until it looks like the familiar Bitcoin address.

I then read here, https://ethereum.stackexchange.com/questions/3542/how-are-ethereum-addresses-generated that Ethereum also uses ECDSA to generate key pair and then the Keccak-256 hash of the public key is taken.

My question is, do all the cryptocurrencies in existence uses the same algorithm to generate key pairs ?, if that is true, can a single Public/Private key pair be used to store multiple currencies given that the public key is hashed according to each cryptocurrency standard ?


Not necessarily.

A cryptocoin can use whatever asymmetric algorithm they choose, and I'm sure some have tried different things, but ECDSA has a big advantage: public keys are generated from private keys.

With asymmetric algorithms like RSA, public and private keys are both generated together. With ECDSA, you choose a random number (within certain limits), and that is your private key. Now all you have to do is calculate the corresponding public key from your private key. This makes new address generation quick, and computationally inexpensive. It also allows for schemes such as BIP32 HD Wallets.

Also be aware that ECDSA can use the same algorithm using different elliptic curves. Bitcoin uses secp256k1, but other curves exist as well.

In the end, it depends on the currency. There is so much diversity nowadays, I doubt very much that they all use the same algorithm and curve.


If you would like to see each step, you can look at some online tools, like https://gobittest.appspot.com/ .

Here you can test all values with different prefix and different net byte. Calculation is the same for all bitcoin based blockchain wallets.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.