102
Cryptography

Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

Embed Size (px)

Citation preview

Page 1: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

Cryptography

Page 2: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

2

Domain Objectives

• Basic Cryptographic Concepts

• Cryptographic Algorithms and Uses

• Message Integrity Codes

• Digital Signatures

• Certification

• Cryptanalysis

Page 3: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

3

Information Security TRIAD

Availability

ConfidentialityIntegrity

Information Security

Page 4: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

4

Domain Agenda

• Introduction

• Cryptography

• Introduction to Cryptography• Symmetric Key Cryptography• Asymmetric Key Cryptography• Message Integrity Controls• Key Management• Uses of Cryptography• Legal Issues

• Cryptanalysis

• Information Hiding Techniques

Page 5: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

5

Historical Development of Cryptography

• Cryptographic Techniques

• Manual

• Mechanical

• Electro-mechanical

• Electronic

• Quantum Cryptography

Page 6: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

6

Basic Goals of Cryptography

• Ensure confidentiality of sensitive information

• Ensure integrity of information

• Verify the authenticity of communications

• Provide measures to support non-repudiation

• Provide foundation for secure access control

• Make compromise too expensive or too time-consuming

Page 7: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

7

Domain Agenda

• Introduction

• Cryptography

• Introduction to Cryptography• Symmetric Key Cryptography• Asymmetric Key Cryptography• Message Integrity Controls• Key Management• Uses of Cryptography• Legal Issues

• Cryptanalysis

• Information Hiding Techniques

Page 8: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

8

Key Concepts and Definitions

• Cryptography

• Cryptanalysis

• Cryptology

Page 9: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

9

Key Concepts and Definitions

• Plaintext/Cleartext

• Ciphertext/Cryptogram

• Encipher/Encrypt/Encode

• Decipher/Decrypt/Decode

Page 10: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

10

Key Concepts and Definitions

• Cryptographic Algorithm

• Cryptosystem

• Cryptovariable (Key)

• Key Space

Page 11: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

11

Key Concepts and Definitions

Page 12: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

12

Basic Cryptosystems

• Codes

• Simple Substitution Ciphers

• Simple Transposition Ciphers

• Polyalphabetic Ciphers

• Running Key Ciphers

• One-Time Pads

Page 13: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

13

Codes

• Encoding words and phrases

• For simplifying transmission of basic secrecy and integrity

• Colored Flags for Navy Ships (Telegraphy)

• Morse Code

Page 14: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

14

Simple Transposition Ciphers

T H I S I

S A N E X

A M P L E

O F T R A

N S P O S

I T I O N

• Disguising a message by rearranging the letters or bits in the message

• Plaintext “This is an example of transposition”

• Cipher “tsaoni hamfst inptpi selroo ixeasn”

• Multiple ways to produce ciphertext

Page 15: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

15

Simple Substitution Ciphers

• Based on the substitution of one value for another

• Shift Alphabet (move letters 3 spaces) A B C D E F ..... FACE D E F G H I ..... IDFH

• Scramble Alphabet (substitute one letter for another) A B C D E F ..... FACE Q E Y R T M ..... MQYT

Page 16: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

16

Polyalphabetic Ciphers

• Substitution cipher using multiple alphabets

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

1 Z A B C D E F G H I J K L M N O P Q R S T U V W X Y

2 Y Z A B C D E F G H I J K L M N O P Q R S T U V W X

3 X W Z A B C D E F G H I J K L M N O P Q R S T U V W

4 W X Y Z A B C D E F G H I J K L M N O P Q R S T U V

Encrypt the plaintext word ‘FEEDBACK’ using a key of 3241.

Page 17: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

17

This

Onan

19

Running Key Ciphers

• Encryption through use of the numerical value of letters in the plaintext and a shared book

• Key: ‘On a non interfering basis over …’

• Message: ‘This material is enciphered’

Message:

Key:

14

33

- 26 = 7

Cipher Text

huif anbrkmrq mj

Page 18: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

18

One-Time Pads (OTP)

• Originator and receiver have same pad of key values

• Each key is used once only and then discarded

• Only unbreakable algorithm

Page 19: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

19

Making Secure Cryptographic Algorithms

• Simple cryptosystems are not very secure

• Discernible • Redundancies and statistical patterns in

natural language

• Claude Shannon identified two key characteristics

• Confusion• Diffusion

Page 20: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

20

Basic Transformation Techniques

• Substitution

• Transposition or Permutation

• Compression

• Expansion

• Padding

• Key Mixing

• Initialization Vectors (IV)

• Exclusive-Or (XOR)

Page 21: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

21

Domain Agenda

• Introduction

• Cryptography

• Introduction to Cryptography• Symmetric Key Cryptography• Asymmetric Key Cryptography• Message Integrity Controls• Key Management• Uses of Cryptography• Legal Issues

• Cryptanalysis

• Information Hiding Techniques

Page 22: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

22

Symmetric Key Cryptography

• Single Shared Key

• Many Algorithms

• Two Main Classes

• Stream Ciphers

• Block Ciphers

Page 23: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

23

Basic Symmetric Key Cipher Operation

Message MessageE DCTM CTM

Sender/Originator Receiver

Key Key

Plaintext Cryptosystem

CiphertextEncrypt Decrypt

Cryptovariable

Page 24: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

24

Stream Ciphers

• Keystream

• Statistically Unpredictable and Unbiased

• Operates on individual bits

Page 25: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

25

Stream Cipher Operation

Page 26: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

26

Block Ciphers

• Fixed-sized Blocks

• Plaintext XOR’ed with Cipher Blocks

• Sensitive to Small Changes/Errors

Page 27: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

27

Block Cipher Operation

Page 28: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

28

Data Encryption Standard (DES)

• Designed by IBM

• Optimized by US National Security Agency (NSA)

• 64-bit block size

• 56-bit true key plus 8 parity bits

• 16 rounds

Page 29: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

29

Modes of DES

• Block Modes

• Electronic Code Book (ECB)

• Cipher Block Chaining (CBC)

• Stream Modes

• Cipher Feed Back (CFB)

• Output Feed Back (OFB)

• Counter (CTR)

Page 30: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

30

Electronic Code Book (ECB)

• Each block of plaintext is encrypted independently using the same key

Plaintext Block 1

CiphertextBlock 1

Plaintext Block 2

CiphertextBlock 2

Plaintext Block 3

CiphertextBlock 3

Plaintext Block 4

CiphertextBlock 4

Page 31: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

31

Cipher Block Chaining (CBC)

• First block of plaintext is XOR’ed with an Initialization Vector

• Next plaintext block, the cipher text result of the previous operation is used in place of the IV

IVPTB1 PTB2 PTB3 PTB4

CTB1 CTB2 CTB3 CTB4

= XOR

Page 32: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

32

Cipher Feed Back (CFB)

• Similar to CBC except that IV is encrypted and then the result is XOR’ed with the first plaintext block

• For the next plaintext block, the cipher text result of the previous operation is used in place of the IV

IV PTB1 PTB2 PTB3 PTB4

CTB1 CTB2 CTB3 CTB4

Page 33: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

33

Output Feed Back (OFB)

• Operates very much like CFB

• Except that only the RESULT of the first step (encrypting the IV) is fed back into the next operation

IV

PTB1

CTB1

PTB2

CTB2

1

1

2

2

3PTB3

CTB3

3

4PTB4

CTB4

Page 34: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

34

Counter (CTR)

• Operates very much like OFB

• Except that a counter value is used instead of an IV

CTR

PTB1

CTB1

PTB2

CTB2

PTB3

CTB3

PTB4

CTB4

CTR+1 CTR+2 CTR+3

Page 35: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

35

Summary of Block Cipher Modes

Mode

Block / Strea

m Mode

Long / Short

Messages

Serial / Parallel operatio

n possible

Effect of an error

Work that can be done

in advance

ECB Block ShortFully

parallelContain

edKeys

CBC Block LongFully serial

Contained

Keys and IV

CFBStrea

mLong

Fully serial

Contained

Keys and IV

OFBStrea

m

Long, but errors are a

problem

Partially serial and

parallel

Cascades

Most encrypti

on

CTRStrea

mLong

Fully parallel

Contained

Most encrypti

on

Page 36: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

36

DES

• Double DES (DDES)

• Triple DES (TDES)

• DES-EEE3 or 3TDES-EEE

• DES-EDE3 or 3TDES-EDE

• DES-EEE2 (2TDES-EEE), DES-EDE2 (2TDES-EDE)

Page 37: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

37

International Data Encryption Algorithm (IDEA)

• Published in 1991 as a replacement for DES

• Highly optimized for general-purpose computers

• 64-bit input and output block size

• 128-bit key (no parity bits)

• Basic operation is 8 rounds

Page 38: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

38

AES (Rijndael)

• Rijndael algorithm originally published in 1998

• Block size

• Variable number of rounds

Page 39: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

39

Other Examples of Block Ciphers

• RC5

• RC6

• Blowfish

• Twofish

• CAST

• SAFER

• Serpent

Page 40: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

40

Strengths of Symmetric Key Cryptography

• Very fast

• Very difficult to break cipher text

• Algorithms and tools are freely available

• Stream ciphers are highly efficient

• Block ciphers offer multiple modes

Page 41: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

41

Weaknesses of Symmetric Key Cryptography

• Key Negotiation / Exchange / Distribution

• Poor Scalability

• Limited Security

Page 42: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

42

Domain Agenda

• Introduction

• Cryptography

• Introduction to Cryptography• Symmetric Key Cryptography• Asymmetric Key Cryptography• Message Integrity Controls• Key Management• Uses of Cryptography• Legal Issues

• Cryptanalysis

• Information Hiding Techniques

Page 43: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

43

Asymmetric Key Cryptography

• Also known as public key cryptography

• Uses a pair of mathematically-related keys

• Private Key

• Public Key

• Introduced by Diffie and Hellman in 1976

Page 44: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

44

Public Key Algorithms

Message MessageE DCTM CTM

Key Key

Encrypt Decrypt

Originator Receiver

Public Key of Receiver Private Key of Receiver

Confidentiality

Page 45: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

45

Public Key Algorithms

Message MessageE DCTM CTM

Key Key

Encrypt Decrypt

Originator Receiver

Private Key of Originator Public Key of Originator

Proof of Origin

Page 46: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

46

Message E ECTM1CTM2

Originator’s Private

Key

Originator’s Perspective

Confidentiality and Proof of Origin

Receiver’s Public

KeyTo

Receiver

Public Key Algorithms

Page 47: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

47

Public Key Algorithms

MessageD DCTM1CTM2

Originator’s Public

Key

Receiver’s Perspective

Confidentiality and Proof of Origin

Receiver’s Private

KeyFrom Originator

Page 48: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

48

Hard Problems

• Factoring the product of two large prime integers

• Discrete logarithms in a finite field

Page 49: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

49

Rivest-Shamir-Adleman (RSA) Algorithm

• Public-key cryptosystem that offers encryption, key distribution for symmetric keys and digital signature services

• Developed by Ron Rivest, Adi Shamir and Leonard Adleman in 1977

• Adjustable Keysize

Page 50: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

50

Other Asymmetric Key Cryptographic Algorithms• Diffie-Hellman Key Exchange Protocol

• ElGamal

• Elliptic Curve Cryptography (ECC)

• Merkle-Hellman Knapsack

• Chor-Rivest Knapsack

Page 51: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

51

Asymmetric Key Cryptography

• Strengths

• Confidentiality/Privacy • Access Control • Authentication • Integrity • Non-repudiation

• Weaknesses

• Computationally Intensive• Slow (1000 or more times

slower than symmetric)

Page 52: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

52

Domain Agenda

• Introduction

• Cryptography

• Introduction to Cryptography• Symmetric Key Cryptography• Asymmetric Key Cryptography• Message Integrity Controls• Key Management• Uses of Cryptography• Legal Issues

• Cryptanalysis

• Information Hiding Techniques

Page 53: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

53

Message Integrity Controls

• Allows for the detection of alterations

• Special values are added to the message

• Special branch of cryptography has been developed to create one-way functions

Page 54: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

54

Message Integrity Controls

Page 55: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

55

Hash Functions

• List of Hash Algorithms

• Division-remainder Method

• Folding

• Radix Transformation

• Digit Rearrangement

• Advantages of Cryptographic Hash Algorithms

• Reduce collision

• Increase sensitivity to changes

Page 56: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

56

Hash Functions Characteristics

• Result in a ‘condensed representation’ of the original message

• Should be a one-way function

• Non-linear relationship between hashes

• Should resist birthday attacks

• Should derive the hash using the whole, original message

Page 57: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

57

Common Hash Functions

• MD2/MD4/MD5

• Secure Hash Algorithm (SHA)

Page 58: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

58

Operation of Hash Functions

Message

H

Digest

Message MessageMessage

Digest

H

Digest

Originator Receiver

verified

DigestDigest

Page 59: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

59

Keyed Hashes

• Intended to provide greater ability to prove that message has not been altered

• Combines non-keyed hash function with symmetric key cryptography

• Examples

• Key-Hashed Message Authentication Code (HMAC)

• CBC-MAC

Page 60: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

60

Operation of Keyed Hashes (HMAC)

Message

H

Digest

Message MessageMessage

KeyedHash

Digest

KeyedHash

HDE

Digest

Originator Receiver

verified

SharedKey

Page 61: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

61

Digital Signatures

• Provides sender authenticity checking and non-repudiation using asymmetric key cryptography

• Sender’s private key is used to “encrypt” the hash

• Recipient uses sender’s public key to check the signature and verifies the hash

Page 62: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

62

Operation of Digital Signatures

Message

H

Digest

Message MessageMessage

DigitalSignature

Digest

DigitalSignature

HDE

Digest

Originator Receiver

Originator’sPrivate Key

Originator’sPublic Key

verified

Page 63: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

63

Domain Agenda

• Introduction

• Cryptography

• Introduction to Cryptography• Symmetric Key Cryptography• Asymmetric Key Cryptography• Message Integrity Controls• Key Management• Uses of Cryptography• Legal Issues

• Cryptanalysis

• Information Hiding Techniques

Page 64: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

64

Functions of Key Management

• Key Creation and Derivation

• Key Distribution and Update

• Verification of Trustworthiness of Keys

• Proper Storage and Destruction of Keys

• Trusted Hardware

• Recovery or Revocation of Lost Keys

• Key Escrow and Multi-party Control of Keys

• Determination of Appropriate Key Sizes

• Based on required strength

Page 65: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

65

Key Derivation Functions (KDFs)

• Cryptographic hash functions that use a secret or known value to generate symmetric keys

• Combines three different values to generate keys

• Iterations - The number of times the function will be run to generate keys

Page 66: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

66

Key Agreement Schemes

• Diffie-Hellman

• Unified Diffie-Hellman

• MQV (Menezes-Qu-Vanstone)

Page 67: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

67

Diffie-Hellman Key Agreement Operation

Page 68: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

68

Diffie-Hellman Key Agreement Operation

Page 69: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

69

Trust and Trust Models

• Trustworthiness of keys can be difficult

• Two main trust models

• Certification establishes trustworthiness

Page 70: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

70

Public Key Infrastructure

• Binds a person/entity to their public keys

• Binding is done through certification

• Certified public keys are published as digital certificates

• Cross-Certification

Page 71: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

71

Certification Authority

• Manages certificate

• Acts as a trusted third party

• Offer various classes of digital certificates

Page 72: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

72

Contents of an X509v3 Digital Certificate

Page 73: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

73

Domain Agenda

• Introduction

• Cryptography

• Introduction to Cryptography• Symmetric Key Cryptography• Asymmetric Key Cryptography• Message Integrity Controls• Key Management• Uses of Cryptography• Legal Issues

• Cryptanalysis

• Information Hiding Techniques

Page 74: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

74

Uses of Cryptosystems

• Common Goals

• Used for secure

• Data Storage

• Email

• Network Protocols

Page 75: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

75

Hybrid Systems

• Maximizes strengths

• Symmetric Key Cryptography

• Asymmetric Key Cryptography

• Message Integrity Controls

Page 76: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

76

Simple Hybrid System Operation

Message MessageE DCTM CTM

Originator Receiver

Symmetric Key Symmetric Key

E DCTk CTkReceiver’s

Public Key

Receiver’s Private Key

Page 77: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

77

Example of a Complex Hybrid System

EE

EE

DD

DD

Originator

Receiver

EEOriginator’s Private Key

DD Originator’s Public Key

Symmetric

Key

Symmetric Key

HH HH

DD EEDigest

Digest

Digest

Digest

Digest

Receiver’s Public Key

Receiver’s Private Key

Digital Signature

Message

Message

Receiver’s Public KeyReceiver’s Private Key

CT(k)CT(k)

Page 78: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

78

Common Secure Email Protocols

• Message Security Protocol (MSP)

• Privacy Enhanced Mail (PEM)

• MIME Object Security Services (MOSS)

• Pretty Good Privacy (PGP)

• Secure Multipurpose Internet Mail Extensions (S/MIME)

Page 79: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

79

Secure Network Protocols

• Examples of Secure Network Protocols and Implementations

• Secure HTTP (S-HTTP)

• Secure Shell (SSH)

• Secure Socket Layer (SSL)

• Transport Layer Security (TLS)

• IPSec

• WiFi Protected Access (WPA)

• 802.11i Wireless LAN (WPA2)

Page 80: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

80

Domain Agenda

• Introduction

• Cryptography

• Introduction to Cryptography• Symmetric Key Cryptography• Asymmetric Key Cryptography• Message Integrity Controls• Key Management• Uses of Cryptography• Legal Issues

• Cryptanalysis

• Information Hiding Techniques

Page 81: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

81

National Policies and Controls

• Controls can be put into three rough categories

• Export Controls

• Import Controls

• Domestic-Use Controls

• National policies are extremely varied

Page 82: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

82

International Policies and Controls

• Wassenaar Arrangement

• Council of Europe Convention on Cybercrime (2001)

• European Union

Page 83: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

83

Domain Agenda

• Introduction

• Cryptography

• Introduction to Cryptography• Symmetric Key Cryptography• Asymmetric Key Cryptography• Message Integrity Controls• Key Management• Uses of Cryptography• Legal Issues

• Cryptanalysis

• Information Hiding Techniques

Page 84: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

84

Strength of Algorithms and Cryptosystems

• Dependent on a number of factors

• Key Space

• Related to bit-size of the key

• Algebraic strength of the algorithm itself

• Correct Implementation

Page 85: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

85

Common Weaknesses

• Insufficient Key Space

• Poor Key Management

• Malleability

• Poor Diffusion or Confusion

• Poor Random Number Generation

• Key Clustering

Page 86: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

86

Selection of a Strong Cryptographic Solution

• Use evaluated solutions

• High Work Factor

• Publicly-evaluated Cryptographic Algorithms

Page 87: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

87

Cryptanalysis

• Art and Science of Breaking Codes

• Techniques

• Attacking the Key

• Attacking the Algorithm

• Attacking the Implementation

• Attacking the Data (ciphertext or plaintext)

• Attacking the People - Social Engineering

Page 88: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

88

Common Cryptanalytic Techniques

• Brute-force Attack

• Plaintext Attacks

• Ciphertext Attacks

• Man-in-the-Middle Attack

• Meet-in-the-Middle Attack and other Analytic Attacks

• Side Channel Attacks

Page 89: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

89

Brute Force Attack

• Trying all possible combinations

• Two factors: Cost and Time

• Moore’s Law

• Measured in MIPS per year

Page 90: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

90

Time of Brute Force

Page 91: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

91

Attacks

• Plaintext

• Known-Plaintext Attack

• Chosen Plaintext Attacks

• Adaptive Chosen Plaintext Attacks

• Ciphertext

• Ciphertext-Only Attack

• Chosen Ciphertext Attack

• Adaptive Chosen Ciphertext Attack

Page 92: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

92

Other Common Attacks

• Meet-in-the-Middle Attacks and other Analysis Attacks

• Slide Attacks

• Man-in-the-Middle Attacks

• Side Channel Attacks (Timing and Power Attacks)

Page 93: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

93

Attacks Against Ciphers

• Stream

• Frequency Analysis and other Statistical Attacks

• IV or Keystream Analysis

• Block

• Linear Cryptanalysis• Differential Cryptanalysis• Linear-Differential Cryptanalysis• Algebraic Attacks• Frequency Analysis

Page 94: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

94

Attacks Against Hash Functions

• Dictionary Attacks

• Birthday Attacks

Page 95: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

95

Non-Technical Attacks

• Social Engineering

• Persuasion

• Coercion (Rubber-Hose Cryptanalysis)

• Bribery (Purchase-Key Attack)

• Theft

Page 96: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

96

Domain Agenda

• Introduction

• Cryptography

• Introduction to Cryptography• Symmetric Key Cryptography• Asymmetric Key Cryptography• Message Integrity Controls• Key Management• Uses of Cryptography• Legal Issues

• Cryptanalysis

• Information Hiding Techniques

Page 97: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

97

Steganography

• Art of hiding information

• Plaintext hidden/disguised

• Prevent a third party from knowing that a secret message exists

• Traditionally accomplished in a number of ways

• Physical Techniques

• Null Ciphers

Page 98: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

98

Modern Steganography

• Extends traditional techniques

• Use of least significant bits

• A slight change to the values does not have a visible effect on the contents

Page 99: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

99

Modern Steganography

• RGB values have been altered to contain a secret message

• File sizes are identical, change can be detected through the use of a common Message Integrity Control (MD5)

E1089197693F6C4C26E0033F8C8AF00C 57694B77DCB55C543C6C0BA8E1FF2D17

Page 100: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

100

Digital Watermarking/Rights Management

• Digital Watermarking

• Digital Rights Management (DRM)

Page 101: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

101

Domain Summary

• Cryptographic Concepts and Algorithms

• Message Integrity Codes

• Digital Signatures and Certification

• Cryptanalysis

Page 102: Cryptography. 2 Domain Objectives Basic Cryptographic Concepts Cryptographic Algorithms and Uses Message Integrity Codes Digital Signatures Certification

“Security Transcends

Technology”