Hash Function
Definition
Deterministic function that maps an input of arbitrary length to a fixed-length output. A cryptographic hash adds pre-image resistance, second pre-image resistance, collision resistance and the avalanche effect.
- Function
- Maps arbitrary-length input to fixed-length output
- Property
- Deterministic
- Requirement
- Pre-image and collision resistance
- Avalanche effect
- Small input change flips the output completely
Common questions
What does pre-image resistance specifically prevent?+
It prevents an attacker from working backward from a known hash output to reconstruct any input that would produce it, which is essential when a hash represents a file without exposing its content.
Why does the avalanche effect matter for forensic use of hashing?+
A small change to the input, even a single bit, should produce a completely different output hash, which is what makes a mismatched hash a reliable signal that a file has been altered rather than a coincidence.
Is every hash function suitable for forensic evidence verification?+
No, only cryptographic hash functions with proven collision resistance are appropriate, since a non-cryptographic hash can allow two different inputs to produce the same output, undermining its use as an integrity check.
Related terms
- Asymmetric Cryptography
- Cryptosystem that uses a key pair: a public key (shareable) and a private key (secret). Built on mathematical trapdoor functions where the...
- Digital Signature
- Cryptographic proof of authenticity, integrity and non-repudiation. Sign by encrypting a hash of the message with the signer's private key; verify by...
- DSC
- Digital Signature Certificate. An Indian X.509 certificate issued by a CCA-licensed CA. Class 3 is the current mandatory tier for income tax,...
- ECC
- Elliptic Curve Cryptography. Smaller keys for equivalent security; 256-bit ECC is roughly equivalent to 3072-bit RSA. Used in ECDSA signatures, ECDH key...
- HMAC
- Hash-based Message Authentication Code, RFC 2104. Combines a secret key with a hash function to produce a MAC; immune to the length-extension...
- PKI
- Public Key Infrastructure. The set of roles (CA, RA, VA) and artefacts (X.509 certificates, CRL, OCSP) that bind a public key to...
- RSA
- Rivest-Shamir-Adleman, 1977. Public-key cryptosystem based on the hardness of factoring a product of two large primes. Common sizes today: 2048-bit (standard), 3072-bit...
- Trapdoor Function
- A one-way function with a secret 'trapdoor' that makes the reverse direction tractable. RSA's trapdoor is the factorisation of n into p...