Now let’s discuss

the Secure Hash Algorithm or SHA. The Secure Hash Algorithm

was developed by NIST. The original algorithm is SHA-1. SHA-1 produces a hash value of 160 bits. Later, NIST revised the SHA standard and

specify the SHA-2 algorithms. This algorithms have key lengths of 256,

384 and 512 bits, and their operations

are similar to SHA-1. This table compares the SHA parameters. The message digest size refers to

the length of the hash value, so for SHA-1 it is 160 bits, and for

SHA-512 the hash length is 512 bits. Message size is a size

limit on the input. You can consider these size limits

are not having an effect in practice, because most if not all

messages will be smaller. For example, even with SHA-1,

the message size is limited to 2 to 64. This means that you

can hash a message so big that it occupies the entire

address space of a 64 bit computer. You can also think about

it in another way. 2 to the 43 bits is already a terabyte. As we can see, the algorithms from left to right

produce hash values with more bits. Hence, they are more secure as

we move from left to right. For example, with SHA-1

because the hash value has 160 bits then the search space for the

attacker to find a collision is 2 to 80. Whereas for

SHA-512 the search space is 2 to 256. In this lecture we will provide

a description of SHA-512, the other versions are quite similar. For SHA-512 it takes as an input a message that’s smaller

than 2 to the 128. Again, this is not a limit that

will have any impact in practice. The output is a hash value

that is in 512 bits. The input is processed block by

block and each block has 1024 bits.

Someone cracked SHA-1 recently. I'm concerned for bitcoin.