Author

Topic: Generate Privkey (Read 689 times)

copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
August 16, 2015, 10:09:06 AM
#4
Hello ..... How bitcoin core makes a Privkey?

As unholycactus said, a private key is just a number within a certain range.

the privkeys are prepared in bitcoin core and it chooses one of them ?

Bitcoin core pregenerates 100 private keys by default in order to make backups hold longer (among other reasons). If you ask the interface to show you a new wallet it will use one of the pregenerated ones from a list and make sure that it refills the list the next time the wallet is unlocked.

or it has a mechanism for making the privkey ?
If there is a sequence order to make Privkeys what are these orders and mechanisms ?

Yes.

Step #1 Select a number between 0 and FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4140 (in hexadecimal system)
Done.

This number should be random though. Many private keys that are not generated random, e.g. the first few million should be considered unsafe.
staff
Activity: 3500
Merit: 6152
August 15, 2015, 02:30:34 PM
#3
Hello ..... How bitcoin core makes a Privkey ? the privkeys are prepared in bitcoin core and it chooses one of them ? or it has a mechanism for making the privkey ?
If there is a sequence order to make Privkeys what are these orders and mechanisms ?

Few things that should make you understand all this :

https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses
https://en.bitcoin.it/wiki/How_bitcoin_works
https://en.bitcoin.it/wiki/Private_key


To more understand how they are generated and coded then this should be for you , some open source projects that does that (simple stuff) or you still can check Blockchain.info source code , Bitcoin Core, Electrum and all those open source wallets.
https://github.com/pointbiz/bitaddress.org (Check Bitadress.org for the demo)
https://github.com/weex/addrgen
legendary
Activity: 1078
Merit: 1024
August 15, 2015, 02:20:28 PM
#2
Hello ..... How bitcoin core makes a Privkey ? the privkeys are prepared in bitcoin core and it chooses one of them ? or it has a mechanism for making the privkey ?
If there is a sequence order to make Privkeys what are these orders and mechanisms ?

It basically randomly generates a number (usually 256-bit), this private key is then used to create a public address.
hero member
Activity: 546
Merit: 500
August 15, 2015, 02:10:34 PM
#1
Hello ..... How bitcoin core makes a Privkey ? the privkeys are prepared in bitcoin core and it chooses one of them ? or it has a mechanism for making the privkey ?
If there is a sequence order to make Privkeys what are these orders and mechanisms ?
Jump to: