5

A Bitcoin wallet can handle multiple private keys. In ECC, you can have 2^256 private keys, and for each key, you can have 2^256 public keys. Assuming that's right (please correct me if I'm wrong), you generate a Bitcoin address basically by hashing a public key with a RIPEMD160 hash function, which can produce 2^160 different addresses.

Is the relationship between the Bitcoin address and the public key 1:1 (one address for each public key)? If not, how is it possible to connect more than one address to a single public key, since this "connection" is made through hash functions and the hash for one entry (the public key) doesn't change unless you change the entry itself?

Thanks in advance.

1 Answer 1

5

you generate a Bitcoin address basically by hashing a public key with a RIPEMD160 hash function,

You use HASH160, actually. HASH160 is RIPEMD160(SHA256(x)).

This is a good resource for learning how to transform a private key into a Bitcoin address: https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses

how is it possible to connect more than 1 address to a single public key

The compressed and uncompressed versions of an address hash to different values. That's one way that the same key could hash to two different values. There are also Hierarchical Deterministic wallets that allow you to take a single key, and derive many different subkeys from it, all of which have different addresses.

It's also not 1:1 in the sense that it's theoretically possible to create two different public keys that hash to the same value.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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