Pages:
Author

Topic: Understanding Public and Private Keys - page 2. (Read 2219 times)

full member
Activity: 224
Merit: 100
June 02, 2014, 12:17:24 PM
#29
how about blockchain?
i don't see any private key?

Sorry for all the question, i'm just want to learn more about bitcoin security  Embarrassed

The blockchain.info website creates an indexed database of all transactions that have ever been seen on the bitcoin network.  That allows them to create a website where you can search for and see transactions, addresses, and blocks.

The blockchain.info wallet service stores your private keys for you in encrypted form in their database.  When you want to create a transaction, they send these encrypted private keys to your web browser where their are decrypted with your password.  Then javascript software running in your web browser handles the creation of the bitcoin transaction and generating all the proper signatures.

so do you mean my private address well kept and secured from them with only my password, etc?
legendary
Activity: 1736
Merit: 1001
June 02, 2014, 12:10:29 PM
#28
damn, i still don't understand the meaning of having public and private key.
could someone explain it with simple sentences?


Private key of A = A can spend the coins
Public key  of A = you can get the address and send coins to A.

If you will a public key is (are many) padlock(s), they allow you to lock the coins for someone else without having the key.
The key to unlock the coins is the private key. There can be several copies of the same private key but thats not wise. Thats why its so important to take care of your wallet. It has your private keys.

so for example i buying pizza, and i pay them using private key?

and if i'm the seller i give them my public key?

Unfortunately, some people use the words "public key" to mean "bitcoin address".

A public key is NOT a bitcoin address (even though many confused people will tell you that it is).

You typically will never see and never know your public key.  The public key is used by the bitcoin protocol to verify digital signatures.

If you are buying a pizza, you will use bitcoin wallet software to create a bitcoin transaction that "sends the bitcoins to the pizza seller".

The bitcoin software will handle all the technical details for you.

If you want to know about those technical details:

The bitcoin wallet software will choose enough unspent outputs that you have received in the past so that the sum of the value is more than the amount you are "sending to the pizza seller".  These will all be listed in the transaction as "inputs".

Then the bitcoin wallet software will create a new output that assigns the desired value to the pizza merchant's bitcoin address, and a second output that assigns any extra amount from the sum of the inputs to an address in the bitcoin wallet.

The protocol requires digital signatures for each of those inputs proving that you have authorization to spend them.  The wallet uses the private keys to compute ECDSA digital signatures.  This is the mechanism that prevents other people from spending, or stealing your bitcoins.  Since they don't know your private keys, they are unable to generate the proper digital signatures, and the rest of the network just ignores any transaction that anyone else tries to create that would spend your bitcoins.  Of course, if a hacker can gain access to your private keys, then they can load them into wallet software of their own, and spend your bitcoins.

There is a mathematical relaitionship between the private key and the bitcoins address, but if only works in one direction.  If you know the private key, then you can compute the bitcoin address.  If you know the bitcoin address, it is impossible to compute the private key.  This means it is safe to give your bitcoin address to people (so they can send you bitcoins), since they can't figure out your private key.

The digital signature is also mathematically computed.  The particular mathematical relationship means that a signature can be verified without the private key as long as you have the public key.  Bitcoin includes the public key with the signature.  That way the entire network can verify the signature with the public key, and then can make sure that hashing the public key results in the correct bitcoin address.

how about blockchain?
i don't see any private key?

Sorry for all the question, i'm just want to learn more about bitcoin security  Embarrassed

That's the whole point of "private". Wink

I'm pretty sure there are no keys on the blockchain at all. Just transactions that are signed.
legendary
Activity: 3472
Merit: 4794
June 02, 2014, 12:08:05 PM
#27
how about blockchain?
i don't see any private key?

Sorry for all the question, i'm just want to learn more about bitcoin security  Embarrassed

The blockchain.info website creates an indexed database of all transactions that have ever been seen on the bitcoin network.  That allows them to create a website where you can search for and see transactions, addresses, and blocks.

The blockchain.info wallet service stores your private keys for you in encrypted form in their database.  When you want to create a transaction, they send these encrypted private keys to your web browser where their are decrypted with your password.  Then javascript software running in your web browser handles the creation of the bitcoin transaction and generating all the proper signatures.
full member
Activity: 224
Merit: 100
June 02, 2014, 11:59:32 AM
#26
damn, i still don't understand the meaning of having public and private key.
could someone explain it with simple sentences?


Private key of A = A can spend the coins
Public key  of A = you can get the address and send coins to A.

If you will a public key is (are many) padlock(s), they allow you to lock the coins for someone else without having the key.
The key to unlock the coins is the private key. There can be several copies of the same private key but thats not wise. Thats why its so important to take care of your wallet. It has your private keys.

so for example i buying pizza, and i pay them using private key?

and if i'm the seller i give them my public key?

Unfortunately, some people use the words "public key" to mean "bitcoin address".

A public key is NOT a bitcoin address (even though many confused people will tell you that it is).

You typically will never see and never know your public key.  The public key is used by the bitcoin protocol to verify digital signatures.

If you are buying a pizza, you will use bitcoin wallet software to create a bitcoin transaction that "sends the bitcoins to the pizza seller".

The bitcoin software will handle all the technical details for you.

If you want to know about those technical details:

The bitcoin wallet software will choose enough unspent outputs that you have received in the past so that the sum of the value is more than the amount you are "sending to the pizza seller".  These will all be listed in the transaction as "inputs".

Then the bitcoin wallet software will create a new output that assigns the desired value to the pizza merchant's bitcoin address, and a second output that assigns any extra amount from the sum of the inputs to an address in the bitcoin wallet.

The protocol requires digital signatures for each of those inputs proving that you have authorization to spend them.  The wallet uses the private keys to compute ECDSA digital signatures.  This is the mechanism that prevents other people from spending, or stealing your bitcoins.  Since they don't know your private keys, they are unable to generate the proper digital signatures, and the rest of the network just ignores any transaction that anyone else tries to create that would spend your bitcoins.  Of course, if a hacker can gain access to your private keys, then they can load them into wallet software of their own, and spend your bitcoins.

There is a mathematical relaitionship between the private key and the bitcoins address, but if only works in one direction.  If you know the private key, then you can compute the bitcoin address.  If you know the bitcoin address, it is impossible to compute the private key.  This means it is safe to give your bitcoin address to people (so they can send you bitcoins), since they can't figure out your private key.

The digital signature is also mathematically computed.  The particular mathematical relationship means that a signature can be verified without the private key as long as you have the public key.  Bitcoin includes the public key with the signature.  That way the entire network can verify the signature with the public key, and then can make sure that hashing the public key results in the correct bitcoin address.

how about blockchain?
i don't see any private key?

Sorry for all the question, i'm just want to learn more about bitcoin security  Embarrassed
legendary
Activity: 3472
Merit: 4794
June 02, 2014, 11:45:20 AM
#25
damn, i still don't understand the meaning of having public and private key.
could someone explain it with simple sentences?


Private key of A = A can spend the coins
Public key  of A = you can get the address and send coins to A.

If you will a public key is (are many) padlock(s), they allow you to lock the coins for someone else without having the key.
The key to unlock the coins is the private key. There can be several copies of the same private key but thats not wise. Thats why its so important to take care of your wallet. It has your private keys.

so for example i buying pizza, and i pay them using private key?

and if i'm the seller i give them my public key?

Unfortunately, some people use the words "public key" to mean "bitcoin address".

A public key is NOT a bitcoin address (even though many confused people will tell you that it is).

You typically will never see and never know your public key.  The public key is used by the bitcoin protocol to verify digital signatures.

If you are buying a pizza, you will use bitcoin wallet software to create a bitcoin transaction that "sends the bitcoins to the pizza seller".

The bitcoin software will handle all the technical details for you.

If you want to know about those technical details:

The bitcoin wallet software will choose enough unspent outputs that you have received in the past so that the sum of the value is more than the amount you are "sending to the pizza seller".  These will all be listed in the transaction as "inputs".

Then the bitcoin wallet software will create a new output that assigns the desired value to the pizza merchant's bitcoin address, and a second output that assigns any extra amount from the sum of the inputs to an address in the bitcoin wallet.

The protocol requires digital signatures for each of those inputs proving that you have authorization to spend them.  The wallet uses the private keys to compute ECDSA digital signatures.  This is the mechanism that prevents other people from spending, or stealing your bitcoins.  Since they don't know your private keys, they are unable to generate the proper digital signatures, and the rest of the network just ignores any transaction that anyone else tries to create that would spend your bitcoins.  Of course, if a hacker can gain access to your private keys, then they can load them into wallet software of their own, and spend your bitcoins.

There is a mathematical relaitionship between the private key and the bitcoins address, but if only works in one direction.  If you know the private key, then you can compute the bitcoin address.  If you know the bitcoin address, it is impossible to compute the private key.  This means it is safe to give your bitcoin address to people (so they can send you bitcoins), since they can't figure out your private key.

The digital signature is also mathematically computed.  The particular mathematical relationship means that a signature can be verified without the private key as long as you have the public key.  Bitcoin includes the public key with the signature.  That way the entire network can verify the signature with the public key, and then can make sure that hashing the public key results in the correct bitcoin address.
full member
Activity: 224
Merit: 100
June 02, 2014, 11:38:58 AM
#24
damn, i still don't understand the meaning of having public and private key.
could someone explain it with simple sentences?


Private key of A = A can spend the coins
Public key  of A = you can get the address and send coins to A.

If you will a public key is (are many) padlock(s), they allow you to lock the coins for someone else without having the key.
The key to unlock the coins is the private key. There can be several copies of the same private key but thats not wise. Thats why its so important to take care of your wallet. It has your private keys.

so for example i buying pizza, and i pay them using private key?

and if i'm the seller i give them my public key?

Yes.
If you (A) buy a pizza, the person selling the pizza (B) gives you public key B. Now you make a transaction (10,000 BTC for 2 Pizza) and sign it with private key A. Now everyone else knowns (via the blockchain) that you have 10,000 BTC less and B has 10,000 BTC more. Now B can spend the 10,000 with B's private key etc.

haha, thanks for the explanation!.
finally understand  Wink
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
June 02, 2014, 11:32:52 AM
#23
damn, i still don't understand the meaning of having public and private key.
could someone explain it with simple sentences?


Private key of A = A can spend the coins
Public key  of A = you can get the address and send coins to A.

If you will a public key is (are many) padlock(s), they allow you to lock the coins for someone else without having the key.
The key to unlock the coins is the private key. There can be several copies of the same private key but thats not wise. Thats why its so important to take care of your wallet. It has your private keys.

so for example i buying pizza, and i pay them using private key?

and if i'm the seller i give them my public key?

Yes.
If you (A) buy a pizza, the person selling the pizza (B) gives you public key B. Now you make a transaction (10,000 BTC for 2 Pizza) and sign it with private key A. Now everyone else knowns (via the blockchain) that you have 10,000 BTC less and B has 10,000 BTC more. Now B can spend the 10,000 with B's private key etc.
full member
Activity: 224
Merit: 100
June 02, 2014, 11:18:41 AM
#22
damn, i still don't understand the meaning of having public and private key.
could someone explain it with simple sentences?


Private key of A = A can spend the coins
Public key  of A = you can get the address and send coins to A.

If you will a public key is (are many) padlock(s), they allow you to lock the coins for someone else without having the key.
The key to unlock the coins is the private key. There can be several copies of the same private key but thats not wise. Thats why its so important to take care of your wallet. It has your private keys.

so for example i buying pizza, and i pay them using private key?

and if i'm the seller i give them my public key?
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
June 02, 2014, 11:13:20 AM
#21
damn, i still don't understand the meaning of having public and private key.
could someone explain it with simple sentences?


Private key of A = A can spend the coins
Public key  of A = you can get the address and send coins to A.

If you will a public key is (are many) padlock(s), they allow you to lock the coins for someone else without having the key.
The key to unlock the coins is the private key. There can be several copies of the same private key but thats not wise. Thats why its so important to take care of your wallet. It has your private keys.
full member
Activity: 224
Merit: 100
June 02, 2014, 11:06:24 AM
#20
damn, i still don't understand the meaning of having public and private key.
could someone explain it with simple sentences?
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
June 01, 2014, 05:24:08 AM
#19
-snip-

Without getting too abstract, can you, without doubt, say that we actually understand completely the dynamics of probablity?

It is -mathematically speaking- not clear what randomness is. This however is no issue when analysing it, as long as you keep "luck" or "gods will" out of the equation.

Is it truly random as you assume?

True randomness -if it even exists- is hard to generate for computers. Thats why the safety of your coins is tied to the quality of the random number generator your operation system uses. If your random number generator (RNG) is bad the chance that someone else gets the same keys is high. E.g. android phone RNG https://bitcoin.org/en/alert/2013-08-11-android
This is easy to understand. If you have only 4 random bits instead of 160 you only have 24 = 16 different keys. So the chance of a collision increases drastically with every new key. The pool of possible keys on the other hand is doubled with every bit.

What if it's not.

This starts to get philosophical. If you dont have randomness you cant have security. This is not limited to bitcoin, this would also effect online banking and credit cards.
There is currently no known attack against the algorithms used by bitcoin. The RNG can be bad, the code can be bad, but the algorithms are good.
However the bitcoin protocoll can be changed, its not set in stone. The strong crypto algorithms of today may tomorrow be weak and can be replaced by newer stronger ones.


Yes, its satirical.
newbie
Activity: 56
Merit: 0
June 01, 2014, 04:53:01 AM
#18
This would be very comforting, if it wasn't for the fact that less than 500 years ago scientists believed the Sun revolved around the Earth. Humans are consistently creating theories to fit an infinite universe into a finite mind, and ending up proving ourselves wrong and looking foolish. Without getting too abstract, can you, without doubt, say that we actually understand completely the dynamics of probablity? Is it truly random as you assume? What if it's not. Have you heard of Murphy's laws?

http://www.murphys-laws.com/murphy/murphy-laws.html
member
Activity: 70
Merit: 10
Deceased
June 01, 2014, 03:40:55 AM
#17
Public key and Address are two completely different things, your address is made from your public key but you don't normally see your public key.
legendary
Activity: 4438
Merit: 3387
June 01, 2014, 02:06:44 AM
#16
You can try to generate as many addresses as you can to try your luck. Winning some big lottery is easier actually Cheesy
No use, Bitcoin is designed to prevent duplicate address.

Bitcoin is not designed to prevent duplicate addresses.
full member
Activity: 192
Merit: 100
Hi!
June 01, 2014, 01:10:09 AM
#15
Can anybody explain in simple form why keys are safe?

There are several exchanges with wallets, desktop wallets, web wallets, mobile wallets, etc, and all of them are generating new addresses and private keys all the time for every user. And none of them are telling the other what keys have been used already. So why is it not possible that duplicate addresses can be created? Why is it not possible that a private key can be discovered by luck or brute force?

You can try to generate as many addresses as you can to try your luck. Winning some big lottery is easier actually Cheesy
No use, Bitcoin is designed to prevent duplicate address.
newbie
Activity: 1
Merit: 0
June 01, 2014, 12:04:31 AM
#14
Can anybody explain in simple form why keys are safe?

There are several exchanges with wallets, desktop wallets, web wallets, mobile wallets, etc, and all of them are generating new addresses and private keys all the time for every user. And none of them are telling the other what keys have been used already. So why is it not possible that duplicate addresses can be created? Why is it not possible that a private key can be discovered by luck or brute force?

You can try to generate as many addresses as you can to try your luck. Winning some big lottery is easier actually Cheesy
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
legendary
Activity: 3472
Merit: 4794
Humans are just really bad at understanding just how big a number is when numbers start getting REALLY REALLY big.

We're not talking about lottery winning numbers here.

We're talking about:

Ok, new data, will recalc everything:

  • probability of getting struck by lightning in any given year: 1/280000.
  • probability of taking a shit at any given point in time: 1/(60*24) = 1/1440 (assuming you take a crap every day and the actual process takes 1 minute)
  • probability of getting struck by lightning while taking a crap in any given year: 1/(280000*1440) = 1/1.47E11 = 2.48E-9
  • probability of taking a crap while being in a situation where being struck by lightning can actually occur = 1/1440 = 0.25 = 1.74E-4
  • probability of finding a collision: 1E-65
  • getting hit by lightning while taking a crap for how many years in a row is equally probable as finding a collision: log(1E-65) / log(1.74E-4) = 17.3

is my math roughly correct now?

If so, I can say: "Finding a collision is about as likely as being struck by lightning while taking a crap every year for 17 years in a row".

It just isn't going to happen as long as the numbers being generated are from a random enough source.

Now, what can happen, is that an operating system or wallet program can have a very inadequate way of generating random numbers such that they aren't truly random.  Due to poor design, the program could fall into some pattern of numbers that initially seem random, but actually aren't.  If that happens, then two people running the same program could potentially generate the same addresses.
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
-snip-So how do they know they are not creating an address which was already created?

They dont.

The chances are extremely slim, but technically speaking, it IS POSSIBLE.

probabilistically speaking: it will not happen.


-snip-
as finding a single water molecule in every water source (this would ofc include animals and humans) on earth.
-snip-
legendary
Activity: 4438
Merit: 3387
The chances are extremely slim, but technically speaking, it IS POSSIBLE.

Please watch this: https://www.youtube.com/watch?v=KX5jNnDMfxA


Pages:
Jump to: