-
Concepts
-
Hash:
- a summary of a file or message, often in numeric format. Hashes are used in digital signatures, in file and message authentication, and as a way to protect the integrity of sensitive data
-
Hash Function:
- a mathematical procedure that converts a variable-sized amount of data into a smaller block of data. The hash function is designed to take an arbitrary data block from the file or message, use that as an input, and from that block produce a fixed-length hash value. The hash is created at the source and is recalculated and compared with the original hash at the destination.
-
One-Way Function:
- A hash that is easy to compute when generated but difficult (or impossible) to compute in reverse.
-
Cryptographic Hash Function:
- hash functions based on block ciphers. The methods used resemble that of cipher modes used in encryption. Examples include MD5 and SHA.
-
Key Stretching:
- Takes a weak key, processes it, and outputs an enhanced and more powerful key, usually increasing key size to 128 bits.
-
Cryptographic Hash Functions
-
Message Digest 5 (MD5):
- A 128-bit key hash used to provide integrity of files and messages.
-
Secure Hash Algorithm (SHA):
- A group of hash functions designed by the NSA and published by the NIST, widely used in government. The most common currently is SHA-1.
-
RIPEMD and HMAC
-
RIPEMD (RACE Integrity Primitives Evaluation Message Digest):
- A message digest algorithm used in cryptographic hashing.
- It is used less commonly than SHA and was designed as an open source hashing algorithm.
- The original RIPEMD (128-bit) had a collision reported, and therefore it is recommended to use RIPEMD-160 (160-bit), RIPEMD-256, or RIPEMD-320.
-
HMAC (Hash-based Message Authentication Code):
- HMAC is a calculation of a MAC through the use of a cryptographic hash function such as MD5 or SHA-1.
-
Message Authentication Code (MAC):
- A short piece of information used to authenticate a message and to provide integrity and authenticity assurances on the message.
- It checks the integrity of the cipher used and notifies the receiver if there were any modifications to the encrypted data. This way, the data cannot be repudiated when received.
-
LANMAN, NTLM, and NTLMv2
-
LANMAN
-
LANMAN Hash:
- The original hash used to store Windows passwords, known as LM hash, based off the DES algorithm.
-
NTLM and NTLMv2
-
NTLM Hash:
- Successor to the LM hash. A more advanced hash used to store Windows passwords, based off the RC4 algorithm.
-
NTLMv2 Hash:
- Successor to the NTLM hash. Based off the MD5 hashing algorithm.