Exploring Hash-Based Cryptography 2
Exploring Hash-Based Cryptography 2
Exploring Hash-Based Cryptography 2
Cryptography
• They are deterministic, meaning that the same message always results in the same hash.
• They are quick to compute the hash value for any given message.
• They are collision-free, meaning that no two input hashes should map to the same output hash.
• They are hidden, meaning that it should be difficult to guess the input value for a hash function
from its output.
• They are puzzle-friendly, meaning that it should be difficult to select an input that provides a pre-
defined output.
Applications of Hash-Based Cryptography
• Data Integrity: Verifying data hasn't been altered using hash values.
• Digital Signatures: Creating and verifying signatures for authenticity and integrity.
• Password Storage: Securely storing passwords without exposing them.
• Blockchain: Securing transactions and creating an immutable ledger.
• Key Derivation: Generating cryptographic keys from passwords or secret values.
Data Integrity :
• Hash functions are used to ensure data integrity by generating hash values for data.
• Verifying the integrity of files / documents / messages. E.g. a SHA256 checksum may confirm
that certain file is original (not modified after its checksum was calculated).
• The above screenshot demonstrates how the SHA256 checksums ensure the integrity of the
OpenSSL files at the official Web site of OpenSSL.
Digital Signature:
• The above example comes from the /etc/shadow file in a modern Linux system. The above passwords are
stored as multiple-round SHA-512 hashes with salt.
Blockchain:
• Hash functions form the backbone of blockchain technology.
• Each block contains a hash of the previous block, forming a chain.
• Any alteration to a block would change its hash, alerting the network to tampering attempts.
• Such use may be expressed as DK = KDF(key, salt, iterations), where DK is the derived key, KDF
is the key derivation function, key is the original key or password, salt is a random number which
acts as cryptographic salt, and iterations refers to the number of iterations of a sub-function. The
derived key is used instead of the original key or password as the key to the system.