Author

Topic: Public keys and Addresses - Are there striking similarities or difference (Read 160 times)

hero member
Activity: 2366
Merit: 793
Bitcoin = Financial freedom
BTW How many addresses we can generate from one public key and how many public keys we can generate from one private key? As far as I understand from the internet, we can't generate so many public keys from private keys, as using the cryptographic function on private keys kinda gives us the same public key always CMIIW. I also read that we can generate a compressed form of the Public key.

So it means, we can't generate so many public keys from one private key but we can generate so many addresses from one public key right? As electrum wallet can generate us different addresses from the same public key.


To answer your question you can't generate multiple public keys from one private key. You need to use different derivation paths to create different addresses from the same public key so the addresses created using different derivation paths will have different priv keys.

I think you are confused with seed and private keys.

Seed is a master key from that you can generate as many addresses as you want so the private keys for each generated address will be possible to obtain via Electrum and that's the same in almost all SPV.
hero member
Activity: 1386
Merit: 513
Payment Gateway Allows Recurring Payments
It's a good topic it has refreshed the information for me. As I almost forgot these. BTW How many addresses we can generate from one public key and how many public keys we can generate from one private key? As far as I understand from the internet, we can't generate so many public keys from private keys, as using the cryptographic function on private keys kinda gives us the same public key always CMIIW. I also read that we can generate a compressed form of the Public key.

So it means, we can't generate so many public keys from one private key but we can generate so many addresses from one public key right? As electrum wallet can generate us different addresses from the same public key.

legendary
Activity: 2310
Merit: 4085
Farewell o_e_l_e_o

Write shortly please.

You can read more from

People only need to save their private keys from which they can get Public Keys and Addresses. Address is another shorter version of Public Key after using Hash function to compress the corresponding Public Key.

In short, for back up, do it with your private key; for receiving bitcoin, do it with your public address.

See more with address prefixes.
https://en.bitcoin.it/wiki/List_of_address_prefixes
full member
Activity: 168
Merit: 138
cout << "Bitcoin";
Thanks for pointing this out. I guess they are generated and represented in this form, with a leading "3"

Code:
3M2GhZW2FsMdfezHDBvjMEAZz6wkB32LMG
staff
Activity: 3458
Merit: 6793
Just writing some code
Addresses are not just public key hashes, they can be script hashes too, and some contain the public key itself.

Addresses are really an encoding for an output script. They inform the sender exactly what output script to create. In some instances, it is a script which contains a public key hash. I'm other instances, it is a script which contains a script hash. For yet others, a public key directly.
full member
Activity: 168
Merit: 138
cout << "Bitcoin";
Bitcoin when examined as a course of study is filled with so many terminologies. From my observations, this terminologies are interconnected, which means they some how relate with one and another. This also means that understanding one terminology isn't useless at all, as it might serve as a basic knowledge to understanding another. One mistake common mistake observe when trying to understand Bitcoin in general is Misconception. I personally don't see misconception as something bad, but when there is an absence of means of correction, then there will be a big problem to the person who has understood something wrongly.

While going through the Development & Technical Discussion board, I bumped into a reply from Charles-Tim https://bitcointalksearch.org/topic/m.60236230, where he pointed out that the OP had misused Address for Public key. Don't judge me, but to be sincere, I literally don't know about this either. I personally use both word for same purpose, but didn't know that they are totally different. Though, Charles-Tim didn't give an explanation to the difference, so I actually did the digging myself.

I discovered that so many articles online explain the two concepts in a similar way, which would make someone new to think that it's actually same word. Most of the articles online would practically explain that the both of them are used in receiving Bitcoin, without necessary distinguishing one from the other. Learning the difference between these two wasn't easy at first due to the technical terminologies attached. But I was able to grasp the main context.

Public keys
The basic usage of the public key is for encryption and validation of signature. It is generated from the private key through a mathematical function called "elliptic curve multiplication" as shown in the diagram below. A public key is not the main recipient of a transaction, but rather part of the address itself.

Address
The basic usage of Address is to receive Bitcoin from anyone. It is also generated from something, but this time around the Public key. Address practically contains about 25 to 40. alphanumeric characters. the mathematical function in getting a wallet address from a public key is known as a one-way function, and the process is known as hashing. This also means that an address is a hash of a public key. The two common wallet address are the SegWit wallet address(which begins 3 or bc1) and Legacy wallet address(which begins with 1).

Example

Code: (SegWit Compatible)
3M2GhZW2FsMdfezHDBvjMEAZz6wkB32LMG

Code: (SegWit native)
bc1q0g56m6qysn5a6nj23hq5ujjzzj54mjuzzt33ca

Code: (legacy)
14bwXt7qPV8HJJmF2oYUpJecHQL9Pr9zwu





I had to draw the diagram above, which is a practical representation of an ideal wallet. The explanation given below explains how they all work(maybe not too technical), with the public key and address inclusive.


1. Private key: also known as decryption key is a key that is used to access Bitcoin and also authorize transactions. This key are confidential and should be made a secret from the general public. only the owner of the wallet should have access to this. The private key is generated when a new wallet is setup.

2. Address: As I have explained before, Bitcoin are assigned to the wallet address, and an address is a hash of a public key.

3. Message: practically contains transaction amount, input(receivers address) and Output (sender's address).

4. Signature: The signature verifies the authenticity of a digital message(transaction inputs).

5. Public key: also known as encryption key, is for the validation of transactions. When a sender sends a certain amount, the public key would validate the signature signed by the sender inorder to ensure it's authenticity.

The completion of the remaining process is left to the miner.

Note: if you noticed, you observe that the public key is generated from the private, while the address is generated from the public key. This order should be in a one way order, and not the reverse. when I say not the reverse, I mean: the public key should never be derived from the address, and the private key should never be derived from the public key.



So for the purpose of proper statement construction, I think using the word "address" while referring to receiving Bitcoin is more appropriate, rather than saying "Public key".

I think there might be other technic difference between these two.



Note: Bitcoin was my primary word rather than using cryptocurrency for generalization. And Address is same as wallet address.

The wallet address above are very much active, you can check them out on any explorer.

I am 100% open to correction as I still see myself as a learner. Pardon any of my error and share your personal opinion. You might want to also DOYR after reading this.
Jump to: