- Bit Memory Operations
- Function Dispatcher
- Endianness Concepts
- Recode functionality of openssl, specifically MD5 and sha256 hashing algorithms.
-h => Usage and Help with flag explanation
-p => Echo STDIN to STDOUT and append checksum
-q => Quiet mode, only prints checksum
-r => Reverse format of output
-s => Print the checksum of following argument treated as string
- SHA1, SHA224, SHA384, SHA512, SHA512/224, SHA512/256 Hashing Algorithms
Hashing Algorithms:
- Preprocess Data (file or string in this case)
- 1 bit appened to end of the data message
- 0 bits appended until message is of proper length (algorithm dependant)
- Message size (in bits) value is appended to the end of the padded message (64 or 128 bit depending on algorithm)
- Apply Hashing algorithm to each block (512 or 1024 bit) of the padded message
- Initialize state variables, intialize register variables with current state.
- Algorithm specific compression functions applied to message block and stored in registers.
- State updated (+=) with register values and process continues for each block of message.
- Calcualate Output Hash
- Final state constitutes hash value, print in hexadecimal
- https://fthb321.github.io/MD5-Hash/MD5OurVersion2.html
- https://medium.com/a-42-journey/implementing-the-sha256-and-md5-hash-functions-in-c-78c17e657794
- https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf
- https://security.stackexchange.com/questions/11717/why-are-hash-functions-one-way-if-i-know-the-algorithm-why-cant-i-calculate-t/19658#19658