Bitcoin Forum
December 13, 2024, 05:49:56 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Help with 256 bit generator  (Read 130 times)
release (OP)
Member
**
Offline Offline

Activity: 184
Merit: 14


View Profile
November 04, 2020, 06:47:07 AM
 #1

Hi guys I am trying learn the relationship between 256 bit encryption and bitcoins addresses and private keys. I remember something ages ago which showed the bits (256) corresponding with the private key. Can someone point me in the direction of such a resource.

Thanks
Coding Enthusiast
Legendary
*
Offline Offline

Activity: 1043
Merit: 2824


Bitcoin and C♯ Enthusiast


View Profile WWW
November 04, 2020, 08:28:30 AM
Merited by ABCbits (3), Heisenberg_Hunter (1)
 #2

Hi guys I am trying learn the relationship between 256 bit encryption and bitcoins addresses and private keys.
For starters, there is no "encryption" in this process.
Choose a number between 1 and curve order --> calculate public key point[1] --> compute hash of it[2] <--> encode the hash to get the address[3]
--> represents a one way operation while <--> represents a reversible (two way) operation.

I remember something ages ago which showed the bits (256) corresponding with the private key. Can someone point me in the direction of such a resource.
In asymmetric cryptography using elliptic curves[4] the private keys are numbers between 1 and the curve order N. In bitcoin we are using a curve called secp256k1 which is a 256-bit curve that has an order that is slightly below 2256 (0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141).
In other words bitcoin private keys are random numbers chosen in this range.

[1] https://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication
[2] Depending on the address type (or more accurately the pubkey script type) the hash algorithm used can be different, but in majority of cases it is RIPEMD160 of SHA256 of 33 or 65 byte public key
[3] https://en.bitcoin.it/wiki/Base58Check_encoding or https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki again depending on the address type
[4] https://en.wikipedia.org/wiki/Elliptic-curve_cryptography and https://blog.cloudflare.com/a-relatively-easy-to-understand-primer-on-elliptic-curve-cryptography/

Projects List+Suggestion box
Donate: 1Q9s or bc1q
|
|
|
FinderOuter(0.20.0)Ann-git
Denovo(0.7.0)Ann-git
Bitcoin.Net(0.26.0)Ann-git
|
|
|
BitcoinTransactionTool(0.11.0)Ann-git
WatchOnlyBitcoinWallet(3.2.1)Ann-git
SharpPusher(0.12.0)Ann-git
PawGo
Legendary
*
Offline Offline

Activity: 952
Merit: 1386


View Profile
November 04, 2020, 08:31:39 AM
Merited by MrFreeDragon (2)
 #3

Hi guys I am trying learn the relationship between 256 bit encryption and bitcoins addresses and private keys. I remember something ages ago which showed the bits (256) corresponding with the private key. Can someone point me in the direction of such a resource.

Thanks

Maybe this:
https://btckeygen.com/
and sources for running on your computer: https://github.com/MrFreeDragon/VisualBTC
odolvlobo
Legendary
*
Offline Offline

Activity: 4522
Merit: 3426



View Profile
November 05, 2020, 05:52:45 AM
 #4

Hi guys I am trying learn the relationship between 256 bit encryption and bitcoins addresses and private keys. I remember something ages ago which showed the bits (256) corresponding with the private key. Can someone point me in the direction of such a resource.

Thanks

You can find some good (but dated) step-by-step demos here: https://gobittest.appspot.com/

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
PawGo
Legendary
*
Offline Offline

Activity: 952
Merit: 1386


View Profile
November 05, 2020, 07:41:07 AM
 #5

Hi guys I am trying learn the relationship between 256 bit encryption and bitcoins addresses and private keys. I remember something ages ago which showed the bits (256) corresponding with the private key. Can someone point me in the direction of such a resource.

Thanks

Maybe this:
https://btckeygen.com/
and sources for running on your computer: https://github.com/MrFreeDragon/VisualBTC


Or this: https://learnmeabitcoin.com/technical/
It shows the whole sequence of transformations: private key->public key->hash->address etc.
Saint-loup
Legendary
*
Offline Offline

Activity: 2828
Merit: 2436



View Profile
November 08, 2020, 02:19:21 PM
 #6

Hi guys I am trying learn the relationship between 256 bit encryption and bitcoins addresses and private keys. I remember something ages ago which showed the bits (256) corresponding with the private key. Can someone point me in the direction of such a resource.

Thanks
Here you can see how a private key in WIF format is computed from its hexadecimal number.

https://en.bitcoin.it/wiki/Wallet_import_format

An hexadecimal number is just a binary(or even decimal) number converted in hexadecimal base, so you can simply do the conversion from your binary string with a calculator before applying this algorithm.

PS : all the tools above are very interesting, I only knew the one from MrFreeDragon. Thank you for sharing them PawGo and odolvlobo

██
██
██
██
██
██
██
██
██
██
██
██
██
... LIVECASINO.io    Play Live Games with up to 20% cashback!...██
██
██
██
██
██
██
██
██
██
██
██
██
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!