C HAPTER 15 MACs and Signatures Slides adapted from "Foundations of Security: What Every Programmer Needs To Know" by Neil Daswani, Christoph Kern, and.

Slides:



Advertisements
Similar presentations
Internet and Intranet Protocols and Applications Lecture 9a: Secure Sockets Layer (SSL) March, 2004 Arthur Goldberg Computer Science Department New York.
Advertisements

TLS Introduction 14.2 TLS Record Protocol 14.3 TLS Handshake Protocol 14.4 Summary.
SSL CS772 Fall Secure Socket layer Design Goals: SSLv2) SSL should work well with the main web protocols such as HTTP. Confidentiality is the top.
1 SSL/TLS 2 Web security Security requirements Secrecy to prevent eavesdroppers to learn sensitive information Entity authentication Message authentication.
COMP043-Cryptology Week 4 – Certs and Sigs. Digital Signatures Digital signatures provide –Integrity –Authenticity and –Non-repudiation How do they work?
Digital Signatures and Hash Functions. Digital Signatures.
Information Security Principles & Applications Topic 4: Message Authentication 虞慧群
Mar 19, 2002Mårten Trolin1 This lecture On the assignment Certificates and key management SSL/TLS –Introduction –Phases –Commands.
Apr 2, 2002Mårten Trolin1 Previous lecture On the assignment Certificates and key management –Obtaining a certificate –Verifying a certificate –Certificate.
A Survey of WAP Security Architecture Neil Daswani
Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
Lesson Title: Introduction to Cryptography Dale R. Thompson Computer Science and Computer Engineering Dept. University of Arkansas
Apr 22, 2003Mårten Trolin1 Agenda Course high-lights – Symmetric and asymmetric cryptography – Digital signatures and MACs – Certificates – Protocols Interactive.
Kemal AkkayaWireless & Network Security 1 Department of Computer Science Southern Illinois University Carbondale CS 591 – Wireless & Network Security Lecture.
Secure Hashing and DSS Sultan Almuhammadi ICS 454 Principles of Cryptography.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Hash Functions Nathanael Paul Oct. 9, Hash Functions: Introduction Cryptographic hash functions –Input – any length –Output – fixed length –H(x)
Cryptography and Network Security Chapter 11 Fourth Edition by William Stallings Lecture slides by Lawrie Brown/Mod. & S. Kondakci.
Cryptography and Network Security Chapter 15 Fourth Edition by William Stallings Lecture slides by Lawrie Brown.
Cryptography1 CPSC 3730 Cryptography Chapter 11, 12 Message Authentication and Hash Functions.
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
C HAPTER 13 Asymmetric Key Cryptography Slides adapted from "Foundations of Security: What Every Programmer Needs To Know" by Neil Daswani, Christoph Kern,
CN8816: Network Security1 Confidentiality, Integrity & Authentication Confidentiality - Symmetric Key Encryption Data Integrity – MD-5, SHA and HMAC Public/Private.
Cryptography 101 Frank Hecker
Chapter 31 Network Security
Cryptology Digital Signatures and Digital Certificates Prof. David Singer Dept. of Mathematics Case Western Reserve University.
Secure Socket Layer (SSL)
Message Authentication  message authentication is concerned with: protecting the integrity of a message protecting the integrity of a message validating.
8-1Network Security Chapter 8 roadmap 8.1 What is network security? 8.2 Principles of cryptography 8.3 Message integrity, authentication.
1 Chapter 11: Message Authentication and Hash Functions Fourth Edition by William Stallings Lecture slides by Lawrie Brown (modified by Prof. M. Singhal,
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Networks Management and Security Lecture 3.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
IS 302: Information Security and Trust Week 5: Integrity 2012.
EE515/IS523 Think Like an Adversary Lecture 4 Crypto in a Nutshell Yongdae Kim.
Message Authentication Code July Message Authentication Problem  Message Authentication is concerned with:  protecting the integrity of a message.
4 th lecture.  Message to be encrypted: HELLO  Key: XMCKL H E L L O message 7 (H) 4 (E) 11 (L) 11 (L) 14 (O) message + 23 (X) 12 (M) 2 (C) 10 (K) 11.
Introduction1-1 Data Communications and Computer Networks Chapter 6 CS 3830 Lecture 31 Omar Meqdadi Department of Computer Science and Software Engineering.
Basic Cryptography 1. What is cryptography? Cryptography is a mathematical method of protecting information –Cryptography is part of, but not equal to,
Cryptography and Network Security (CS435) Part Twelve (Electronic Mail Security)
23-1 Last time □ P2P □ Security ♦ Intro ♦ Principles of cryptography.
Network Security7-1 CIS3360: Chapter 8: Cryptography Application of Public Cryptography Cliff Zou Spring 2012 TexPoint fonts used in EMF. Read the TexPoint.
8-1 Chapter 8 Security Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 part 3: Securing TCP.
8-1 Chapter 8 Security Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 part 2: Message integrity.
Cryptographic Hash Functions and Protocol Analysis
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Modern Cryptography.
Cryptography and Network Security Chapter 12 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
31.1 Chapter 31 Network Security Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
SMUCSE 5349/7349 SSL/TLS. SMUCSE 5349/7349 Layers of Security.
1 SSL/TLS. 2 Web security Security requirements Secrecy to prevent eavesdroppers to learn sensitive information Entity authentication Message authentication.
Secure Socket Layer SSL and TLS. SSL Protocol Peer negotiation for algorithm support Public key encryptionPublic key encryption -based key exchange and.
Mar 28, 2003Mårten Trolin1 This lecture Certificates and key management Non-interactive protocols –PGP SSL/TLS –Introduction –Phases –Commands.
IT 221: Introduction to Information Security Principles Lecture 5: Message Authentications, Hash Functions and Hash/Mac Algorithms For Educational Purposes.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Lecture 22 Network Security (cont) CPE 401 / 601 Computer Network Systems slides are modified from Dave Hollinger slides are modified from Jim Kurose,
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 13.Message Authentication.
@Yuan Xue CS 285 Network Security Secure Socket Layer Yuan Xue Fall 2013.
Cryptographic Hash Function. A hash function H accepts a variable-length block of data as input and produces a fixed-size hash value h = H(M). The principal.
Apr 1, 2003Mårten Trolin1 Previous lecture Certificates and key management Non-interactive protocols –PGP SSL/TLS –Introduction –Phases –Commands.
Cryptographic Hash Functions
CSCE 715: Network Systems Security
Cryptographic Hash Functions
CSE 4095 Transport Layer Security TLS, Part II
NET 311 Information Security
Introduction to Symmetric-key and Public-key Cryptography
Encryption INST 346, Section 0201 April 3, 2018.
Security: Integrity, Authentication, Non-repudiation
Chapter 8 roadmap 8.1 What is network security?
Presentation transcript:

C HAPTER 15 MACs and Signatures Slides adapted from "Foundations of Security: What Every Programmer Needs To Know" by Neil Daswani, Christoph Kern, and Anita Kesavan (ISBN ; Except as otherwise noted, the content of this presentation is licensed under the Creative Commons 3.0 License.

Agenda Secure Hash Functions Message Authentication Codes (MACs)  Block cipher based (CBC-MAC)  Hash-function based (HMAC)  Require sender & receiver to share key Digital signatures – allows anyone (w/o shared key) to verify sender of message

Given arbitrary-length input, M, produce fixed- length output (message digest), H(M), such that: Efficiency: Easy to compute H One-Way/Pre-Image resistance: Given H(M), hard to compute M (pre-image) Collision resistance: Hard to find M 1 ≠ M 2 such that H(M 1 ) = H(M 2 ) Secure Hash Functions H M MD=H(M)

15.1. Secure Hash Functions Examples Non-Examples:  Add ASCII values (collisions): H('AB') = H('BA')  Checksums CRC32 not one-way or collision-resistant MD5: “Message Digest 5” invented by Rivest  Input: multiple of 512-bits (padded)  Output: 128-bits SHA1: developed by NIST & NSA  Input: same as MD5, 512 bits  Output: 160-bits

15.2. MACs Used to determine sender of message If Alice and Bob share key k, then Alice sends message M with MAC tag t = MAC(M,k) Then Bob receives M’ and t’ and can check if the message or signature has been tampered by verifying t’ = MAC(M’, k)

CBC MACs Encrypt message with block cipher in CBC mode IV = 0, last encrypted block can serve as tag Insecure for variable-length messages AES M1M1 k M2M2 k MnMn k tag … +++ 0

HMAC Secure hash function to compute MAC Hash function takes message as input while MAC takes message and key Simply prepending key onto message is not secure enough (e.g. given MAC of M, attacker can compute MAC of M||N for desired N) Def:  Where K is key k padded with zeros  opad, ipad are hexadecimal constants

15.3. Signatures (1) Two major operations: P, principal  Sign(M, k) – M is message  Verify(M, sig, P) – sig is signature to be verified Signature: sequence of bits produced by Sign() such that Verify(M, sig, P), (sig == Sign(M, k))  Non-repudiable evidence that P signed M  Many applications: SSL, to sign binary code, authenticate source of Use asymmetric encryption ops F & F -1

15.3. Signatures (2) S() & V() : implement sign & verify functions Signature is s = S(M, k s ) =F -1 (h(M), k s )  Decrypt hash with secret key  Only signer (principal with secret key) can sign Verify s: V(M, s, k p ) = (F(s,k p ) == h(M))  Encrypting with public key  Allows anyone to verify a signature  Need to bind principal’s identity to their public key

Certificates & CAs (1) Principal needs certificate from CA (i.e. its digital signature) to bind his identity to his public key CA must first sign own certificate attesting to own identity (“root”) Certificate, C(P), stored as text: name of principal P, public key (k p(P) ), expiration date C(P) = (C text (P), C sig (P)) Root Certificate, C(CA), looks like  C text (CA) = ("CA", k p(CA), exp)  C sig (CA) = S(C text (CA), k s(CA) )

Certificates & CAs (2) Alice constructs certificate text:  C text (Alice)=("Alice", k p(Alice), exp)  Authenticates herself to CA (through “out-of-band” mechanism such as driver’s license) CA signs Alice’s certificate: C sig (Alice)=S(C text (Alice),k s(CA) ) Alice has public key certificate  C(Alice)=(C text (Alice),C sig (Alice))  Can use to prove that k p(Alice) is her public key

signature verifies message? Signing and Verifying Signing: sig = Sign(M, k s(P) ) = (S(M, k s(P) ),C(P))  Compute S() with secret key: sig.S  Append certificate: sig.C Verifying: Verify(M, sig, P) =  V(M, sig.S, k p(P) ) &  V(sig.C text (P), sig.C sig (P), k p(CA) ) &  (C text (P).name == P) &  (today < sig.C text (P).date) signed by CA? name matches on cert? certificate not expired?

Registration Authorities Authenticating every principal can burden CA Can authorize RA to authenticate on CA’s behalf  CA signs certificate binding RA’s identity to public key  Signature now includes RA’s certificate too  Possibly many intermediaries in the verification process starting from “root” CA certificate  More links in chain, more weak points: careful when verifying signatures Ex: IE would not verify intermediate certificates and trust arbitrary domains (anyone could sign)

Web of Trust Pretty Good Privacy (PGP): digital signatures can be used to sign “Web of trust” model: users sign own certificates and other’s certificates to establish trust Two unknown people can find a certificate chain to a common person trusted by both Source:

15.4. Attacks Against Hash Functions Researchers have been able to obtain collisions for some hash functions  Collision against SHA-1: 2 63 computations (NIST recommends phase out by 2010 to e.g. SHA-256)  MD5 seriously compromised: phase out now! Collision attacks can’t fake arbitrary digital signatures (requires finding pre-images) However could get 2 documents with same hash and sign one and claim other was signed

15.5. SSL Handshake: steps client & server perform before exchanging sensitive app-level data Goal of handshake: client & server agree on master secret used for symmetric crypto Two round trips:  1 st trip is “hello” messages: what versions of SSL and which cryptographic algorithms supported  2 nd varies based on client or mutual authentication

Server-Authenticated Only (1) Client creates random pre-master secret, encrypts with server’s public key Server decrypts with own private key Both compute hashes including random bytes exchanged in “hello” to create master secret With master secret, symmetric session key and integrity key derived (as specified by SSL) App Data encrypted with symmetric key

Server-Authenticated Only (2) Client Server ClientHello ServerHello, Certificate, ServerHelloDone ClientKeyExchange, ChangeCipherSpec, Finished ChangeCipherSpec, Finished Application Data

Mutual Authentication (1) Client also sends own certificate to server Sends CertificateVerify message to allow server to authenticate client’s public key Pre-master secret set, compute master secret Derive symmetric key & exchange data SSL mechanisms prevent many attacks (e.g. man-in-the-middle) and has performance optimizations (e.g. caching security params)

Client Server ClientHello ServerHello, Certificate, CertificateRequest, ServerHelloDone Certificate, ClientKeyExchange, CertificateVerify, ChangeCipherSpec, Finished Application Data ChangeCipherSpec, Finished Mutual Authentication (2)

Summary MACs - protect integrity of messages  Compute tag to detect tampering  Ex: CBC-MAC, HMAC (relies on secure hashes) Signatures – binds messages to senders  Allows anyone to verify sender  Prevents forged signatures  Use CAs to bind identities to public keys  Or use Web of Trust model Application: SSL (“Putting it all together”)  Relies on Cryptography: symmetric & public-key  And MACs & signatures