Module preprocessing

Source
Expand description

Functions for performing the standard preprocessing steps before applying the SHA-2 algorithm

Functionsยง

byte_padding
Merges groups of 8 bytes into 64 bit words We extend the length of the list of bytes by adding a 1 bit at the end and enough 0s such that we have a multiple of 64 bits
bytes_to_u64
custom_preprocessing
sha256_preprocessing
sha512_preprocessing
standard_preprocessing
string_to_encoding
word_padding
Packs 64 bit words into 512 bit blocks by padding the message with 0s and adding the suffix l (usually the length of the message) at the end of the final block.