AB
1
original message to be hashed
up to 55 printable ASCII characters
SHA256(A2)
2
ahmet mehmet fikret saffet
F3EF1263AA7C5B9B093A674F2413DE19BC177F9EE2D19AED51D27BD54D2AC749
3
Anyone can enter a value in the cell above; please refrain from using objectionable strings
4
I have enabled the comments feature. If you right-click on a cell then you can add a comment and I will be notified. Please submit requests and/or suggestions for changes/enhancements.
5
Copyright 2014 David Rabahy -- DavidRabahy@comcast.net
6
The intent of this work is for it to be used as a way to learn the intricate details of the step-by-step process of calculating the SHA256 hash.
7
8
Do not rely on the results of this tool. No warranty is implied.Instructions: Start here on the "user interface" sheet.

If you want your own copy then first let me know and then use the File->Make a copy... menu choice.

A review of the algorithm description available at https://en.wikipedia.org/wiki/SHA-2#Pseudocode is helpful before digging into this.

Click on individual cells to see the formula used to accomplish a step.

Observe the input string in A2 (anyone can change it anytime); if the cell appears to be empty then check the formula; if there's nothing there then the calculation derives the SHA256 hash of the null string. Cell A2 contains the string that will be hashed. The resulting hash is displayed in B2. It does take as much as a minute or more for the calculation to run to completion; look for the in-progress indicator and when it is done then the result is available. While the calculation is still running the previous result will be displayed so be careful.

Check out the calculation of the constants in sheets 'sqrt(primes)' and 'primes^(1/3)' to see how they are derived. Although these were specified by the NSA, they are clearly arbitary and do not create a backdoor.

Reading from left to right, the sheet 'input' reveals the steps of preprocessing the input message to prepare the message schedule array. Then we see the 64 rounds of stirring the bits thoroughly. Sheet 'round 1' is most thoroughly documented; don't miss it. Scroll through the sheets all the way to the last one, 'post-round 64', to see the final steps in deriving the SHA256 hash.

Look for additional instructions on the sheets themselves.
9
10
written by David Rabahy; inspired by Ken Shirriff
11
12
release: 1.0 2014-10-9
13
development notes for next version:
14
1) various optimizations
15
2) will accept up to 119 printable ASCII characters pushing into the second iteration of the 64 rounds
16
17
18
19
20
21
22
23
24
25
26
27
28
29