Tag Archives: SHA-256

SHA-256 initial hash derivation explained in TI Nspire

The SHA-256 is a cryptographic hash function with many usages. From bitcoin and block chain calculation to digital signature, SHA-256 played a pivotal role.

From the official definition, there are 8 initial hash values in the algorithm. They are hexadecimal form of the fractional part of the square roots of the first 8 prime numbers 2, 3, 5, 7, 11, 13, 17, and 19. The values are:

nspire-sha256-1

In practice these initial values are constants, but for demonstrating how fractions are represented in hexadecimal, the calculation can be shown in TI Nspire although no built-in support is provided for hexadecimal fractions. The calculation is very simple, take the fractional part from the value times 16, and then convert the integer part to hexadecimal. Repeat with the resulting value to concatenate the answer. In the below example, the second SHA-256 initial hash value calculation is shown (first three most significant value).

nspire-sha256-2

Advertisements