Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: no_alone on December 03, 2013, 09:57:45 PM



Title: How bitcoin-qt generate address and how do I know they are really random?
Post by: no_alone on December 03, 2013, 09:57:45 PM
How bitcoin-qt generate address and how do I know they are really random?

Thanks.


Title: Re: How bitcoin-qt generate address and how do I know they are really random?
Post by: Gyrsur on December 03, 2013, 10:08:01 PM
How bitcoin-qt generate address and how do I know they are really random?

Thanks.

it's Open Source. this means the source code is not a secret and you can assume it is reviewed serveral times from different parties.

https://github.com/bitcoin/bitcoin/blob/master/src/key.cpp


Title: Re: How bitcoin-qt generate address and how do I know they are really random?
Post by: no_alone on December 03, 2013, 10:17:40 PM
any info about EC_KEY_regenerate_key(..) What is the seed that it gets? from where the random part. the pc is only pseudo random


Title: Re: How bitcoin-qt generate address and how do I know they are really random?
Post by: Gyrsur on December 03, 2013, 10:21:27 PM
I guess the random part comes from the OpenSSL lib:

Code:
#include <openssl/rand.h>


Title: Re: How bitcoin-qt generate address and how do I know they are really random?
Post by: no_alone on December 03, 2013, 10:25:16 PM
but computer can not generate reall random numbers.. Is there a way to create a bitcoin address that is connected to something I add .. like a string that I can add..?


Title: Re: How bitcoin-qt generate address and how do I know they are really random?
Post by: Gyrsur on December 03, 2013, 10:27:54 PM
ask the core devs.


Title: Re: How bitcoin-qt generate address and how do I know they are really random?
Post by: grue on December 03, 2013, 10:30:46 PM
but computer can not generate reall random numbers.. Is there a way to create a bitcoin address that is connected to something I add .. like a string that I can add..?

go to http://bitaddress.org/, use the "brainwallet" option.

inb4 inevitable "MY BRAIN WALLET WAS HACKED!"


Title: Re: How bitcoin-qt generate address and how do I know they are really random?
Post by: Abdussamad on December 04, 2013, 06:20:56 AM
but computer can not generate reall random numbers.. Is there a way to create a bitcoin address that is connected to something I add .. like a string that I can add..?


Computers generate "better" random numbers than humans so leave it be.


Title: Re: How bitcoin-qt generate address and how do I know they are really random?
Post by: no_alone on December 04, 2013, 07:38:28 AM
but computer can not generate reall random numbers.. Is there a way to create a bitcoin address that is connected to something I add .. like a string that I can add..?

go to http://bitaddress.org/, use the "brainwallet" option.

inb4 inevitable "MY BRAIN WALLET WAS HACKED!"


using a online website to create an address.. Really?


Title: Re: How bitcoin-qt generate address and how do I know they are really random?
Post by: gmaxwell on December 04, 2013, 07:40:19 AM
go to http://bitaddress.org/, use the "brainwallet" option.
inb4 inevitable "MY BRAIN WALLET WAS HACKED!"
I realize you're joking there, as you've indicated with your small text. But a lot of users are really confused by this stuff and will actually do this, and over and over again they get robbed.

Desktop computers are actually quite good sources of randomness. They monitor the precise timing between keypresses, mouse movements, disk seeks, network packets, and other sources of enviromental nodes and then they combine this data into randomness pools which are stored by cryptographic hashes so that even if most of the data that goes in is unpredictable, so long as there is only a few hundred bits of actual randomness that makes it in all the output is at least computationally sound.

Bitcoin-qt retains its own randomness pool— really the openssl code— and augments it with further entropy from timing and, on windows, a screenshot at startup.


Title: Re: How bitcoin-qt generate address and how do I know they are really random?
Post by: Martijnvdc on December 04, 2013, 03:24:51 PM
You can create key pairs manually by throwing dice, if you want...


Title: Re: How bitcoin-qt generate address and how do I know they are really random?
Post by: no_alone on December 04, 2013, 05:55:22 PM
You can create key pairs manually by throwing dice, if you want...

How can I do it?