SLUUBT5C November 2018 – June 2021 BQ40Z80
As of March 2012, the latest revision is FIPS 180-4. SHA-1, or secure hash algorithm, is used to compute a condensed representation of a message or data also known as hash. For messages < 264, the SHA-1 algorithm produces a 160-bit output called a digest.
In a SHA-1 one-way hash function, there is no known mathematical method of computing the input given, only the output. The specification of SHA-1, as defined by FIPS 180-4, states that the input consists of 512-bit blocks with a total input length less than 264 bits. Inputs that do not conform to integer multiples of 512-bit blocks are padded before any block is input to the hash function. The SHA-1 algorithm outputs the 160-bit digest.
The BQ40Z80 device generates a SHA-1 input block of 288 bits (total input = 160-bit message + 128-bit key). To complete the 512-bit block size requirement of the SHA-1 function, the device pads the key and message with a 1, followed by 159 0s, followed by the 64-bit value for 288 (000...00100100000), which conforms to the pad requirements specified by FIPS 180-4.
Detailed information about the SHA-1 algorithm can be found here: