Chapter 5: Hash Functions Flashcards
- Common practice in data communications: error detection code, to identify random errors introduced during transmission
- Most simple error detection code: Parity– Exemplify.
- Most simple error detection code: Parity
- 7 data bits, 1 parity bit
- Even parity: parity bit set in a way that byte has an even number of bits set to 1 * 00110011
- 10110010
- (There is also odd parity, which works analogously)
- Further examples: Bit-Interleaved Parity, Cyclic Redundancy Check (CRC)
- Underlying idea of these codes: …
- The decision whether to use an error detection/correction code at all, the selection of the code to be used and of its parameters …
- influences the ….
- adds a …, and
- depends on the …
add redundancy to a message for being able to detect, or even correct transmission errors
ability to detect and/or correct errors and how many,
varying amount of overhead (computational and increased message length)
probability/characteristics of errors on the transmission medium.
- Essential security goal: Data integrity
- We received message m. Has m been modified by an attacker?
- It is a different (and much harder!) problem to determine if m has been modified on purpose!
- Why?
- It is unlikely that a random error that modified a message also “fixes” the messages error detection code
- An attacker can modify the message and fix the respective error detection code
- Consequently, we need to add a code that fulfills some additional properties which should make it com- putationally infeasible for an attacker to tamper with messages
Describe a
1) hash function
2) one-way function
Give an example.
4 elements of a cryptographic hash function.
1st pre-image resistance
2nd pre-image resistance
collision resistance
random oracle property
- In networking there are codes for error detection.
- Common example: Cyclic redundancy checks (CRC)
- Based on binary polynomial division with Input / CRC divisor.
- The remainder of the division is the resulting error detection code.
- CRC is a fast compression function.
- Why not use CRC as a cryptographic hash function?
Can hashing ensure integrity?
Applying a hash function is not sufficient to secure a message against intentional manipualtion: hash functions are public (cf. Kerckhoffs’s principle) and the attacker knows m.
Addressing integrity via Message Authentication Code.
Approach:
* Include a shared secret k in the hash → Message Authentication Code MACK (m) = h(k, m)
(Naive approach, see details next section!)
* Since the secret key k is unknown to the attacker, the attacker cannot compute MACK (m’)
- The output of a cryptographic hash function is assumed to be uniformly distributed
- Although this property has not been proven in a mathematical sense for common cryptographic hash
functions it is often used in the context of pseudo-random number generation and encryption. Explain.
- Challenge-response authentication used in HTTP digest authentication. Why?
- Another type of a challenge-response would be, for example, …
- Note: this challenge-response protocol would allow … that might allow an attacker to learn about k
- It avoids transmitting the transport of the shared key (e.g. password) in clear text
if Bob signs the challenge “rA ” with his
private key
chosen-message attacks
Common cryptographic hash functions.