Slide #1.

Computer Security: Principles and Practice W Stallings, L Brown Some slides by Dr Lincke Chapter 2 Encryption
More slides like this


Slide #2.

Encryption Text:  Computer Security: Principles and Practice, W Stallings, L Brown  Chapter 2 Objectives: The student should be able to:         Define authentication, integrity, confidentiality and non-repudiation. Define plaintext, ciphertext, key, P-box, S-box, session key, digital signature, message digest, hash. Demonstrate operation of a simple substitution cipher, permutation cipher, stream cipher, block cipher, block chaining mode cipher. Describe why chaining is advantageous in block ciphers. Define symmetric versus asymmetric encryption algorithms and describe the differences between the two. Define the advantages of secret key and public key algorithms. Describe their functions in relation to authenticity, non-repudiation, integrity, confidentiality, and speed. Describe two methods of producing a hash. Define whether the following protocols support authentication, non-repudiation, integrity, and/or confidentiality via hashing or a type of encryption: AES, HMAC, DES, MD5, RCS, RSA.
More slides like this


Slide #3.

Security is composed of: Secrecy – Access Control Accuracy - Incorruptibility Reliability - Survivability
More slides like this


Slide #4.

Cryptographic Tools  cryptographic algorithms important element in security services  review various types of elements     symmetric encryption public-key (asymmetric) encryption digital signatures and key management secure hash functions  example is use to encrypt stored data
More slides like this


Slide #5.

Data Privacy     Confidentiality: Unauthorized parties cannot access information (->Secret Key Encryption Authenticity: Ensuring that the actual sender is the claimed sender. (->Public Key Encryption) Integrity: Ensuring that the message was not modified in transmission. (->Hashing) Nonrepudiation: Ensuring that sender cannot deny sending a message at a later time. (->Digital Signature) Bill Confidentiality Joe Bill Authenticity Joe (Actually Bill) Ann Integrity Joe Bill Ann Non-Repudiation Joe Ann Ann
More slides like this


Slide #6.

We share a secret SECRET KEY ENCRYPTION SYMMETRIC ENCRYPTION
More slides like this


Slide #7.

Encryption – Secret Key plaintext Encrypt Ksecret ciphertext Decrypt Ksecret P = D(Ksecret, E(Ksecret,P)) plaintext
More slides like this


Slide #8.

Symmetric Encryption
More slides like this


Slide #9.

Encryption Stages Substitution Gsv hrav lu gsv vmxrksvivw gvcg hslfow yv m l ozitvi gszm gs v gvcg lu gsv lirtr m z o n v h h z t v. Permutation M Y K E Y T H E C A S H I S S T O R E D I N A C C O U N T 1 2 5 9 6 N A M E A L CSECT6A EIRAN9E TSTIO2A HHONU5M ASDC1NL
More slides like this


Slide #10.

Block Cipher Example Plaintext: 1 111 000 0 Substitute 1010 S-Box 0101 S-Box Transform Or P-Box Substitute Ciphertext: 1100 S-Box 0011 S-Box Replace key X-OR Truth Table 0x0=0 0x1=1 1x0=1 1x1=0
More slides like this


Slide #11.

Electronic Codebook (ECB)  simplest mode  split plaintext into blocks  encrypt each block using the same key  “codebook” because have unique ciphertext value for each plaintext block  not secure for long messages since repeated plaintext is seen in repeated ciphertext
More slides like this


Slide #12.

Block Cipher Structure  have a general iterative block cipher structure    with a sequence of rounds with substitutions / permutations controlled by key parameters and design features:       block size key size number of rounds subkey generation algorithm round function complexity also: fast software en/decrypt, ease of analysis
More slides like this


Slide #13.

Cipher Block Chaining (CBC)
More slides like this


Slide #14.

Block Chaining Mode: Implementing Diffusion Plaintext: 1 111 000 0 Substitute 1010 S-Box 0101 S-Box Transform Substitute 1100 S-Box 0011 S-Box Ciphertext: 1 011 0 111 Replace key: 1011.0111 X-OR Truth Table 0x0=0 0x1=1 1x0=1 1x1=0 To decrypt one segment requires decrypting > 1 section
More slides like this


Slide #15.

Feistel Encryption: Implementing Confusion Plaintext: 1 111 000 0 Substitute 1010 S-Box 0101 S-Box Substitute 0101 S-Box Ciphertext: 0 000 Key X-OR Truth Table 0x0=0 0x1=1 1x0=1 1x1=0 0 101 A change in one bit affects multiple bits
More slides like this


Slide #16.

Symmetric Encryption Algorithms
More slides like this


Slide #17.

Commercial Block Ciphers Key Size #Functions Block Size DES 64 bits (w. 8 bit parity) 16 64-bit 1999: Distributed net cracked DES key in 22 hours Triple DES 3DES 2 x 64 or 3 x 64 48 64-bit E.g.: DES-EEE3, DES-EDE2 Compared to DES: - 256 times stronger - 3 times more time-consuming IDEA 128 8 64-bit Uses: PGP encryption 16 64-bit Thought to be more reliable than AES (2001) 32-, 64- or 128-bit Patented by RSA Data Security. Blowfish to 448 bits RCS to 2048 bits Variable AES 128*, 192, 256 Variable:1 0* 12, 14 Comments 128-bit* or Uses: HTTPS variable Current govt. standard for sensitive but unclassified info.
More slides like this


Slide #18.

DES and Triple-DES  Data Encryption Standard (DES) is the most widely used encryption scheme    uses 64 bit plaintext block and 56 bit key to produce a 64 bit ciphertext block concerns about algorithm & use of 56-bit key Triple-DES    repeats basic DES algorithm three times using either two or three unique keys much more secure but also much slower
More slides like this


Slide #19.

Triple DES (3DES)  first used in financial applications  in DES FIPS PUB 46-3 standard of 1999  uses three keys & three DES executions: C = E(K3, D(K2, E(K1, P)))  decryption same with keys reversed  use of decryption in second stage gives compatibility with original DES users  effective 168-bit key length, slow, secure  AES will eventually replace 3DES
More slides like this


Slide #20.

Advanced Encryption Standard (AES)  needed a better replacement for DES  NIST called for proposals in 1997  selected Rijndael in Nov 2001  published as FIPS 197  symmetric block cipher  uses 128 bit data & 128/192/256 bit keys  now widely available commercially
More slides like this


Slide #21.

Advanced Encryption Standard (AES)
More slides like this


Slide #22.

Stream Cipher Input: Random: Ciphertext: Random: Plaintext: 1 1 0 1 1 1 0 1 0 1 1 0 1 0 1 1 1 0 1 1 0 0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0 1 0 1 0 1 1 1 0 1 1 1 1 0 1 1 Example System: RC4 (SSL/TLS, WEP, WPA)
More slides like this


Slide #23.

Block verses Stream Ciphers
More slides like this


Slide #24.

Stream Ciphers   processes input elements continuously key input to a pseudorandom bit generator      produces stream of random like numbers unpredictable without knowing input key XOR keystream output with plaintext bytes are faster and use far less code design considerations:    encryption sequence should have a large period keystream approximates random number properties uses a sufficiently long key
More slides like this


Slide #25.

Attacking Symmetric Encryption  cryptanalysis     rely on nature of the algorithm plus some knowledge of plaintext characteristics even some sample plaintext-ciphertext pairs exploits characteristics of algorithm to deduce specific plaintext or key  brute-force attack  try all possible keys on some ciphertext until get an intelligible translation into plaintext
More slides like this


Slide #26.

Exhaustive Key Search
More slides like this


Slide #27.

You may know my Public Key PUBLIC KEY ENCRYPTION ASYMMETRIC ENCRYPTION
More slides like this


Slide #28.

Public Key Encryption P = D(kPRIV, E(kPUB,P)) Encryption Joe Encrypt (public) Decrypt (private) Key owner Message, private key Authentication, Non-repudiation Joe Decrypt (public) Digital Signature Encrypt (private) P = D(kPUB, E(kPRIV,P)) Key owner
More slides like this


Slide #29.

Public Key Encryption
More slides like this


Slide #30.

Public Key Authentication
More slides like this


Slide #31.

Public Key Requirements 1. 2. 3. 4. 5. 6. computationally easy to create key pairs computationally easy for sender knowing public key to encrypt messages computationally easy for receiver knowing private key to decrypt ciphertext computationally infeasible for opponent to determine private key from public key computationally infeasible for opponent to otherwise recover original message useful if either key can be used for each role
More slides like this


Slide #32.

Public Key Algorithms  RSA (Rivest, Shamir, Adleman)     Diffie-Hellman key exchange algorithm   only allows exchange of a secret key Digital Signature Standard (DSS)   developed in 1977 only widely accepted public-key encryption alg given tech advances need 1024+ bit keys provides only a digital signature function with SHA-1 Elliptic curve cryptography (ECC)  new, security like RSA, but with much smaller keys
More slides like this


Slide #33.

Encryption Comparison Secret Key: Block Ciphers Secret Key: Stream Cipher Public Key Medium Processing Light Processing, Short code Intensive Processing Shared key Shared key Unshared key Block encryption improved with chained key Requires good pseudorandom # generator Keys pairs are related via complex math Uses: Confidentiality: Session Encryption Uses: Confidentiality: Session Encryption Uses: Short encryption, Authentication, Nonrepudiation Files, database, large blocks of data Data communications: streams Key management, Digital signature
More slides like this


Slide #34.

Verify the data was not modified SECURE HASH FUNCTIONS
More slides like this


Slide #35.

Documents with Integrity     Questions Can fraud occur if changes are made? Was this document modified? How can I be sure you sent it? Is encryption necessary? Data Applications Integrity Contracts Financial data Non-Repudiation Digital Signature Contracts Check Sum
More slides like this


Slide #36.

Message Authentication  protects against active attacks  verifies received message is authentic    contents unaltered from authentic source timely and in correct sequence  may use conventional encryption  only sender & receiver have key needed  or separate authentication mechanisms  append authentication tag to cleartext message
More slides like this


Slide #37.

Secure Hash Functions
More slides like this


Slide #38.

Simple Hash Functions  a one-way or secure hash function used in message authentication, digital signatures  all hash functions process input a block at a time in an iterative fashion  one of simplest hash functions is the bitby-bit exclusive-OR (XOR) of each block    Ci = bi1  bi2  . . . bim effective data integrity check on random data less effective on more predictable data virtually useless for data security
More slides like this


Slide #39.

Message Authentication Codes
More slides like this


Slide #40.

Secure Hash Functions Message Message H Message H H Compare K H H Message Authentication Code Message H Message H K K Message K H Message H E H K One Way Hash Message H H D K Message H H Compare H H Compare H H H
More slides like this


Slide #41.

Public Key Certificates
More slides like this


Slide #42.

SHA-512 Structure
More slides like this


Slide #43.

Secure Hash Functions SHA-512    Message Digest 5 (MD5) ->128 bit hash for 512-bit blocks Secure Hash Function (SHA) -> SHA-256, SHA384, SHA-512-> 512 bit hash for1024 bit blocks Hashed Message Auth. Code (HMAC): System treats hash function as black box. Msg IV Round 0 Round 1 Round 79 Round 80 Hash Rand Const
More slides like this


Slide #44.

Hash Function Requirements     applied to any size data H produces a fixed-length output. H(x) is relatively easy to compute for any given x one-way property   weak collision resistance   computationally infeasible to find x such that H(x) = h computationally infeasible to find y ≠ x such that H(y) = H(x) strong collision resistance  computationally infeasible to find any pair (x, y) such that H(x) = H(y)
More slides like this


Slide #45.

Hash Functions  two attack approaches  cryptanalysis • exploit logical weakness in algorithm  brute-force attack • trial many inputs • strength proportional to size of hash code (2n/2)  SHA most widely used hash algorithm   SHA-1 gives 160-bit hash more recent SHA-256, SHA-384, SHA-512 provide improved size and security
More slides like this


Slide #46.

Non-Repudiation: You signed it – it is a contract!!! DIGITAL SIGNATURE
More slides like this


Slide #47.

Digital Envelopes Encrypt with symmetric key, Send symmetric key using Public Key
More slides like this


Slide #48.

Message Auth Which of these offer Digital Signature?
More slides like this


Slide #49.

Digital Signature: Using Public Key Encryption Encode with Private Key Decode with Public Key
More slides like this


Slide #50.

10011010000010111010011010110010101001111000101010101 ARE WE SECURE? OTHER ISSUES
More slides like this


Slide #51.

Random Numbers  random numbers have a range of uses  requirements:  randomness  based on statistical tests for uniform distribution and independence  unpredictability    successive values not related to previous clearly true for truly random numbers but more commonly use generator
More slides like this


Slide #52.

Pseudorandom verses Random Numbers  often use algorithmic technique to create pseudorandom numbers   which satisfy statistical randomness tests but likely to be predictable  true random number generators use a nondeterministic source   e.g. radiation, gas discharge, leaky capacitors increasingly provided on modern processors
More slides like this


Slide #53.

Location of Encryption
More slides like this


Slide #54.

Encryption Types Source Destination Router End-to-End Encryption Link Encryption
More slides like this


Slide #55.

Link versus End-to-End Encryption Use when LINK is vulnerable: Packet sniffers & eavesdroppers Use when Intermediate nodes may be compromised Link-Specific: All packets transmitted on the single link are encrypted Connection-Specific: A connection is encrypted across all its links Encrypted for all protocol layers (at or above encryption layer) Encrypted for upper layer protocols only Intermediate nodes decrypt Intermediate nodes cannot decrypt Provides node authentication Provides user authentication Transparent to user: One key per link Not user-transparent: One key per connection One algorithm for all users User selects encryption algorithm Encryption done in hardware Encryption done in hardware or software Virtual Private Network (VPN) Wireless: (WEP, WPA, WPA2) IP Security (IPsec)  Secure Shell (SSH) Secure Socket Layer (TSL, SSL) IP Security (IPsec)
More slides like this


Slide #56.

Summary Confidentiality: Symmetric encryption: Secret Key Asymmetric encryption: Public/Private keys  Key management End-to-end versus local encryption Integrity: Message authentication & hash functions Non-Repudiation: Digital signatures
More slides like this