SHA-256
 Partager
 
Lecture seule
 
 
AB
1
put your original message to be hashed in cell A2
up to 55 printable ASCII characters
SHA256(A2)
2
welcome
280D44AB1E9F79B5CCE2DD4F58F5FE91F0FBACDAC9F7447DFFC318CEB79F2D02
3
Google Sheets protection changed; I've created a public copy that anyone can edit; if/when it gets wrecked then I can make a fresh copy
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-2018 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
3) figure out how to handle binary input
18
19
20
21
https://docs.google.com/spreadsheets/d/1PRTluVDiRujx3QlLBfM1-ocR6F2esRDEIiY0608olRs/
22
23
24
25
Welcome everyone!
26
27
28
29
Loading...
 
 
 
Start Here; user interface
sqrt(primes)
primes^(1/3)
input
round 1
round 2
round 3
round 4
round 5
round 6
round 7
round 8
round 9
round 10
round 11
round 12
round 13
round 14
round 15
round 16
round 17
round 18
round 19
round 20
round 21
round 22
round 23
round 24
round 25
round 26
round 27
round 28
round 29
round 30
round 31
round 32
round 33
round 34
round 35
round 36
round 37
round 38
round 39
round 40
round 41
round 42
round 43
round 44
round 45
round 46
round 47
round 48
round 49
round 50
round 51
round 52
round 53
round 54
round 55
round 56
round 57
round 58
round 59
round 60
round 61
round 62
round 63
round 64
post-round 64
 
 
Menu principal