52
Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Embed Size (px)

DESCRIPTION

Guide to Firewalls and VPNs, 3 rd Edition Introduction Firewalls can be equipped to serve Virtual Private Network (VPN) endpoints Encryption –Integral part of VPNs –Enables the firewall to determine whether the user who wants to connect to the VPN is actually authorized to do so –Encodes the payload of the information to maintain privacy 3

Citation preview

Page 1: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Chapter NineEncryption-The Foundation for the Virtual

Private Network

Page 2: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Overview

• Describe the role encryption plays in firewall and VPN architectures

• Explain how digital certificates work and why they are important security tools

• Analyze the workings of SSL, PGP, and other popular encryption schemes

• Discuss Internet Protocol Security (IPSec) and identify its protocols and modes

2

Page 3: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Introduction

• Firewalls can be equipped to serve Virtual Private Network (VPN) endpoints

• Encryption – Integral part of VPNs– Enables the firewall to determine whether the user

who wants to connect to the VPN is actually authorized to do so

– Encodes the payload of the information to maintain privacy

3

Page 4: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Overview

• Encryption – Process that turns information that is plainly

readable (plaintext) into scrambled form (ciphertext)– Added to firewall and VPN products to provide

protection against “active attacks” • Also known as session hijacks

• Figure 9-1– Unencrypted packet subject to modification by a

hacker

4

Page 5: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Overview (cont’d.)

5

Figure 9-1 Unencrypted Packet

@ Cengage Learning 2012

Page 6: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Overview (cont’d.)

• Figure 9-2– Packet integrity and confidentiality is maintained

• Security statistics– Laptop is stolen every 12 seconds– Over 2.6 million laptops stolen per year– 42 percent of surveyed companies suffered laptop or

mobile device theft– Average loss of over $234,000 per incident

6

Page 7: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Overview (cont’d.)

7

Figure 9-2 Encrypted Packet@ Cengage Learning 2012

Page 8: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Principles of Cryptography

• Encryption – Converting a message into a form that cannot be

read by unauthorized individuals• Cryptology encompasses two disciplines

– Cryptography • Encoding and decoding messages so that others

cannot understand them– Cryptanalysis

• Deciphering the original message from an encrypted message without knowing the algorithms and keys used to perform the encryption

8

Page 9: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Definitions

• Algorithm: – Mathematical formula or method used to convert an

unencrypted message into an encrypted message• Cipher:

– Transformation of the individual components (characters, bytes, or bits) of an unencrypted message into encrypted components

• Ciphertext or cryptogram:– Encrypted or encoded message resulting from an

encryption

9

Page 10: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Definitions (cont’d.)

• Cryptosystem:– Set of transformations necessary to convert an

unencrypted message into an encrypted message• Decipher:

– Decrypt or convert ciphertext to plaintext• Encipher:

– Encrypt or convert plaintext to ciphertext• Key or cryptovariable:

– Information used in conjunction with the algorithm to create the ciphertext from the plaintext

10

Page 11: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Definitions (cont’d.)

• Keyspace: – Entire range of values that can possibly be used to

construct an individual key• Plaintext:

– Original unencrypted message or the results from successful decryption

• Work factor: – Amount of effort (usually expressed in units of time)

required to perform cryptanalysis on an encoded message

11

Page 12: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Cryptographic Notation

• M– Original message

• C – Resulting ciphertext

• E– Encryption process.

• E(M) = C – Application of encryption (E) to a message (M) to

create ciphertext (C)

12

Page 13: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Cryptographic Notation (cont’d.)

• D – Decryption or deciphering process

• D[E(M)] = M – Deciphering (D) of an enciphered message (E(M))– Resulting in the original message (M)

13

Page 14: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Cryptographic Notation (cont’d.)

• K– The key

• E(M, K) = C – Encrypting (E) of the message (M) with the key (K)– Resulting in the ciphertext (C)

• D(C,K) = D[E(M,K),K] = M – Deciphering the ciphertext with the key (K)– Resulting in the original plaintext message

14

Page 15: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Cryptographic Notation (cont’d.)

• General methods: stream or block ciphers• Stream

– Each plaintext bit is transformed into a cipher bit, one after the other

• Block – Message is divided into blocks– Each block is transformed using the algorithm and

key

15

Page 16: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Operations: Common Ciphers

• Substitution cipher– Substitute one value for another

• Monoalphabetic substitution– Uses only one alphabet

• Polyalphabetic substitutions – More advanced substitution ciphers – Use two or more alphabets

16

Page 17: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Operations: Common Ciphers (cont’d.)

• Transposition cipher – Rearranges the values within a block to create the

ciphertext

• Transposition ciphers and substitution ciphers – Used in multiple combinations to create a very

secure encryption process

17

Page 18: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Operations: Common Ciphers (cont’d.)

• XOR cipher conversion– Bit stream is subjected to a Boolean XOR function

against some other data stream– Process is reversible

18

Page 19: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Operations: Vernam Cipher

• Developed at AT&T • Uses a set of characters for encryption operations

only one time and then discards it• Encryption process

– Values from one-time pad added to the block of text– Resulting sum is converted to text– When the two sets of values are added, if the

resulting values exceed 26• 26 is subtracted from the total (called modulo 26)

19

Page 20: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Operations: Vernam Cipher (cont’d.)

20

Page 21: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Operations: Book or Running Key Cipher

• Uses text in a book as the algorithm to decrypt a message

• Relies on:– Knowing which book to use – Having a list of codes representing the page number,

line number, and word number of the plaintext word• Sample message: 67,3,1;145,9,4;375,7,4;394,17,3• Using dictionaries

– Necessary to use only a page and word number

21

Page 22: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Operations: Symmetric Encryption

• Secret key– Used to both encipher and decipher the message

• Known as private key encryption, or symmetric encryption

• If either copy of the key becomes compromised– An intermediary can decrypt and read the messages

• Popular symmetric encryption cryptosystems:– Data Encryption Standard (DES)

• Cracked in 1997

22

Page 23: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Operations: Symmetric Encryption (cont’d.)

23

Figure 9-3 Symmetric Encryption@ Cengage Learning 2012

Page 24: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Operations: Symmetric Encryption (cont’d.)

– Triple DES (3DES) • Improvement to DES • Uses as many as three keys in succession• Performs three different encryption operations• Employs 48 rounds in its encryption computation,• Generates ciphers that are approximately 256 (72

quadrillion) times stronger than standard DES ciphers – Require only three times longer to process

24

Page 25: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Operations: Symmetric Encryption (cont’d.)

– Advanced Encryption Standard (AES)• Rijnjdael Block Cipher features a variable block length

key length of either 128, 192, or 256 bits• Four steps within each Rijndael round

25

Page 26: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Operations: Asymmetric Encryption

• Public key encryption• Uses two different keys for encryption and

decryption• Most valuable when one of the keys is private and

the other is public• Requires four keys to hold a single conversation

between two parties• Not as efficient in its use of CPU resources as

symmetric encryption – Because of the extensive mathematical calculations

26

Page 27: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Operations: Asymmetric Encryption (cont’d.)

27

Figure 9-4 Asymmetric (Public Key) Encryption@ Cengage Learning 2012

Page 28: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Operations: Digital Signatures

• Asymmetric process is reversed– Private key encrypts a message– Public key decrypts it

• Proves message was sent by the organization that owns the private key

• Digital signatures– Encrypted messages that can be independently

verified by a central facility (registry) as authentic– Can also be used to prove certain characteristics of

the message or file with which they are associated

28

Page 29: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Operations: Digital Signatures (cont’d.)

• Often used in Internet software updates• Digital certificate

– Similar to a digital signature– Asserts that a public key is associated with a

particular identity• Certificate authority (CA)

– Agency that manages the issuance of certificates – Serves as the electronic notary public to verify their

origin and integrity

29

Page 30: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Operations: RSA

• Rivest-Shamir-Aldeman (RSA)• Has been integrated into both Microsoft Internet

Explorer and Netscape Navigator• Extensions to the RSA algorithm

– RSA Encryption Scheme—Optimal Asymmetric Encryption Padding (RSAES-OAEP)

– RSA Signature Scheme with Appendix—Probabilistic Signature Scheme (RSASSA-PSS)

30

Page 31: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Operations: Public Key Infrastructure

• Public key infrastructure (PKI) – Entire set of hardware software, and cryptosystems

necessary to implement public key encryption• Common implementations of PKI include

– Systems to issue digital certificates to users and servers

– Encryption enrollment – Key-issuing systems– Tools for managing the key issuance

31

Page 32: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Operations: Public Key Infrastructure (cont’d.)– Verification and return of certificates– Key revocation services– Other services associated with PKI that vendors

bundle into their products

32

Page 33: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Operations: Public Key Infrastructure (cont’d.)

• PKI can increase organization’s capability to protect its information assets by providing– Authentication– Integrity– Confidentiality– Authorization– Nonrepudiation

33

Page 34: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Operations: Hybrid Systems

• Asymmetric encryption used to exchange a symmetric key– Two organizations can conduct quick, efficient,

secure communications • Based on symmetric encryption• Illustrated in Figure 9-6

34

Page 35: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Encryption Operations: Hybrid Systems (cont’d.)

35

Figure 9-6 Hybrid Encryption@ Cengage Learning 2012

Page 36: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Using Cryptographic Controls

• Organizations can use cryptographic controls to support– Confidentiality and integrity of e-mail and its

attachments– Authentication, confidentiality, integrity, and

nonrepudiation of e-commerce transactions– Authentication and confidentiality of remote access

through VPN connections– A higher standard of authentication when used to

supplement access control systems

36

Page 37: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

E-Mail Security

• Secure/Multipurpose Internet Mail Extensions (S/MIME) – Builds on the Multipurpose Internet Mail Extensions

(MIME) – Encode format by adding encryption and

authentication via digital signatures based on public key cryptosystems

• Privacy Enhanced Mail (PEM) – Proposed by the Internet Engineering Task Force

(IETF) as a standard for public key cryptosystems

37

Page 38: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

E-Mail Security

– Uses 3DES symmetric key encryption and RSA for key exchanges and digital signatures

• Pretty Good Privacy (PGP) – Uses the IDEA Cipher

38

Page 39: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Securing the Web

• Secure Electronic Transactions (SET) – Developed by MasterCard and VISA– Provides protection from electronic payment fraud

works by encrypting the credit card transfers with DES for encryption and RSA for key exchange

• Secure Sockets Layer (SSL) – Provide security for online electronic commerce

transactions– Has largely been replaced by TLS (Transport Layer

Security)• Many people still refer to it as SSL

39

Page 40: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Securing the Web (cont’d.)

• Secure Hypertext Transfer Protocol (SHTTP) – Encrypted solution to the unsecured version of HTTP– Provide secure e-commerce transactions as well as

encrypted Web pages for secure data transfer over the Web

• Secure Shell (SSH) – Extension to the TCP/IP protocol suite– Provides security for remote access connections

over public networks by creating a secure and persistent connection

40

Page 41: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Securing the Web (cont’d.)

• IP Security (IPSec) – Predominant cryptographic authentication and

encryption protocol suite in use today– Combines:

• Diffie-Hellman key exchange• Public key cryptography• Bulk encryption algorithms• Digital certificates

41

Page 42: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Securing the Web (cont’d.)

• IPSec components– IP Security protocol itself– Internet Key Exchange (IKE)

• IPSec modes: – Transport mode

• Only the IP data is encrypted– Tunnel mode

• Entire IP packet is encrypted and inserted as the payload in another IP packet

42

Page 43: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Securing the Web (cont’d.)

• Virtual private network (VPN)– Private, secure network – Operated over a public and insecure network– Keeps the contents of the network messages hidden

from observers

43

Page 44: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Securing Authentication

• Kerberos– Uses symmetric key encryption to validate an

individual user’s access– Consists of:

• Authentication Server (AS• Key Distribution Center (KDC• Kerberos Ticket Granting Service (TGS)

44

Page 45: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Attacks on Cryptosystems

• Brute force attacks – Ciphertext is repeatedly searched for clues that can

lead to the algorithm’s structure.– Known as ciphertext attacks – Involve searching for a common text structure,

wording, or syntax in the encrypted message• Known-plaintext attack

– Reverse-engineer the encryption algorithm

45

Page 46: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Attacks on Cryptosystems (cont’d.)

• Selected-plaintext attack – Sending the potential victim a specific text that gets

forwarded to others• Attacks on cryptosystems

– Man-in-the-middle– Correlation– Dictionary– Timing

46

Page 47: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Man-in-the-Middle

• Intercept the transmission of a public key• Can be prevented by establishing public keys with

digital signatures– Attacker cannot duplicate the signatures

47

Page 48: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Correlation Attacks

• Collections of brute-force methods • Attempt to deduce statistical relationships between

the structure of the unknown key and the ciphertext• Defense against this kind of attack

– Selection of strong cryptosystems that have stood the test of time

– Thorough key management– Strict adherence to the best practices of

cryptography in the frequency of changing keys

48

Page 49: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Dictionary Attacks

• Attacker encrypts every word in a dictionary using the same cryptosystem used by the target

• Attempt to locate a match between the target ciphertext and the list of encrypted words from the same cryptosystem

• Most computer systems use a well-known one-way hash function to store passwords– Almost always allows the attacker to find at least a

few matches in any stolen password file

49

Page 50: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Timing Attacks

• Attacker eavesdrops during a victim’s session • Uses statistical analysis of the user’s typing

patterns and inter-keystroke timings to discern sensitive session information

• Replay attack– Attempt to resubmit a recording of the deciphered

authentication to gain entry into a secure source

50

Page 51: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Defending from Attacks

• Encryption – Process of hiding the true meaning of information

• Sophisticated encryption and cryptosystems– Have the same flaw that the first systems contained

thousands of years ago• If you discover the key, you can determine the

message

51

Page 52: Guide to Firewalls and VPNs, 3 rd Edition Chapter Nine Encryption-The Foundation for the Virtual Private Network

Guide to Firewalls and VPNs, 3rd Edition

Summary

• Encryption – Process of rendering information unreadable to all

but the intended recipients• Cryptology

– Science of encryption• Cryptographic controls

– Techniques and tools used to implement cryptographic protections in networks and information systems

– Often subject to attack

52