Cryptography 101 Frank Hecker

Slides:



Advertisements
Similar presentations
Spring 2000CS 4611 Security Outline Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls.
Advertisements

Internet and Intranet Protocols and Applications Lecture 9a: Secure Sockets Layer (SSL) March, 2004 Arthur Goldberg Computer Science Department New York.
Cryptography Chapter 7 Part 4 Pages 833 to 874. PKI Public Key Infrastructure Framework for Public Key Cryptography and for Secret key exchange.
Cryptography and Network Security
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.
An Introduction to Secure Sockets Layer (SSL). Overview Types of encryption SSL History Design Goals Protocol Problems Competing Technologies.
Topic 8: Secure communication in mobile devices. Choice of secure communication protocols, leveraging SSL for remote authentication and using HTTPS for.
1 Supplement III: Security Controls What security services should network systems provide? Confidentiality Access Control Integrity Non-repudiation Authentication.
1 Pertemuan 12 Authentication, Encryption, Digital Payments, and Digital Money Matakuliah: M0284/Teknologi & Infrastruktur E-Business Tahun: 2005 Versi:
Lecture 5: security: PGP Anish Arora CIS694K Introduction to Network Security.
Apr 2, 2002Mårten Trolin1 Previous lecture On the assignment Certificates and key management –Obtaining a certificate –Verifying a certificate –Certificate.
Mar 12, 2002Mårten Trolin1 This lecture Diffie-Hellman key agreement Authentication Certificates Certificate Authorities SSL/TLS.
Cryptography and Network Security Chapter 17
1 Pertemuan 12 Security Matakuliah: H0242 / Keamanan Jaringan Tahun: 2006 Versi: 1.
BY MUKTADIUR RAHMAN MAY 06, 2010 INTERODUCTION TO CRYPTOGRAPHY.
Apr 22, 2003Mårten Trolin1 Agenda Course high-lights – Symmetric and asymmetric cryptography – Digital signatures and MACs – Certificates – Protocols Interactive.
Symmetric Key Distribution Protocol with Hybrid Crypto Systems Tony Nguyen.
Cryptographic Technologies
Encryption An Overview. Fundamental problems Internet traffic goes through many networks and routers Many of those networks are broadcast media Sniffing.
EECC694 - Shaaban #1 lec #16 Spring Properties of Secure Network Communication Secrecy: Only the sender and intended receiver should be able.
03 December 2003 Public Key Infrastructure and Authentication Mark Norman DCOCE Oxford University Computing Services.
Network Security – Part 2 V.T. Raja, Ph.D., Oregon State University.
Cryptography and Network Security Chapter 15 Fourth Edition by William Stallings Lecture slides by Lawrie Brown.
Chapter 8 Web Security.
Digital Signature Xiaoyan Guo/ Xiaohang Luo/
SMUCSE 5349/49 Security. SMUCSE 5349/7349 Threats Threats to the security of itself –Loss of confidentiality s are sent in clear over.
CSCI 6962: Server-side Design and Programming
Chapter 31 Network Security
How HTTPS Works J. David Giese. Hyper Text Transfer Protocol BrowserHTTP Server GET / HTTP/1.1 HOST: edge-effect.github.io HEADERS BODY HTTP/ OK.
Chapter 14 Encryption: A Matter Of Trust. Awad –Electronic Commerce 2/e © 2004 Pearson Prentice Hall 2 OBJECTIVES What is Encryption? Basic Cryptographic.
SSL / TLS in ITDS Arun Vishwanathan 23 rd Dec 2003.
Chapter 9: Using and Managing Keys Security+ Guide to Network Security Fundamentals Second Edition.
Protecting Internet Communications: Encryption  Encryption: Process of transforming plain text or data into cipher text that cannot be read by anyone.
Introduction to Secure Sockets Layer (SSL) Protocol Based on:
©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl1 1 Chapter 29 Internet Security.
Chapter 6 Electronic Mail Security MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.
Cryptography and Network Security (CS435) Part Fourteen (Web Security)
Certificate-Based Operations. Module Objectives By the end of this module participants will be able to: Define how cryptography is used to secure information.
Web Security : Secure Socket Layer Secure Electronic Transaction.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
Cryptography and Network Security (CS435) Part Twelve (Electronic Mail Security)
11-Basic Cryptography Dr. John P. Abraham Professor UTPA.
1. 2 Overview In Exchange security is managed by assigning permissions in Active Directory Exchange objects are secured with DACL and ACEs Permissions.
Advanced Database Course (ESED5204) Eng. Hanan Alyazji University of Palestine Software Engineering Department.
Chapter 8 – Network Security Two main topics Cryptographic algorithms and mechanisms Firewalls Chapter may be hard to understand if you don’t have some.
SECURITY – Chapter 15 SECURITY – Chapter 15 ….for authentication and confidentiality PGP 1.Uses best algorithms as building blocks 2.General.
31.1 Chapter 31 Network Security Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
31.1 Chapter 31 Network Security Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Security fundamentals Topic 5 Using a Public Key Infrastructure.
Electronic Mail Security Prepared by Dr. Lamiaa Elshenawy
2/19/2016clicktechsolution.com Security. 2/19/2016clicktechsolution.com Threats Threats to the security of itself –Loss of confidentiality.
EE 122: Lecture 24 (Security) Ion Stoica December 4, 2001.
Mar 28, 2003Mårten Trolin1 This lecture Certificates and key management Non-interactive protocols –PGP SSL/TLS –Introduction –Phases –Commands.
By Marwan Al-Namari & Hafezah Ben Othman Author: William Stallings College of Computer Science at Al-Qunfudah Umm Al-Qura University, KSA, Makkah 1.
第五章 电子邮件安全. Security is one of the most widely used and regarded network services currently message contents are not secure –may be inspected.
The Secure Sockets Layer (SSL) Protocol
Security is one of the most widely used and regarded network services
Cryptography and Network Security
Computer Communication & Networks
Secure Sockets Layer (SSL)
S/MIME T ANANDHAN.
Using SSL – Secure Socket Layer
Cryptography and Network Security
The Secure Sockets Layer (SSL) Protocol
Cryptography and Network Security
….for authentication and confidentiality PGP
Presentation transcript:

Cryptography 101 Frank Hecker hecker@netscape.com

Cryptography 101 Goal: provide a basic understanding of cryptography and related security technologies key to Netscape Topics: encryption algorithms, both symmetric and asymmetric (i.e., public key) hash functions, digital signatures, and X.509 certificates SSL S/MIME 2 2

You should be able to answer... What are the real differences between the "40-bit" and "128-bit" versions? How are certificates used (or not used) in SSL connections? What are certificate authorities for, and what do they actually do? How does S/MIME differ from SSL? Where can SSL, S/MIME be best used? Other questions?

Why security technology? Keep information secret confidentiality Protect information from tampering integrity Tell if person is who they say they are authentication Allow or deny access to data, etc. authorization (access control) Prove that person really did something nonrepudiation

Netscape Customer Example Encryption Encryption provides confidentiality Data encrypted using encryption algorithm together with encryption key Use algorithm with decryption key to recover original data encrypt 0110111010010001 key Ke Intranets address three areas crucial to an organization’s information system: For information distribution, intranets enable more effective, timely communication among all employees, regardless of location; For client/server applications, intranets can be used for transactions and two-way publishing; For collaboration, they can make it easier to exchange and share information more quickly and effectively through technology like newsgroups, email, and groupware. How do communication, applications, and collaboration interrelate? Netscape Customer Example Cadence Design Systems, a leading supplier of electronic design automation software, recently built a Web-based sales force automation system for: Communication—maps out each step of the sales cycle with links to sales support resources and provides an easy-to-find repository of sales tools and reference materials Client/Server Applications—uses online forms to facilitate communications with headquarters, and accesses and distributes a daily news feed on the industry Collaboration—allows global account teams to securely share information New sales reps can learn in hours what otherwise would have taken weeks to learn. The point-and-click Web interface requires no training to use, and information and documents are dynamically served from a database. Sales reps have more time to focus on their relationships with customers. The quick brown fox 4f60ce544b43c13f1d 4f60ce544b43c13f1d decrypt 1001001100111010 key Kd The quick brown fox 11 11 6 6 4

Secure Sockets Layer (SSL) user requests URL https://www.foo.com/def/xyz.html HTTP user requests URL http://www.foo.com/def/xyz.html Communicator (Navigator) Enterprise Server GET def/xyz.html 48c00db62f7d userid/password 8f27a038ee3c <html><head>... 77d9421a0645...

SSL-transmitted web page Security indicator

Symmetric cryptography In symmetric (or single key, or secret key) encryption algorithm decryption key is same as encryption key (or can be easily derived from it) Examples: RC4, DES, triple-DES encrypt 0110111010010001 key K The quick brown fox decrypt 4f60ce544b43c13f1d 8

Encryption strength For well-designed symmetric encryption algorithm, strength of algorithm is dependent on number of possible keys brute force attack: try all possible keys Adding one bit to key length makes algorithm twice as strong doubles number of possible keys For a given algorithm (e.g., RC4) 56-bit key is 216 stronger than 40-bit key 128-bit key is 288 stronger than 40-bit key

How SSL works (take 1) make TCP connection “I’d like to talk SSL” “OK, let’s talk SSL” have session key Ks transmit data over TCP encrypted using symmetric encryption algorithm with key Ks Problem: How do both sides agree on session key?

Public key cryptography In asymmetric (or dual key, or public key) encryption algorithm decryption key is not same as encryption key (and cannot be easily derived from it) Examples: RSA, KEA encrypt 0110111010010001 key Kpublic Intranets address three areas crucial to an organization’s information system: For information distribution, intranets enable more effective, timely communication among all employees, regardless of location; For client/server applications, intranets can be used for transactions and two-way publishing; For collaboration, they can make it easier to exchange and share information more quickly and effectively through technology like newsgroups, email, and groupware. How do communication, applications, and collaboration interrelate? Netscape Customer Example Cadence Design Systems, a leading supplier of electronic design automation software, recently built a Web-based sales force automation system for: Communication—maps out each step of the sales cycle with links to sales support resources and provides an easy-to-find repository of sales tools and reference materials Client/Server Applications—uses online forms to facilitate communications with headquarters, and accesses and distributes a daily news feed on the industry Collaboration—allows global account teams to securely share information New sales reps can learn in hours what otherwise would have taken weeks to learn. The point-and-click Web interface requires no training to use, and information and documents are dynamically served from a database. Sales reps have more time to focus on their relationships with customers. decrypt The quick brown fox 4f60ce544b43c13f1d decrypt 1001001100111010 key Kprivate encrypt 4f60ce544b43c13f1d The quick brown fox 6 11 11 6 4

Strength of RSA public key cryptography Public key cryptography is based on existence of certain hard problems figuring out private key from public key requires solving the hard problem For RSA, public/private keys are created using product of two large prime numbers hard problem is factoring the product (modulus) to recover original primes RSA strength depends on modulus length 512-bit modulus (export) or 1024-bit (US)

How SSL works (take 2) make TCP connection “I’d like to talk SSL” “OK, here’s my public key” generate random session key Ks “Here’s session key, encrypted using your public key” decrypt session key using private key transmit data encrypted using session key Ks Problem: Must do (slow) public key operations for every SSL connection

How SSL works (take 3) make TCP connection “I’d like to talk SSL” “OK, here’s my public key” generate random secret value “Here’s secret value, encrypted using your public key” decrypt secret value using private key use shared secret to make session keys K1 and K2 transmit data encrypted using session keys

What’s left to do? We seem to have basic problem of confidentiality solved, but… “Man in the middle” can corrupt encrypted data and mess up transaction MITM can breach confidentiality by substituting his public key for server’s Server doesn’t have strong authentication for client Time to talk about hash functions, digital signatures, and certificates!

Hash functions Takes original data (any length) and computes fixed-length hash code different data means different hash code can’t recover data from hash code Examples: MD5 (128-bit hash code), SHA-1 (160-bit hash code) The quick brown fox... hash function 85d013f4 The quick red fox... hash function ad917c7f

Message authentication codes Essentially a secure checksum hash code computed from original data and shared secret value transmitted with data (like checksum) Used in SSL to protect integrity of data The quick brown fox jumps over... 2a487c81fe215c hash function f730d1f4 The quick brown fox jumps over... f730d1f4

Netscape Customer Example Digital signatures Signer generates digital signature compute hash code from original data encrypt hash code using signer’s private key Others verify digital signature decrypt hash code using signer’s public key compute second copy of hash code from copy of original data two copies of hash code should match No match means data was altered or signer is imposter or using wrong public key Intranets address three areas crucial to an organization’s information system: For information distribution, intranets enable more effective, timely communication among all employees, regardless of location; For client/server applications, intranets can be used for transactions and two-way publishing; For collaboration, they can make it easier to exchange and share information more quickly and effectively through technology like newsgroups, email, and groupware. How do communication, applications, and collaboration interrelate? Netscape Customer Example Cadence Design Systems, a leading supplier of electronic design automation software, recently built a Web-based sales force automation system for: Communication—maps out each step of the sales cycle with links to sales support resources and provides an easy-to-find repository of sales tools and reference materials Client/Server Applications—uses online forms to facilitate communications with headquarters, and accesses and distributes a daily news feed on the industry Collaboration—allows global account teams to securely share information New sales reps can learn in hours what otherwise would have taken weeks to learn. The point-and-click Web interface requires no training to use, and information and documents are dynamically served from a database. Sales reps have more time to focus on their relationships with customers. 11 11 4 6 6

Signing and verifying Bad! OK The quick brown fox... hash function 85d013f4 encrypt 0110111010010001 key Kprivate 85d013f4 a3ff369b The quick brown fox... a3ff369b The quick red fox... decrypt 0110111010010001 key Kpublic a3ff369b 85d013f4 Bad! OK The quick brown fox... The quick red fox... hash function 85d013f4 ad917c7f

Certificates A certificate consists of (at least) public key identity associated with public key digital signature on certificate contents Certificate can be signed by owner of public key (self-signed) by trusted third party (certificate authority) Examples: X.509v3 certs, PGP certs 0111011011011001 John Doe d90e891a

How SSL works (take 4) make TCP connection “I’d like to talk SSL” “OK, here’s my public key (in certificate)” generate random secret value “Here’s secret value, encrypted using your public key” decrypt secret value using private key use shared secret to make session keys K1 and K2 transmit data encrypted using session keys

Certificates and authentication Goal: Prove entity is who they claim to be First prove that entity knows private key corresponding to a known public key entity can decrypt something encrypted with public key or entity can sign something with private key, signature verifiable using public key Then map from public key to an identity (i.e., identity included in certificate) Note: certificate by itself proves nothing

Basic SSL (final take) make TCP connection “I’d like to talk SSL” “OK, here’s my public key (in certificate)” cert checked for validity, but not yet authenticated “Here’s secret value, encrypted using your public key” decrypt secret value using private key “Done with handshake, switching to encrypted mode” (sent encrypted using session keys generated from secret) if works, server now authenticated transmit encrypted application data

SSL with client authentication make TCP connection “I’d like to talk SSL” “Here’s my certificate. What’s yours?” “Here’s my certificate too” cert checked for validity, but not yet authenticated “Here’s secret value, encrypted using your public key” “Here’s something signed using my private key” if verified, client now authenticated “Done with handshake, switching to encrypted mode” (sent encrypted using session keys generated from secret) transmit data encrypted using session keys

Certificates and trust Binds a public key to an identity (person’s name, server hostname, etc.) but how much you trust that binding is a separate issue If self-signed, you must decide level of trust with each new certificate seen If signed by CA, can trust new certificates based on your trust in CA and its policies verifying certificates requires public key of CA (i.e., certificate for CA itself)

What SSL does/doesn’t do SSL provides confidentiality of transmitted data from client to server and server to client authentication of server to client authentication of client to server (optional) integrity of transmitted data SSL does not provide confidentiality, etc., for data in a store and forward environment (e.g., email) 8

S/MIME Emerging standard for secure document transfer (e.g., in email, etc.) works with standard Internet message types (RFC 822, MIME) Goals of S/MIME confidentiality of document contents integrity of document contents nonrepudiation: can prove sender wrote document S/MIME uses encryption and/or signing 7 10 8

S/MIME (signing only) SMTP (signature OK) The quick brown fox... SMTP mail server SMTP The quick brown fox... a3ff369b mail server S/MIME mail client The quick brown fox... a3ff369b (signature OK) The quick brown fox...

How S/MIME signing works Start with MIME-compliant message body (text and attachments) Sign content using sender’s private key Include copy of sender’s certificate On receipt, validate signature using public key from sender’s certificate Note: This assumes that sender’s certificate is valid and trusted for signing Get signer’s authenticated identity from certificate

S/MIME (encryption only) SMTP SMTP mail server 4f60ce544b43c13f1d The quick brown fox... 0110111010010001 key Kpublic of recipient encrypt mail server S/MIME mail client 4f60ce544b43c13f1d The quick brown fox... decrypt key Kprivate of recipient 1001001100111010

How S/MIME encryption works Start with MIME-compliant message body (text and attachments) Pick random key and encrypt message using some symmetric algorithm Encrypt symmetric key using recipient’s public key (requires their certificate) On receipt, decrypt symmetric key using recipient’s private key Use symmetric key to decrypt message

S/MIME signing/encryption Can combine signing and encryption in single S/MIME message Start with MIME-compliant body Sign content using sender’s private key Encrypt signed message using random symmetric key then encrypt symmetric key using recipient’s public key On receipt, reverse operations: use recipient’s private key in decrypting, then sender’s public key to verify signature

S/MIME-secured message security indicator

Certificate creation, retrieval create key pair at client send public key plus identity to CA CA verifies identity, signs key+indentity client gets certificate and installs Certificate retrieval not needed for SSL (exchanged in-band) not needed for S/MIME signed messages needed for S/MIME encryption if sender doesn’t have certificate for recipient

Summary of Crypto 101 Goal is to implement security services: confidentiality, integrity, etc. Services implemented using cryptography encryption provides confidentiality hash function plus shared secret provides integrity (MAC) public key encryption plus hash function provides integrity, nonrepudiation (digital signature) authentication is obtained as a by-product of key exchange or of signing

For more information SSL and cryptography tutorials http://home.netscape.com/assist/security/ssl/howitworks.html Chapter 1, Netscape Certificate Server Administrator’s Guide http://twain/html/certificate/certserv/ux/ag/overview.htm SSL FAQ (from ssl-talk mailing list) http://www.consensus.com/security/ssl-talk-faq.html S/MIME http://www.rsa.com/rsa/S-MIME/index.html For serious crypto enthusiasts news:mcom.crypto.interest Applied Cryptography (2nd. Ed.), Bruce Schneier

Cryptography 101 The End