110 likes | 211 Views
CS G513 / SS G513 Network Security. Agenda. Integrity –Usage and Attacks Attacks on Hash Codes. Adversaries. Objectives vs. MDCs To attack a one-way hash function Given a hash value y, find a preimage x (i.e. y = h(x))
E N D
CS G513 / SS G513 Network Security Agenda Integrity –Usage and Attacks Attacks on Hash Codes
Adversaries • Objectives vs. MDCs • To attack a one-way hash function • Given a hash value y, find a preimage x (i.e. y = h(x)) • Given a text-hash pair (x, h(x)) find a second pre-image x’ (i.e. h(x’) = h(x)) • To attack a collision-resistant hash function • Find any two colliding inputs x, x’ (i.e. h(x) = h(x’)) • Objectives vs. MACs • Given one or more text-mac pairs (xi, hk(xi)), • Find a new text-mac pair (x, hk(x)) such that x is not xi for any i, without knowing k. Sundar B.
Integrity - Uses • Message Authentication (a.k.a Data Origin Authentication) • Identification + Integrity • Special Case: Key Authentication • Identification + Integrity + Freshness • Session Authentication / Transaction Authentication • Identification + Integrity + Timeliness • Special Case: Anonymous Transaction Authentication • Integrity + Timeliness (i.e. without Identification) Sundar B.
Message Authentication • Methods for providing message authentication: • Using MACs • Digital Signature Schemes • Appending a secret (authenticator) to text and encrypting it. • Is this different from “appending MDC and then encrypting”? Sundar B.
Integrity - Threats • Non-malicious threats • Accidental errors – e.g. Transmission errors • Solutions: • E.g. Parity bits / Checksums; Redundancy is the principle; • Error detection codes and retransmission in general • Error Correction codes may avoid retransmission. • Malicious threats Sundar B.
Integrity - Approaches • 3 different approaches: • Use MACs: • (x || hk(x)) over an unsecured channel; k is secret • Use MDCs and Encryption: • Ek(x || h(x)) over an unsecured channel; k is secret • MDC and Authentic Channel: • x over an unsecured channel and h(x) over an authentic channel Sundar B.
Integrity - Solutions • Encryption alone does not guarantee integrity • Integrity verification requires redundancy • Examples: • Re-order cipher text when encrypted by block ciphers in ECB mode • Random data (e.g. key) when encrypted contains no redundancy • Cannot be verified for integrity. • Bit manipulations in block-cipher/stream-cipher based cipher texts. Sundar B.
Integrity Solutions • When integrity and confidentiality are needed: • Use MDC and encryption • Otherwise • Use MAC • MDC and authentic channel. Sundar B.
Hash Codes - Properties • Properties required for different integrity applications: • MDC + asymmetric signature: PR, 2PR, CR • MDC + authentic channel: 2PR, CR • MDC + Symmetric encryption: None • Hash for one-way password file: PR • MAC (key unknown to attacker): PR, 2PR, CR • MAC (key known to attacker): 2PR Sundar B.
Hash Codes - Properties • Additional Properties • Non-Correlation: Input bits and output bits should not be correlated. • Near-collision-resistance: It should not be easy to find any x and x’ such that h(x) and h(x’) differ only in a small number of bits. • Partial-preimage-resistance: It should be difficult to recover any substring of x from h(x) Sundar B.
Hash codes - attacks • Basic Hash attacks • Finding Collision by brute force: (hashcode of n bits) • 2n hash computations for preimage or 2nd premiage • Birthday attacks • An algorithm independent attack (hash code length is known) • Principle: When drawing elements randomly, from a set of N elements, with replacement, there is a high probability of repetition within sqrt(N) choices. (see Birthday Problems – Menezes et. al Sec. 2.1.5 ) • Collision is easier to find than preimage or 2nd pr. • Reading Exercise: (from Menezes et. al. Ch. 9) • Yuval’s b’day attack algo. (Algo. 9.92) and • Applications of b’day attack (Remark 9.93)