Skip to content

Instantly share code, notes, and snippets.

@oconnor663
Last active October 26, 2021 17:21
Show Gist options
  • Save oconnor663/27804bb33542bbf398aab16e102d8594 to your computer and use it in GitHub Desktop.
Save oconnor663/27804bb33542bbf398aab16e102d8594 to your computer and use it in GitHub Desktop.
SHA-256 round-by-round debugging info for the empty input
message: b''
padded message:
b'\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' +
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' +
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' +
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
message schedule: [
2147483648, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
2147483648, 0, 2117632, 0, 570427392, 0, 84448578, 2147483648,
1476919296, 4235264, 1451269, 1711282176, 3592562048, 337794312, 3594910044, 3374850048,
3287351444, 676112230, 109604294, 2742808854, 1904000662, 4274181962, 2813755136, 2165675682,
2561075048, 62000258, 1562224585, 2975250741, 3286092305, 614207615, 3297584367, 1575308336,
3741240933, 748767245, 1008022316, 30329261, 369937616, 195877528, 907775968, 3526495142,
43741191, 1967544444, 133517113, 4161330627, 3704256008, 1581412744, 1153231965, 996066459 ]
initial state words: [1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225]
round 1:
round constant: 1116352408
schedule word: 2147483648
S1: 898049835
ch: 528861580
temp1: 1937239400
S0: 3458249854
maj: 980412007
temp2: 143694565
resulting state words: [2080933965, 1779033703, 3144134277, 1013904242, 415752866, 1359893119, 2600822924, 528734635]
round 2:
round constant: 1899447441
schedule word: 0
S1: 3218167418
ch: 2466662958
temp1: 3818045156
S0: 1061746599
maj: 2047454789
temp2: 3109201388
resulting state words: [2632279248, 2080933965, 1779033703, 3144134277, 536982102, 415752866, 1359893119, 2600822924]
<...rounds 3 through 63 omitted...>
round 64:
round constant: 3329325298
schedule word: 996066459
S1: 2418674186
ch: 2507271036
temp1: 3529233239
S0: 3400386742
maj: 3701293518
temp2: 2806712964
resulting state words: [2040978907, 3717492111, 1586299222, 4095722474, 3600805733, 3382061760, 2232532848, 477227836]
state words after compression: [3820012610, 2566659092, 2600203464, 2574235940, 665731556, 1687917388, 2761267483, 2018687061]
final hash: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment