Bitcoin Forum
September 24, 2018, 02:35:23 PM *
News: ♦♦ New info! Bitcoin Core users absolutely must upgrade to previously-announced 0.16.3 [Torrent]. All Bitcoin users should temporarily trust confirmations slightly less. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Private key calculations  (Read 582 times)
RentGPU
Sr. Member
****
Offline Offline

Activity: 560
Merit: 251


View Profile
August 26, 2017, 09:15:19 PM
 #1

Say i don't want to generate a random private key , but i want to convert a number to be my private key , so i tried to do the steps but it seems the sha256 online calculators are not working in the same way, the steps 1-add0x80 byte 2-sha256(step1) 3-sha255(step2) 4-first 4bytes 5-add first 4 bytes to step1(checksum).....the problem here is i use the sha256 online calculators to convert the first step but the result is not anything like it should be , if you know any online calculators i can use plz tell me , thx

Telegram ClockwiseCryptoNews join @ClockwiseCrypto
1537799723
Hero Member
*
Offline Offline

Posts: 1537799723

View Profile Personal Message (Offline)

Ignore
1537799723
Reply with quote  #2

1537799723
Report to moderator
1537799723
Hero Member
*
Offline Offline

Posts: 1537799723

View Profile Personal Message (Offline)

Ignore
1537799723
Reply with quote  #2

1537799723
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1537799723
Hero Member
*
Offline Offline

Posts: 1537799723

View Profile Personal Message (Offline)

Ignore
1537799723
Reply with quote  #2

1537799723
Report to moderator
1537799723
Hero Member
*
Offline Offline

Posts: 1537799723

View Profile Personal Message (Offline)

Ignore
1537799723
Reply with quote  #2

1537799723
Report to moderator
1537799723
Hero Member
*
Offline Offline

Posts: 1537799723

View Profile Personal Message (Offline)

Ignore
1537799723
Reply with quote  #2

1537799723
Report to moderator
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 1526
Merit: 1654


3F1Y9yquzvY6RWvKbw2n2zeo9V5mvBhADU


View Profile WWW
August 26, 2017, 10:18:38 PM
 #2

Are you hashing the number as a string? Is it in decimal or hex?

You must be hashing your number as bytes. Otherwise it will not be correct as you would be hashing a string.

slavikus
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
August 27, 2017, 11:08:32 AM
 #3

You can also play around and verify your results with http://gobittest.appspot.com/Address
Coding Enthusiast
Sr. Member
****
Offline Offline

Activity: 503
Merit: 320


Novice C♯ Coder


View Profile WWW
August 27, 2017, 01:12:50 PM
 #4

Here you go:
Step2 SHA256: http://www.fileformat.info/tool/hash.htm?hex=800C28FCA386C7A227600B2FE50B7CAE11EC86D3BF1FBE471BE89827E19D72AA1D
Step3 SHA256: http://www.fileformat.info/tool/hash.htm?hex=8147786c4d15106333bf278d71dadaf1079ef2d2440a4dde37d747ded5403592

Those online tools like this one http://passwordsgenerator.net/sha256-hash-generator/ you use are treating your Hex as a string.

P.S. Example was taken from wiki, and I hate the person who added _SAMPLE_PRIVATE_KEY_DO_NOT_IMPORT_ to the copied result  Angry Be careful to remove it when you are trying to test and copy things or it will cause you a lot of headache since you may not know why the result is wrong with first look.

Projects List+Suggestion box
Donation link using BIP21
Bech32 Donation link!
BitcoinTransactionTool (0.9.2):  Ann - Source Code
Watch Only Bitcoin Wallet (supporting SegWit) (3.1.0):  Ann - Source Code
SharpPusher (broadcast transactions) (0.10.0): Ann - Source Code

pebwindkraft
Full Member
***
Offline Offline

Activity: 246
Merit: 202


View Profile
August 29, 2017, 07:24:49 AM
 #5

besides the ones already mentioned, I used these links to play with keys and addresses:

https://www.bitaddress.org/
http://lenschulwitz.com/base58
http://ciyam.org/rawtx_helper.html
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!