Bitcoin Forum
May 21, 2024, 02:17:19 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: SHA256 Scheduler?  (Read 3117 times)
Schleicher
Hero Member
*****
Offline Offline

Activity: 675
Merit: 513



View Profile
March 07, 2015, 11:52:55 PM
 #21

Values as in inputs?

I know they denote SHA256 as having 8 inputs with A-H, each capable of taking in 32 bits. Inputs A and E require processing but everything else just gets shifted over.
Yes. a and e for the first 3 rounds are precalculated because they don't change when you change the nonce in the block header.
It's part of the speed optimization.

Reclaim3r (OP)
Full Member
***
Offline Offline

Activity: 139
Merit: 100


View Profile
March 08, 2015, 02:05:17 AM
 #22



I understand what is going on with K here, its the constants that the NSA provided.
I also notice that W does not go to each round. Is their a formula/rule for when W gets inputted?
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
March 08, 2015, 02:24:18 AM
Last edit: March 08, 2015, 02:57:13 AM by DeathAndTaxes
 #23

Both w and k are 64 element arrays.  The w[t] element is used each round where t is the current round {0...63}.  The diagram indicates just that.  It simply omits rounds 2 to 62 because all the rounds are identical and it would make the diagram massive otherwise.  Diagrams seem to not be your thing did you look at the pseudocode I linked to.  It describes it in very 'english like' syntax.  The SHA-2 family really isn't that complex.  ECDSA on the other hand ...

Code:
h = g
g = f
f = e
e = d + h + Ch(e,f,g) + Sum1(e) + w[t] + k[t]
d = c
c = b
b = atic
a = h + Ch(e,f,g) + Sum1(e) + w[t] + k[t] + Sum0(a) + Maj(a, b, c)

http://en.wikipedia.org/wiki/SHA-2#Pseudocode

Specifically  "a = h + Ch(e,f,g) + Sum1(e) + w[t] + k[t] + Sum0(a) + Maj(a, b, c)"  So on round 0 w[0] and k[0] is used, on round 1 w[1] and k[1] is used ... on round 63 w[63] and k[63] is used.
Reclaim3r (OP)
Full Member
***
Offline Offline

Activity: 139
Merit: 100


View Profile
March 08, 2015, 02:40:08 AM
 #24

Sorry about that. I just wanted to make sure I knew W and K like the back of my hand. Thank you for all the help. I am extremely grateful for it. Sorry if it was really troublesome.
Pages: « 1 [2]  All
  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!