what's up?

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

My question is: is the relationship between the Bitcoin address and the public key 1:1 (1 addr for each public key)? If not, how is it possible to connect more than 1 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.

up vote 4 down vote accepted

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.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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