This puzzle can be solved using the following concepts. Practice using these concepts and improve your skills.
GoalImplement a slightly modified version of the SHA-256 hash.
A full description of the SHA-256 algorithm can be found on Wikipedia: https://en.wikipedia.org/wiki/SHA-2#Pseudocode
A detailed walkthrough can be found here: https://qvault.io/cryptography/how-sha-2-works-step-by-step-sha-256/
The only difference between the standard implementation (detailed in the 2 links above) and our implementation is in the definition of the initial hash values (referred to as h0 - h7 in the links above).
The standard implementation uses the first 32 bits of the fractional parts of the square roots of the first 8 primes (2, 3, 5, 7, 11, 13, 17, 19). We will instead use the first 32 bits of the fractional parts of the square roots of the next 8 primes (23, 29, 31, 37, 41, 43, 47, 53), given here in hexadecimal form:
The reason we're using different initial hash values is so that you can't use built-in hash functions, e.g. python's hashlib.sha256.
Apart from this change in initial hash values, the algorithm proceeds exactly the same as the standard implementation. Note: the "round constants" are not changed, i.e. they are the same as in the standard implementation.
You will be given a string, you must convert that string to a sequence of bits (using ASCII) and hash it using our version of the SHA-256 algorithm.
One line: a string S to hash.
One line: the 64-character hash value H output by our version of the SHA-256 algorithm in lowercase hexadecimal form.
All characters of the string will be printable ASCII characters in the range [32 - 126] inclusive.
A higher resolution is required to access the IDE