• No results found

ch02.pdf

N/A
N/A
Protected

Academic year: 2020

Share "ch02.pdf"

Copied!
32
0
0

Loading.... (view fulltext now)

Full text

(1)

Computer Security:

Computer Security:

Principles and Practice

Principles and Practice

First Edition

First Edition

by William Stallings and Lawrie Brown

by William Stallings and Lawrie Brown

Lecture slides by Lawrie Brown

Lecture slides by Lawrie Brown

Chapter 2 –

(2)

Agenda

Agenda

 Lecture: Cryptography (40 min)Lecture: Cryptography (40 min)

 Symmetric EncryptionSymmetric Encryption  HashingHashing

 Asymmetric EncryptionAsymmetric Encryption

 Break (10 min)Break (10 min)

 Lab 1: Steganography (Cont. - 30 min)Lab 1: Steganography (Cont. - 30 min)

 Discussion: Security & Obscurity (10 min)Discussion: Security & Obscurity (10 min)

(3)

Cryptographic Tools

Cryptographic Tools

 cryptographic algorithms important cryptographic algorithms important element in security services

element in security services

 review various types of elementsreview various types of elements

 symmetric encryptionsymmetric encryption  secure hash functionssecure hash functions

 public key (asymmetric) encryptionpublic key (asymmetric) encryption

 digital signatures and key managementdigital signatures and key management

(4)

Symmetric Encryption

(5)

Symmetric Example

 Dear Mom, I love you. Thomas

 Mom and I have agreed to password prior to sending message

 I encrypt message using symmetric algorithm with password

 I send encrypted message to Mom

(6)

Symmetric Example (cont)

 Uncle David wants to read the message

 He must know the password

 Capture it during distribution

 He must crack the password – brute force

 He must know the algorithm well-enough to exploit its weaknesses

(7)

Attacking Symmetric

Attacking Symmetric

Encryption

Encryption

 cryptanalysiscryptanalysis

 rely on nature of the algorithm rely on nature of the algorithm

 plus some knowledge of plaintext plus some knowledge of plaintext

characteristics

characteristics

 even some sample plaintext-ciphertext pairseven some sample plaintext-ciphertext pairs  exploits characteristics of algorithm to deduce exploits characteristics of algorithm to deduce

specific plaintext or key

specific plaintext or key

 brute-force attackbrute-force attack

 try all possible keys on some ciphertext until try all possible keys on some ciphertext until

get an intelligible translation into plaintext

(8)

Exhaustive Key Search

(9)

Symmetric Encryption

Symmetric Encryption

Algorithms

(10)

DES and Triple-DES

DES and Triple-DES

 Data Encryption Standard (DES) is the Data Encryption Standard (DES) is the most widely used encryption scheme

most widely used encryption scheme

 uses 64 bit plaintext block and 56 bit key to uses 64 bit plaintext block and 56 bit key to

produce a 64 bit ciphertext block

produce a 64 bit ciphertext block

 concerns about algorithm & use of 56-bit keyconcerns about algorithm & use of 56-bit key

Triple-DESTriple-DES

 repeats basic DES algorithm three timesrepeats basic DES algorithm three times  using either two or three unique keysusing either two or three unique keys

(11)

Advanced Encryption

Advanced Encryption

Standard (AES)

Standard (AES)

 needed a better replacement for DESneeded a better replacement for DES

 NIST called for proposals in 1997NIST called for proposals in 1997  selected Rijndael in Nov 2001selected Rijndael in Nov 2001

 published as FIPS 197published as FIPS 197  symmetric block ciphersymmetric block cipher

(12)

Block

Block

verses

verses

Stream

Stream

Ciphers

(13)

Message Authentication

Message Authentication

 protects against active attacksprotects against active attacks

 verifies received message is authenticverifies received message is authentic

 contents unalteredcontents unaltered

 from authentic sourcefrom authentic source

 timely and in correct sequencetimely and in correct sequence

 can use conventional encryptioncan use conventional encryption

 only sender & receiver have key neededonly sender & receiver have key needed

 or separate authentication mechanismsor separate authentication mechanisms

(14)

Message Authentication Codes

(15)

Secure Hash Functions

(16)

Message

Message

Auth

(17)

Hashing Example

 Last example assumed I cared about confidentiality most

 I really care about integrity the most

 I write my message to Mom

 I generate a hash value of the message

 I send Mom my message unencrypted with the hash value of the message

(18)

Hashing Example (cont)

 Uncle David decides to intercept message

 He changes message to

 Dear Mom, I hate you. Thomas

 I ask Mom to calculate the hash of the message she received

(19)

Hash Function Requirements

Hash Function Requirements

 applied to any size data

 H produces a fixed-length output.

H(x) is relatively easy to compute for any given xone-way property

 computationally infeasible to find x such that H(x) = h

 weak collision resistance

 computationally infeasible to find yx such that

H(y) = H(x)

strong collision resistance

 computationally infeasible to find any pair (x, y) such

(20)

Hash Functions

Hash Functions

 two attack approachestwo attack approaches

 cryptanalysiscryptanalysis

• exploit logical weakness in algorithmexploit logical weakness in algorithm

 brute-force attackbrute-force attack

• trial many inputstrial many inputs

strength proportional to size of hash code (strength proportional to size of hash code (22nn/2/2))

 SHA most widely used hash algorithmSHA most widely used hash algorithm

 SHA-1 gives 160-bit hashSHA-1 gives 160-bit hash

 more recent SHA-256, SHA-384, SHA-512 more recent SHA-256, SHA-384, SHA-512

provide improved size and security

(21)

Public Key Encryption

(22)

Public Key Authentication

(23)

Public Key Example

 Mom and I both generate key pairs

 I use my private key to generate a

message digest (signature) of message  I encrypt the message and signature with

Mom's public key

 Mom decrypts the message using her private key

(24)

Public Key Requirements

Public Key Requirements

1.

1. computationally easy to create key pairscomputationally easy to create key pairs

2.

2. computationally easy for sender knowing public computationally easy for sender knowing public

key to encrypt messages key to encrypt messages

3.

3. computationally easy for receiver knowing private computationally easy for receiver knowing private

key to decrypt ciphertext key to decrypt ciphertext

4.

4. computationally infeasible for opponent to computationally infeasible for opponent to

determine private key from public key determine private key from public key

5.

5. computationally infeasible for opponent to computationally infeasible for opponent to

otherwise recover original message otherwise recover original message

6.

(25)

Public Key Algorithms

Public Key Algorithms

 RSA (Rivest, Shamir, Adleman)RSA (Rivest, Shamir, Adleman)

 developed in 1977developed in 1977

 only widely accepted public-key encryption algonly widely accepted public-key encryption alg  given tech advances need 1024+ bit keysgiven tech advances need 1024+ bit keys

Diffie-Hellman key exchange algorithmDiffie-Hellman key exchange algorithm

 only allows exchange of a secret keyonly allows exchange of a secret key

 Digital Signature Standard (DSS)Digital Signature Standard (DSS)

 provides only a digital signature function with SHA-1provides only a digital signature function with SHA-1

Elliptic curve cryptography (ECC)Elliptic curve cryptography (ECC)

(26)

Public Key Certificates

(27)
(28)

Digital

Digital

Envelopes

(29)

Random Numbers

Random Numbers

 random numbers have a range of usesrandom numbers have a range of uses

 requirements:requirements:randomnessrandomness

 based on statistical tests for uniform distribution based on statistical tests for uniform distribution

and independence and independence

unpredictabilityunpredictability

(30)

Pseudorandom verses

Pseudorandom verses

Random Numbers

Random Numbers

 often use algorithmic technique to create often use algorithmic technique to create pseudorandom numbers

pseudorandom numbers

 which satisfy statistical randomness testswhich satisfy statistical randomness tests  but likely to be predictablebut likely to be predictable

 true random number generators use a true random number generators use a nondeterministic source

nondeterministic source

(31)

Practical Application:

Practical Application:

Encryption of Stored Data

Encryption of Stored Data

 common to encrypt transmitted datacommon to encrypt transmitted data

 much less common for stored datamuch less common for stored data

 which can be copied, backed up, recoveredwhich can be copied, backed up, recovered

 approaches to encrypt stored data:approaches to encrypt stored data:

 back-end applianceback-end appliance

 library based tape encryptionlibrary based tape encryption

(32)

Summary

Summary

 introduced cryptographic algorithmsintroduced cryptographic algorithms

 symmetric encryption algorithms for symmetric encryption algorithms for confidentiality

confidentiality

 message authentication & hash functionsmessage authentication & hash functions  public-key encryptionpublic-key encryption

References

Related documents