H: {0, 1}^* -> {0, 1}^n
;n
- hash length;- Input - binary sequence of finite length;
- Output - binary sequence of fixed length (
n
);
- Security Properties:
- It is computationally easy to get
H(x)
givenx
; - It is computationally hard to get
x'
, givenx
, such thatx' != x
andH(x') = H(x)
-> second pre-image; - It is computationally hard to get
(x, x')
, such thatx != x'
andH(x) = H(x')
-> collision;
- It is computationally easy to get
- The hash of
m
representsm
("digital signature"); - Based on boolean and arithmetic operations;
- Data integrity;
- Derivation of keys from passwords;
- MAC algorithms;
- Digital signature (asymmetric scheme);
- Multiple cryptographic protocols.
- It is usual to designate a MAC scheme, with a deterministic algorithm T, as a keyed hash function (Keyed-Hashing for Message Authentication, HMAC);
- HMAC is a set of MAC algorithms to use with different hash functions H.