Bitcoin Forum
September 27, 2018, 10:46:35 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: looking for technical info  (Read 642 times)
CanaryInTheMine
Donator
Legendary
*
Offline Offline

Activity: 1862
Merit: 1003


between a rock and a block!


View Profile
August 25, 2011, 11:09:54 PM
 #1

could someone point me to where I can see code /pseudo/code for the calculation of a hash.  step by step would be awesome, but anything would be helpful too.

            ▄▄████▄▄
        ▄▄██████████████▄▄
      ███████████████████████▄▄
      ▀▀█████████████████████████
██▄▄       ▀▀█████████████████████
██████▄▄        ▀█████████████████
███████████▄▄       ▀▀████████████
███████████████▄▄        ▀████████
████████████████████▄▄       ▀▀███
 ▀▀██████████████████████▄▄
     ▀▀██████████████████████▄▄
▄▄        ▀██████████████████████▄
████▄▄        ▀▀██████████████████
█████████▄▄        ▀▀█████████████
█████████████▄▄        ▀▀█████████
██████████████████▄▄        ▀▀████
▀██████████████████████▄▄
  ▀▀████████████████████████
      ▀▀█████████████████▀▀
           ▀▀███████▀▀



.SEMUX
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
  Semux uses .100% original codebase.
  Superfast with .30 seconds instant finality.
  Tested .5000 tx per block. on open network
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
1538088395
Hero Member
*
Offline Offline

Posts: 1538088395

View Profile Personal Message (Offline)

Ignore
1538088395
Reply with quote  #2

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

Posts: 1538088395

View Profile Personal Message (Offline)

Ignore
1538088395
Reply with quote  #2

1538088395
Report to moderator
1538088395
Hero Member
*
Offline Offline

Posts: 1538088395

View Profile Personal Message (Offline)

Ignore
1538088395
Reply with quote  #2

1538088395
Report to moderator
1538088395
Hero Member
*
Offline Offline

Posts: 1538088395

View Profile Personal Message (Offline)

Ignore
1538088395
Reply with quote  #2

1538088395
Report to moderator
jackjack
Legendary
*
Offline Offline

Activity: 1134
Merit: 1013


May Bitcoin be touched by his Noodly Appendage


View Profile
August 25, 2011, 11:48:54 PM
 #2

could someone point me to where I can see code /pseudo/code for the calculation of a hash.  step by step would be awesome, but anything would be helpful too.
A hash of what?
Block, transaction, address?

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
CanaryInTheMine
Donator
Legendary
*
Offline Offline

Activity: 1862
Merit: 1003


between a rock and a block!


View Profile
August 25, 2011, 11:51:40 PM
 #3

could someone point me to where I can see code /pseudo/code for the calculation of a hash.  step by step would be awesome, but anything would be helpful too.
A hash of what?
Block, transaction?

block

            ▄▄████▄▄
        ▄▄██████████████▄▄
      ███████████████████████▄▄
      ▀▀█████████████████████████
██▄▄       ▀▀█████████████████████
██████▄▄        ▀█████████████████
███████████▄▄       ▀▀████████████
███████████████▄▄        ▀████████
████████████████████▄▄       ▀▀███
 ▀▀██████████████████████▄▄
     ▀▀██████████████████████▄▄
▄▄        ▀██████████████████████▄
████▄▄        ▀▀██████████████████
█████████▄▄        ▀▀█████████████
█████████████▄▄        ▀▀█████████
██████████████████▄▄        ▀▀████
▀██████████████████████▄▄
  ▀▀████████████████████████
      ▀▀█████████████████▀▀
           ▀▀███████▀▀



.SEMUX
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
  Semux uses .100% original codebase.
  Superfast with .30 seconds instant finality.
  Tested .5000 tx per block. on open network
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
etotheipi
Legendary
*
expert
Offline Offline

Activity: 1428
Merit: 1002


Core Armory Developer


View Profile WWW
August 26, 2011, 04:12:34 AM
 #4

Are you talking about SHA256?  The wiki is always a good place to start for that:  http://en.wikipedia.org/wiki/SHA-2

If you're talking about something more specific to BTC, there are three places that hashes are used that I can think of, off the top of my head:

(1) 80-byte block headers  {sha256(sha256((...)}
(2) Full transactions       {sha256(sha256(...))}
(3) Converting public keys to BTC addresses  {ripemd160(sha256(...))}
 

You can see illustrations of a full Transaction (2) and the conversion from ECDSA public key to BTC address (3) in my post: 
https://bitcointalk.org/index.php?topic=29416.0


Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
WakiMiko
Newbie
*
Offline Offline

Activity: 59
Merit: 0



View Profile
August 26, 2011, 01:01:33 PM
 #5

blockhashing example in C: https://gist.github.com/1173353

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!