Bitcoin Forum
July 06, 2024, 02:56:02 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Generate Privkey  (Read 667 times)
Monopoly (OP)
Hero Member
*****
Offline Offline

Activity: 546
Merit: 500



View Profile
August 15, 2015, 07: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 ?
unholycactus
Legendary
*
Offline Offline

Activity: 1078
Merit: 1024



View Profile WWW
August 15, 2015, 07: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.
OmegaStarScream
Staff
Legendary
*
Offline Offline

Activity: 3528
Merit: 6187



View Profile
August 15, 2015, 07: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

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1520


No I dont escrow anymore.


View Profile WWW
August 16, 2015, 03:09:06 PM
 #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.

Im not really here, its just your imagination.
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!