ch11 basic cryptography

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

Upload: information-technology

Post on 06-May-2015

9.518 views

Category:

Education


0 download

DESCRIPTION

Security+ Guide to Network Security Fundamentals, 3rd Edition, by Mark CiampaKnowledge and skills required for Network Administrators and Information Technology professionals to be aware of security vulnerabilities, to implement security measures, to analyze an existing network environment in consideration of known security threats or risks, to defend against attacks or viruses, and to ensure data privacy and integrity. Terminology and procedures for implementation and configuration of security, including access control, authorization, encryption, packet filters, firewalls, and Virtual Private Networks (VPNs). CNIT 120: Network Securityhttp://samsclass.info/120/120_S09.shtml#lecturePolicy: http://samsclass.info/policy_use.htmMany thanks to Sam Bowne for allowing to publish these presentations.

TRANSCRIPT

Page 1: Ch11 Basic Cryptography

Chapter 11Basic Cryptography

Security+ Guide to Network Security Fundamentals, Third

Edition

Page 2: Ch11 Basic Cryptography

Defining Cryptography

Page 3: Ch11 Basic Cryptography

Objectives

Define cryptographyDescribe hashingList the basic symmetric cryptographic algorithms

Describe how asymmetric cryptography works

List types of file and file system cryptography

Explain how whole disk encryption works

Page 4: Ch11 Basic Cryptography

What Is Cryptography?

Cryptography - scrambles dataThe science of transforming information into an

unintelligible form while it is being transmitted or stored so that unauthorized users cannot access it

Steganography - hides dataHides the existence of the dataWhat appears to be a harmless image can

contain hidden data embedded within the imageCan use image files, audio files, or even video

files to contain hidden information

Page 5: Ch11 Basic Cryptography

Steganography

Page 6: Ch11 Basic Cryptography

Caesar Cipher

Used by Julius CaesarCaesar shifted each letter of his messages to his generals three places down in the alphabet

So BURN THE BRIDGE becomes

EXUQ WKH EUKFIG

A DB EC FD GE HF IG JH K

Page 7: Ch11 Basic Cryptography

Encryption and Decryption

EncryptionChanging the original text to a secret message using cryptography

DecryptionChange the secret message back to its original form

Page 8: Ch11 Basic Cryptography
Page 9: Ch11 Basic Cryptography

Cryptography and Security

Cryptography can provide: Confidentiality of informationIntegrity of the informationAvailability of the data

To users with the keyGuarantee Authenticity of the sender

Enforce Non-repudiationSender cannot deny sending the message

Page 10: Ch11 Basic Cryptography

Information Protection by Cryptography

Page 11: Ch11 Basic Cryptography

Cryptographic Algorithms

Page 12: Ch11 Basic Cryptography

Cryptographic Algorithms

There are three categories of cryptographic algorithms:Hashing algorithmsSymmetric encryption algorithms

Asymmetric encryption algorithms

Page 13: Ch11 Basic Cryptography

Hashing Algorithms

Page 14: Ch11 Basic Cryptography

Hashing AlgorithmsHashing is a one-way process

Converting a hash back to the original data is difficult or impossible

A hash is a unique “signature” for a set of dataThis signature, called a hash or digest,

represents the contentsHashing is used only for integrity to ensure that:

Information is in its original formNo unauthorized person or malicious software

has altered the dataCommon hash algorithms

MD5, SHA-1

Page 15: Ch11 Basic Cryptography

Hashing Algorithms (continued)

Page 16: Ch11 Basic Cryptography

Link Ch 11a

Page 17: Ch11 Basic Cryptography

Hashing Algorithm Security

A hashing algorithm is considered secure if:The ciphertext hash is a fixed sizeTwo different sets of data cannot produce the same hash, which is known as a collision

It should be impossible to produce a data set that has a desired or predefined hash

The resulting hash ciphertext cannot be reversed to find the original data

Page 18: Ch11 Basic Cryptography

Preventing a Man-in-the-Middle Attack with Hashing

Page 19: Ch11 Basic Cryptography

Hashing Algorithms (continued)

Hash values are often posted on Internet sitesIn order to verify the file integrity of files that can be downloaded

Page 20: Ch11 Basic Cryptography

Hashing Algorithms Only Ensure Integrity

Page 21: Ch11 Basic Cryptography

Message Digest (MD)Message Digest

(MD) algorithmOne common hash

algorithmThree versions

Message Digest 2 (MD2)

Message Digest 4 (MD4)

Message Digest 5 (MD5)

Suffer from collisionsNot secure

See links Ch 11b, c, d

Page 22: Ch11 Basic Cryptography

Secure Hash Algorithm (SHA)More secure than MDA family of hashesSHA-1

Patterned after MD4, but creates a hash that is 160 bits in length instead of 128 bits

SHA-2Comprised of four variations, known as SHA-

224, SHA-256, SHA-384, and SHA-512Considered to be a secure hash

Page 23: Ch11 Basic Cryptography

SHA-3 is Being Chosen Now

Link Ch 11d

Page 24: Ch11 Basic Cryptography

Whirlpool

A relatively recent cryptographic hash function

Has received international recognition and adoption by standards organizations

Creates a hash of 512 bits

Page 25: Ch11 Basic Cryptography

Password HashesAnother use for hashes is in storing passwords

When a password for an account is created, the password is hashed and stored

The Microsoft NT family of Windows operating systems hashes passwords in two different formsLM (LAN Manager) hashNTLM (New Technology LAN Manager) hash

Most Linux systems use password-hashing algorithms such as MD5

Apple Mac OS X uses SHA-1 hashes

Page 26: Ch11 Basic Cryptography

Symmetric Cryptographic Algorithms

Page 27: Ch11 Basic Cryptography

Symmetric Cryptographic AlgorithmsSymmetric cryptographic algorithms

Use the same single key to encrypt and decrypt a message

Also called private key cryptographyStream cipher

Takes one character and replaces it with one character

WEP (Wired Equivalent Protocol) is a stream cipherSubstitution cipher

The simplest type of stream cipherSimply substitutes one letter or character for

another

Page 28: Ch11 Basic Cryptography
Page 29: Ch11 Basic Cryptography

Substitution Cipher

Page 30: Ch11 Basic Cryptography

XOR (eXclusive OR)

With most symmetric ciphers, the final step is to combine the cipher stream with the plaintext to create the ciphertextThe process is accomplished through the exclusive OR (XOR) binary logic operation

One-time pad (OTP)Combines a truly random key with the plaintext

Page 31: Ch11 Basic Cryptography

XOR

Page 32: Ch11 Basic Cryptography

Block CipherManipulates an entire block of plaintext at one

timePlaintext message is divided into separate

blocks of 8 to 16 bytesAnd then each block is encrypted independently

Stream cipher advantages and disadvantagesFast when the plaintext is shortMore prone to attack because the engine that

generates the stream does not varyBlock ciphers are more secure than stream

ciphers

Page 33: Ch11 Basic Cryptography

Information Protections by Symmetric Cryptography

Page 34: Ch11 Basic Cryptography

DES and 3DES

Data Encryption Standard (DES)Declared as a standard by the U.S GovernmentDES is a block cipher and encrypts data in 64-

bit blocksUses 56-bit key, very insecureHas been broken many times

Triple Data Encryption Standard (3DES)Uses three rounds of DES encryption Effective key length 112 bitsConsidered secure

Page 35: Ch11 Basic Cryptography
Page 36: Ch11 Basic Cryptography

Advanced Encryption Standard (AES)

Approved by the NIST in late 2000 as a replacement for DES

Official standard for U.S. Government

Considered secure--has not been cracked

Page 37: Ch11 Basic Cryptography

Animation of AES Algorithm

Link Ch 11e

Page 38: Ch11 Basic Cryptography

Other AlgorithmsSeveral other symmetric cryptographic algorithms are also used:Rivest Cipher (RC) family from RC1 to RC6

International Data Encryption Algorithm (IDEA)

BlowfishTwofish

Page 39: Ch11 Basic Cryptography

Asymmetric Cryptographic Algorithms

Page 40: Ch11 Basic Cryptography

Asymmetric Cryptographic AlgorithmsAsymmetric cryptographic algorithms

Also known as public key cryptographyUses two keys instead of one

The public key is known to everyone and can be freely distributed

The private key is known only to the recipient of the message

Asymmetric cryptography can also be used to create a digital signature

Page 41: Ch11 Basic Cryptography
Page 42: Ch11 Basic Cryptography

Digital Signature

A digital signature can:Verify the senderProve the integrity of the messagePrevent the sender from disowning the message (non-repudiation)

A digital signature does not encrypt the message, it only signs it

Page 43: Ch11 Basic Cryptography
Page 44: Ch11 Basic Cryptography

Information Protections by Asymmetric Cryptography

Page 45: Ch11 Basic Cryptography

RSAThe most common asymmetric cryptography

algorithmRSA makes the public and private keys by

multiplying two large prime numbers p and qTo compute their product (n=pq)It is very difficult to factor the number n to

find p and qFinding the private key from the public key

would require a factoring operationRSA is complex and slow, but secure100 times slower than DES

Page 46: Ch11 Basic Cryptography

Diffie-Hellman

A key exchange algorithm, not an encryption algorithm

Allows two users to share a secret key securely over a public network

Once the key has been sharedThen both parties can use it to encrypt and decrypt messages using symmetric cryptography

Page 47: Ch11 Basic Cryptography

HTTPSSecure Web Pages typically use RSA, Diffie-

Hellman, and a symmetric algorithm like RC4

RSA is used to send the private key for the symmetric encryption

Page 48: Ch11 Basic Cryptography

RSA Used by eBay

Page 49: Ch11 Basic Cryptography

RC4 Used by eBay

Page 50: Ch11 Basic Cryptography

Elliptic Curve CryptographyAn elliptic curve is a function drawn on an X-Y

axis as a gently curved lineBy adding the values of two points on the curve,

you can arrive at a third point on the curveThe public aspect of an elliptic curve

cryptosystem is that users share an elliptic curve and one point on the curve

Not common, but may one day replace RSA

Page 51: Ch11 Basic Cryptography

Using Cryptography on Files and Disks

Page 52: Ch11 Basic Cryptography

Encrypting Files: PGP and GPG

Pretty Good Privacy (PGP)One of the most widely used asymmetric cryptography system for files and e-mail messages on Windows systems

GNU Privacy Guard (GPG)A similar open-source program

PGP and GPG use both asymmetric and symmetric cryptography

Page 53: Ch11 Basic Cryptography

Encrypting Files: Encrypting File System (EFS)

Part of WindowsUses the Windows NTFS file systemBecause EFS is tightly integrated with the

file system, file encryption and decryption are transparent to the user

EFS encrypts the data as it is written to disk

On Macs, Filevault encrypts a user's home folder

Page 54: Ch11 Basic Cryptography

Whole Disk EncryptionWindows BitLocker

A hardware-enabled data encryption featureCan encrypt the entire Windows volume

Includes Windows system files as well as all user files

Encrypts the entire system volume, including the Windows Registry and any temporary files that might hold confidential information

TrueCryptOpen-source, free, and can encrypt folders or

files

Page 55: Ch11 Basic Cryptography

Trusted Platform Module (TPM)

A chip on the motherboard of the computer that provides cryptographic services

If the computer does not support hardware-based TPM then the encryption keys for securing the data on the hard drive can be stored by BitLocker on a USB flash drive

Page 56: Ch11 Basic Cryptography

Cold Boot AttackCan defeat all currently available whole

disk encryption techniques (link Ch 11i)