Computer security principles and practice 3rd by williams stallings and brown ch21

24 139 0
Computer security principles and practice 3rd by williams stallings and brown ch21

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Chapter 21 Public-Key Cryptography and Message Authentication Secure Hash Algorithm (SHA) • • • • SHA was originally developed by NIST Published as FIPS 180 in 1993 Was revised in 1995 as SHA-1 • In 2005 NIST announced the intention to phase out approval of SHA-1 and move to a reliance on the other SHA versions by 2010 o Produces 160-bit hash values o o o o Adds additional versions of SHA SHA-256, SHA-384, SHA-512 With 256/384/512-bit hash values Same basic structure as SHA-1 but greater security NIST issued revised FIPS 180-2 in 2002 N ¥ 1024 bits L bits 128 bits Message 1024 bits 1024 bits M1 IV = 512 H0 F 1024 bits M2 1024 MN 1024 + H1 1024 + F L 100 H2 F + HN = hash code + =word-by-word addition mod 64 Figure21.2 MessageDigest Generation Using SHA-512 Mi Hi–1 message schedule a b c W0 e f g h 64 K0 Round a b c Wt d e f g h Kt Round t a W79 d b c d e f g h Round 79 K79 ++++++++ Hi Figure21.3 SHA-512 Processing of a Single1024-Bit Block SHA-3 • SHA-2 shares same structure and mathematical operations as its predecessors and causes concern • Due to time required to replace SHA-2 should it become vulnerable, NIST announced in 2007 a competition to produce SHA-3 Requirements: • • Must support hash value lengths of 224, 256,384, and 512 bits Algorithm must process small blocks at a time instead of requiring the entire message to be buffered in memory before processing it HMAC • Interest in developing a MAC derived from a cryptographic hash code • • Issued as RFC2014 Has been chosen as the mandatory-to-implement MAC for IP security o o o Cryptographic hash functions generally execute faster Library code is widely available SHA-1 was not deigned for use as a MAC because it does not rely on a secret key o Used in other Internet protocols such as Transport Layer Security (TLS) and Secure Electronic Transaction (SET) HMAC Design Objectives To preserve the original performance of To use, without modifications, available the the hash hash function function without without incurring incurring a a hash functions significant degradation To allow for easy replaceability of the embedded hash function in case faster or or more more secure secure hash hash functions functions are are found found or required To have a well-understood cryptographic analysis of the strength of the To To use use and and handle handle keys keys in in a a simple simple way way authentication authentication mechanism mechanism based based on on reasonable assumptions on the embedded hash function K+ ipad Si bbits bbits b bits Y0 Y1 YL–1 IV K+ n bits Hash opad n bits H(Si || M) bbits pad to b bits So IV n bits Hash n bits HMAC(K, M) Figure21.4 HMAC Structure Security of HMAC • • Security depends on the cryptographic strength of the underlying hash function For a given level of effort on messages generated by a legitimate user and seen by the attacker, the probability of successful attack on HMAC is equivalent to one of the following attacks on the embedded hash function: o Either attacker computes output even with random secret IV Brute force key O(2n), or use birthday attack o Or attacker finds collisions in hash function even when IV is random and secret ie find M and M' such that H(M) = H(M') Birthday attack O( 2n/2) MD5 secure in HMAC since only observe • • • • RSA Public-Key Encryption • • • • • • • • By Rivest, Shamir & Adleman of MIT in 1977 Best known and widely used public-key algorithm Uses exponentiation of integers modulo a prime Encrypt: C = Me mod n Decrypt: M = Cd mod n = (Me)d mod n = M Both sender and receiver know values of n and e Only receiver knows value of d Public-key encryption algorithm with key PR = {d, n} public key PU = {e, n} and private Key Generation p and q both prime, p ≠ q Select p, q Calculate n = p × q Calculate φ(n) = (p – 1)(q – 1) Select integer e gcd(φ(n), e) = 1; < e < φ(n) Calculate d de mod φ(n) = Public key KU = {e, n} Private key KR = {d, n} Encryption Plaintext: M

Ngày đăng: 18/12/2017, 15:17

Mục lục

  • Slide 1

  • Slide 2

  • Slide 3

  • Secure Hash Algorithm (SHA)

  • Slide 5

  • Slide 6

  • Slide 7

  • SHA-3

  • HMAC

  • HMAC Design Objectives

  • Slide 11

  • Security of HMAC

  • RSA Public-Key Encryption

  • Slide 14

  • Slide 15

  • Security of RSA

  • Slide 17

  • Diffie-Hellman Key Exchange

  • Slide 19

  • Diffie-Hellman Example

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan