Bitcoin Forum
June 28, 2024, 04:04:01 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Private/public key question  (Read 446 times)
Sausagesandwich (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
December 16, 2013, 01:09:40 PM
 #1

Hi all.

I've looked around for an answer to a very simple question but I can't find anything that's enlightened me.

Am I right in saying that the bitcoin algorithm works something like this? The private key is used to generate the public key which is used to generate the address. This process only works one way. The public key can't be generated from the address and the private key can't be generated from the public key. So practically the private key is all that's needed. The address can be forgotten and regenerated if the private key is still known (and can the public key)?

If I have that right then why the need for three pieces of information? Why can't you just have a key pair and the public key acts as the address?
BlockChainLottery
Sr. Member
****
Offline Offline

Activity: 332
Merit: 250


AwesomeDice.net


View Profile WWW
December 16, 2013, 01:25:08 PM
 #2

Yes, you're right. The address is more for human use I think.
It is shorter than when it's written in hexadecimal and it's base58 to get rid of the 0O, I1, etc pairs.
Different addresses could look the same if it was base64.

dandav101
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
December 16, 2013, 01:35:13 PM
 #3

Hi all.

I've looked around for an answer to a very simple question but I can't find anything that's enlightened me.

Am I right in saying that the bitcoin algorithm works something like this? The private key is used to generate the public key which is used to generate the address. This process only works one way. The public key can't be generated from the address and the private key can't be generated from the public key. So practically the private key is all that's needed. The address can be forgotten and regenerated if the private key is still known (and can the public key)?

If I have that right then why the need for three pieces of information? Why can't you just have a key pair and the public key acts as the address?



     This is probably the best explanation I've seen  so far! It definitely made the whole thing go "click" in my head!! Thank you very much for that and to the responder for confirming it!
BurtW
Legendary
*
Offline Offline

Activity: 2646
Merit: 1137

All paid signature campaigns should be banned.


View Profile WWW
December 16, 2013, 01:41:24 PM
 #4

Hi all.

I've looked around for an answer to a very simple question but I can't find anything that's enlightened me.

Am I right in saying that the bitcoin algorithm works something like this? The private key is used to generate the public key which is used to generate the address. This process only works one way. The public key can't be generated from the address and the private key can't be generated from the public key. So practically the private key is all that's needed. The address can be forgotten and regenerated if the private key is still known (and can the public key)?

If I have that right then why the need for three pieces of information? Why can't you just have a key pair and the public key acts as the address?

You are correct!  It is so refreshing to have someone research before posting a question!

Now the Bitcoin address is actually calculated by hashing the public key three times.  During this process the size is reduced from the size of the public key (512 bits or 257 bits) down to 160 bits and a checksum is added.  This is done for three basic reasons:

1) There is an added layer of security.  Instead of putting the public key in the blockchain we put the hash of the public key.  Given the hash in the very public blockchain it now takes two steps to figure out the private key:  hash -> public key -> private key.

2) This reduces the size of the block chain because the hash of the public key is smaller than the public key.

3) If we just used public keys then there would be no checksum.  The Bitcoin addresses have a checksum so if you type in an address by hand and make a mistake in one of the characters the address will be detected as invalid and you can be asked to type it in again.

Our family was terrorized by Homeland Security.  Read all about it here:  http://www.jmwagner.com/ and http://www.burtw.com/  Any donations to help us recover from the $300,000 in legal fees and forced donations to the Federal Asset Forfeiture slush fund are greatly appreciated!
Flanagan
Full Member
***
Offline Offline

Activity: 204
Merit: 100


View Profile
December 16, 2013, 01:57:11 PM
 #5

So my question now is:

If I only have a private key for an address of mine, could I use my bitcoins in that address just with that by, for example, importing it to an online wallet like blockchain?

I mean, could I just have that private key without the need to have a backup of any wallet?

Learn to listen, listen to learn.
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
December 16, 2013, 02:01:22 PM
 #6

I mean, could I just have that private key without the need to have a backup of any wallet?

Yes - basically your wallet simply holds your private keys (plus some tx information and labels that are not essential in terms of your actual BTC amounts).

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!