Encryption, Data Integrity, Digital Certificates, and SSL. Developed by. Jerry Scott. SSL Primer-1-1



Similar documents
Using etoken for SSL Web Authentication. SSL V3.0 Overview

Overview of CSS SSL. SSL Cryptography Overview CHAPTER

CRYPTOGRAPHY IN NETWORK SECURITY

Overview. SSL Cryptography Overview CHAPTER 1

SSL A discussion of the Secure Socket Layer

Savitribai Phule Pune University

As enterprises conduct more and more

SSL/TLS: The Ugly Truth

Network Security. Computer Networking Lecture 08. March 19, HKU SPACE Community College. HKU SPACE CC CN Lecture 08 1/23

Communication Systems SSL

7 Network Security. 7.1 Introduction 7.2 Improving the Security 7.3 Internet Security Framework. 7.5 Absolute Security?

Secure Socket Layer. Carlo U. Nicola, SGI FHNW With extracts from publications of : William Stallings.

Secure Sockets Layer (SSL ) / Transport Layer Security (TLS) Network Security Products S31213

CSE/EE 461 Lecture 23

Is your data safe out there? -A white Paper on Online Security

Security. Learning Objectives. This module will help you...

Network Security Protocols

Communication Systems 16 th lecture. Chair of Communication Systems Department of Applied Sciences University of Freiburg 2009

Security Protocols HTTPS/ DNSSEC TLS. Internet (IPSEC) Network (802.1x) Application (HTTP,DNS) Transport (TCP/UDP) Transport (TCP/UDP) Internet (IP)

WEB Security & SET. Outline. Web Security Considerations. Web Security Considerations. Secure Socket Layer (SSL) and Transport Layer Security (TLS)

Key Management (Distribution and Certification) (1)

Transport Layer Security Protocols

Security. Contents. S Wireless Personal, Local, Metropolitan, and Wide Area Networks 1

IT Networks & Security CERT Luncheon Series: Cryptography

Secure Sockets Layer

Chapter 11 Security+ Guide to Network Security Fundamentals, Third Edition Basic Cryptography

Real-Time Communication Security: SSL/TLS. Guevara Noubir CSU610

Chapter 7 Transport-Level Security

Secure Socket Layer. Introduction Overview of SSL What SSL is Useful For

Network Security [2] Plain text Encryption algorithm Public and private key pair Cipher text Decryption algorithm. See next slide

Security & Privacy on the WWW. Topic Outline. Information Security. Briefing for CS4173

SBClient SSL. Ehab AbuShmais

WIRELESS LAN SECURITY FUNDAMENTALS

HTTPS: Transport-Layer Security (TLS), aka Secure Sockets Layer (SSL)

Authentication applications Kerberos X.509 Authentication services E mail security IP security Web security

Secure Client Applications

Some solutions commonly used in order to guarantee a certain level of safety and security are:

Secure Socket Layer/ Transport Layer Security (SSL/TLS)

Connected from everywhere. Cryptelo completely protects your data. Data transmitted to the server. Data sharing (both files and directory structure)

Network Security. Gaurav Naik Gus Anderson. College of Engineering. Drexel University, Philadelphia, PA. Drexel University. College of Engineering

Network Security. Security Attacks. Normal flow: Interruption: 孫 宏 民 Phone: 國 立 清 華 大 學 資 訊 工 程 系 資 訊 安 全 實 驗 室

Three attacks in SSL protocol and their solutions

Secure Socket Layer (TLS) Carlo U. Nicola, SGI FHNW With extracts from publications of : William Stallings.

Security Protocols/Standards

Lecture 9: Application of Cryptography

Announcement. Final exam: Wed, June 9, 9:30-11:18 Scope: materials after RSA (but you need to know RSA) Open books, open notes. Calculators allowed.

Chapter 6 Electronic Mail Security

Report to WIPO SCIT Plenary Trilateral Secure Virtual Private Network Primer. February 3, 1999

What is a digital certificate, why do I need one, and how do I get it?

How To Encrypt Data With Encryption

Web Security (SSL) Tecniche di Sicurezza dei Sistemi 1

Properties of Secure Network Communication

Network Security Part II: Standards

Internet Programming. Security

SSL: Secure Socket Layer

How encryption works to provide confidentiality. How hashing works to provide integrity. How digital signatures work to provide authenticity and

How To Understand And Understand The Ssl Protocol ( And Its Security Features (Protocol)

Security. Friends and Enemies. Overview Plaintext Cryptography functions. Secret Key (DES) Symmetric Key

Web Payment Security. A discussion of methods providing secure communication on the Internet. Zhao Huang Shahid Kahn

The Secure Sockets Layer (SSL)

What is network security?

CS 393 Network Security. Nasir Memon Polytechnic University Module 11 Secure

Network Security Essentials Chapter 5

Web Security Considerations

The Case For Secure

INF3510 Information Security University of Oslo Spring Lecture 9 Communication Security. Audun Jøsang

TLS and SRTP for Skype Connect. Technical Datasheet

Transport Level Security

Chapter 17. Transport-Level Security

You re FREE Guide SSL. (Secure Sockets Layer) webvisions

Research Article. Research of network payment system based on multi-factor authentication

Introduction...3 Terms in this Document...3 Conditions for Secure Operation...3 Requirements...3 Key Generation Requirements...

GT 6.0 GSI C Security: Key Concepts

, ) I Transport Layer Security

Cryptosystems. Bob wants to send a message M to Alice. Symmetric ciphers: Bob and Alice both share a secret key, K.

Secure Socket Layer. Security Threat Classifications

3.2: Transport Layer: SSL/TLS Secure Socket Layer (SSL) Transport Layer Security (TLS) Protocol

Securing your Online Data Transfer with SSL

7! Cryptographic Techniques! A Brief Introduction

Software Engineering 4C03 Research Project. An Overview of Secure Transmission on the World Wide Web. Sean MacDonald

Understanding Digital Certificates and Secure Sockets Layer (SSL)

SSL Secure Socket Layer

mod_ssl Cryptographic Techniques

Security Policy Revision Date: 23 April 2009


An Introduction to Cryptography as Applied to the Smart Grid

Authenticity of Public Keys

Cryptography and Network Security Chapter 15

Communication Security for Applications

E-commerce. business. technology. society. Kenneth C. Laudon Carol Guercio Traver. Second Edition. Copyright 2007 Pearson Education, Inc.

Introduction to Cryptography

IBM i Version 7.3. Security Digital Certificate Manager IBM

Why you need secure

Outline. Transport Layer Security (TLS) Security Protocols (bmevihim132)

Lecture 9 - Network Security TDTS (ht1)

Information Security

XML Encryption Syntax and Processing. Duan,Limiao 07,12,2006

Electronic Mail Security. Security. is one of the most widely used and regarded network services currently message contents are not secure

Security Digital Certificate Manager

Chapter 7: Network security

Transcription:

Encryption, Data Integrity, Digital Certificates, and SSL Developed by Jerry Scott 2002 SSL Primer-1-1

Ideas Behind Encryption When information is transmitted across intranets or the Internet, others can eavesdrop on the transmission Encryption is intended to prevent eavesdroppers from understanding the transmitted information they may still read it, but not understand it To maintain the confidentiality of communications Also helps to maintain the integrity of the data Roll Tide Encryptor sjelalshnsmwix Decryptor Roll Tide Key A Key B Two main types of encryption exist Symmetric encryption (sometimes called secret key or 1-key) Asymmetric encryption (sometimes called public key or 2-key) Symmetric encryption is 1,000 times faster than asymmetric in software SSL Primer-1-2

Symmetric Key Encryption With symmetric encryption, the same key is used for encryption and decryption of the data hence the simple name 1-key encryption Symmetric key encryption is used to encrypt large amounts of data, sometimes called data streams Also known as single, 1-key, or secret key, encryption Symmetric key algorithms usually have a large number of possible keys A 56-bit key size produces 2 56 or 72,057,594,037,927,936 different keys Can you name that huge number? A computer that could test 8,000,000 56-bit keys/second would take 285 years to generate and test all of the 56-bit keys There are two categories of symmetric encryption algorithms Block algorithms, where data is encrypted one block at a time Stream algorithms, where data is encrypted one byte at a time SSL Primer-1-3

Symmetric Encryption Algorithms Many symmetric key algorithms exist; e.g., Algorithm Category Key length Comment DES Block 56 56 bits Standardized by by IBM IBM in 1970s in 1970s Triple-DES Block 112/168 bits bits Twice/three as strong x key as length DESof DES IDEA Block 128 bits Used Used by by PGP PGP RC2 Block 1 2048 bits From From RSA RSA Data Data Security RC4 Stream 1 2048 bits From From RSA RSA Data Data Security AES Block 128, 192, 256 NIST, NSA Biggest problem with using symmetric key encryption is key distribution Both parties must know the same key Requires a pre-established relationship between the parties DES = Data Encryption Standard PGP = Pretty Good Privacy NSA = National Security Agency NIST = National Institute for Science and Technology IDEA = International Data Encryption Algorithm SSL Primer-1-4

Public Key Encryption Public key encryption requires the use of a specially generated public key/private key pair Public key and private key are mathematically related Unfortunately, the complex mathematical relationship makes the encryption and decryption process relatively slow The relationship between the public and private keys is such that Data encrypted with the public key can be decrypted only with the private key Data encrypted with the private key can be decrypted only with the public key With public key encryption, it is possible to communicate using encryption without a pre-established relationship Can also be used as the basis for an authentication mechanism Browsers have many public keys in them already In IE, go to Tools Internet Options Content Trusted Root Authorities SSL Primer-1-5

Public Key Encryption Algorithms Public key algorithms appeared in the late 1970 s The two prominent algorithms are Diffie Hellmann and RSA RSA is used in SSL The RSA key may be any length, depending on the particular implementation To send someone confidential information using public key encryption Both parties have to generate a key pair, i.e., a private and a public key Somehow, exchange the public keys. Encrypt the data using the recipient s public key Data can be decrypted only by using recipient s private key Private key must not be disclosed To prove that you are the person sending the data Encrypt the data with your private key Anyone with access to your public key can decrypt it Proves that it was you who sent the data SSL Primer-1-6

Message Digest Algorithms MD5 and SHA1 Message digest algorithms Produce the size output The output is called a Message Digest (MD) The MD is always the same size MD5 is an often used algorithm, and produces a 128-bit MD SHA1 is a newer algorithm and produces a 160-bit MD Message digest algorithms Always yield the same MD for the same document If any portion (a single bit, character, phrase) of a document is changed, and a new MD created The new MD will be different from the original MD An MD (128 or 160 bits) is a digital fingerprint of a document Can be used to check integrity SSL Primer-1-7

Message Digest Algorithm -- MD5 -- Demonstration In this demo, we will change 1 bit of a document and observe the effect on the MD5 message digest Using the publicly available MD5.exe program First create a text file with just your first name a space and then your last name. Capitalize the first letters of your two names For your instructor, this would be Jerry Scott Name the file yourfirstname1.txt, as in jerry1.txt Use the md5.exe program to produce and save a MD, as in Md5 < jerry1.txt >md1.txt Change the first letter to a lowercase, as in jerry Scott and save the file as jerry2.txt Use the md5.exe program to produce a new MD, as in Md5 <jerry2.txt > md2.txt Notice how different the two MD s are. You only changed 1 bit! SSL Primer-1-8

Achieving Data Integrity Sender Receiver Original Document Any length Message Digest A The Network A Original Document Any length Message Digest B Computed Message Digest Sender calculates a MD (A) Sends it along with the original document. Receiver calculates its own MD (B) from the document it received Compares B to the received MD (A) the sender calculated. If A is the same as B, receiver thinks the packet is unaltered. SSL Primer-1-9

Better Data Integrity Using a Digital Signature Sender Original Document Any length Message Digest A The Network Digital Signature A Receiver Original Document Any length Message Digest B Computed Message Digest Sender encrypts the MD (A) with his/her private key. This is called a digital signature. Receiver uses his/her copy of the sender s public key to decrypt the digital signature. This yields an MD (hopefully the same as the sender sent). Receiver calculates its own MD (B) from the document it received over the network and compares it to the decrypted MD (A) If the MD A is the same as MD B, the receiver thinks the packet is unaltered. SSL Primer-1-10

What Does a Digital Signature Add In the classic interception or person-in-the-middle attack An attacker who knows the MD algorithm can add data, re-compute a new MD, and send the document to the ultimate receiver The receiver would get the new MD, calculate its own MD on the data received, and the two MD s would be the same The receiver will not know the data has been modified When the sender encrypts the MD with his/her private key, the attacker cannot add data and encrypt it with the sender s private key Sender Original Document Any length Message Digest Attacker Modified Document New length New Message Digest Receiver Modified Document New length New Message Digest SSL Primer-1-11

What is a Digital Certificate? To get a digital certificate, a server or user or company contacts a certificate authority, CA. The CA runs software that issues certificates There are different kinds of digital certificates. The difference is in the fields in the certificate User, server, software publisher, financial CA s have different issuance policies for different kinds of digital certificate SSL Primer-1-12

How Do You Get A Digital Certificate? CA Certificate Request Form Subject s name Subject s public key Bio info for the CA Subject Name Dun and Bradstreet # Public key Other info Digital Certificate Fields Biographical Information Fields User fills out the CA s certificate request form CA uses Bio information to verify the identify of the user or service CA puts the required fields into the certificate The CA calculates a MD of the certificate fields The CA encrypts the MD with its private key This is the certificate s digital signature SSL Primer-1-13

Verifying A Digital Certificate Date Cert is Valid Serial Number of Cert Subject s name Subject s Algorithms Subject s public key CA s public key CA s algorithms Other Information CA s Digital Signature of the above fields To verify a digital certificate Client uses its copy of the CA s public key Stored in your browser Decrypts the CA s Digital Signature Gets CA s MD Calculates received MD on the received fields in the Cert (minus the Digital Signature If the CA s MD equals the received MD, the cert is verified All fields in the Cert are now valid, including the subject s name and public key After verification, the receiver knows it has a correct public key and a correct Subject name SSL Primer-1-14

Verifying Integrity of Software What the Software Publisher Sends You Software -- not encrypted Software Publisher s Digital Signature Software Publisher s Digital Certificate CA s Digital Signature To verify a signed applet or signed Active X download The client s browser first verifies Software publisher s digital certificate Gets Software publisher s name and public key Using the Software Publisher s public key Client browser then decrypts Software publisher s Digital Signature to get the Software publisher s MD Client browser then calculates the Received MD on the downloaded software If the software publisher s MD = Received MD, the software is verified Client now knows who the applet is from and that is exactly what was sent SSL Primer-1-15

SSL History Netscape developed the SSL prototype SSL in 1994 never released it Then in 1994, SSLV2 was released by Netscape SSLV2 was weak cryptographically and a hack against it was done In 1995, Microsoft began developing its version, which it named PCT They also developed the Secure Transport Layer Protocol in 1996 Also in 1995, Netscape released SSLV3 The Internet Engineering Task Force (IETF) chartered a working group to develop an internet standard for this type of protocol in 1996 It wanted to standardize a new protocol around SSLV3, PCT, and STLP This effort failed. Netscape went their own way with SSLV3 IETF s internal policies caused its version, Transport Layer Security (TLS) to be delivered in January, 1999. TLS uses different algorithms and data structures than SSLV3 Today, most browsers support SSLV2, SSLV3, and TLS SSL Primer-1-16

How Does SSL Work -- 1 The first stage in SSL is the handshake C S Client issues an https in the address line to start SSL handshake Client tells server which SSL version and algorithms it can use Client sends a 32-byte random number it will use later in the key generation process The second stage is the Server s initial answer S C Server sends the client its server digital certificate so the client can verify its Subject name and get its public key Server also sends client a 32-byte random number which it will use later as part of its key generation process and a 32-byte session-id. Server chooses an algorithm set from what the client just sent In the third stage, the client computer verifies the server s digital certificate Client uses CA s public key, which is in its browser, to decrypt the digital signature on the Server s certificate. This produces the CA s MD of the server s digital certificate fields Then the client uses the same algorithm to create a message digest of the certificate fields it has just received Client compares the two MD s. If they are the same, the digital certificate is verified. SSL Primer-1-17

How Does SSL Work -- 2 In step four, the client extracts Server s name and public key from the certificate In the fifth step, the client creates a 48-byte pre-master secret, which it encrypts with the Server s public key. Only the server has the private key to encrypt this message The encrypted pre-master secret is 64 bytes long. The client calculates an MD of this information and encrypts it with the public key In the sixth step, the server Uses its private key to decrypt the encrypted message, getting the pre-master secret and the client MD of it Calculates its own MD of the received pre-master secret When the two MD s agree, the server has verified the pre-master secret In the seventh step, the client and the server use a Key Derivation Function to independently compute their own symmetric keys from the pre-master secret Their random numbers are input to the KDF There are four keys to be created Two for encryption: one for C to encrypt to S, and one for S to encrypt to C Two for signing: one for C to sign to S, and one for S to sign to C SSL Primer-1-18

How Does SSL Work -- 3 Now that both C and S have candidates for their symmetric keys, they need to test them for validity To do this, each side sends its own MD calculated from the following fields The negotiated master secret, NMS The concatenated handshake messages that side received The MD is actually an MD within an MD. It s format is MD( NMS + padding1 + MD( Concatenated Messages + NMS + padding2) ) Each side decrypts its received MD and compares it to the same messages it has received and sent. If these are the same, the keys are valid If the two MD s are not the same, the SSL connection fails Once SSL has been setup, each side now uses the four session keys to encrypt and sign each frame sent to the other SSL is very conservative: Each frame is encrypted and an MD for each frame is calculated Each side receives a frame, decrypts it, and then uses the two MD technique to verify its integrity SSL Primer-1-19