Week 5 Lecture 2 - PowerPoint PPT Presentation

1 / 36
About This Presentation
Title:

Week 5 Lecture 2

Description:

Superencryption of plaintext makes brute-force cracking more difficult but not impossible ... Why do dictionary-based brute-force attacks work so well against ... – PowerPoint PPT presentation

Number of Views:45
Avg rating:3.0/5.0
Slides: 37
Provided by: tric156
Category:
Tags: brute | lecture | week

less

Transcript and Presenter's Notes

Title: Week 5 Lecture 2


1
157212
  • Week 5 Lecture 2
  • Encryption/Cryptography

2
Topics
  • Basic Concepts Terminology
  • Types of Algorithm
  • Cryptanalysis
  • Practical exercise using string functions

3
Encryption
  • Foundation technology
  • Underlies almost everything in Information
    Security
  • Ensures or supports
  • Confidentiality
  • Control and possession
  • Integrity
  • Authenticity
  • Non-repudiation

4
Basic Concepts Terminology
  • Plaintext (aka cleartext) original, readable
    data
  • Ciphertext scrambled form of plaintext
  • Encryption reversible conversion of plaintext
    into ciphertext
  • Decryption conversion of ciphertext back into
    plaintext
  • Crack (aka break) code decrypt ciphertext
    without knowing key

5
Basic Concepts Terminology (contd)
  • Key secret allowing encryption and decryption
    to be restricted to possessors of key
  • Symmetric encryption encryption requiring a
    shared key for both encryption and decryption
  • Asymmetric encryption algorithm using a
    different key for decryption than for encryption

6
Basic Concepts Terminology
  • Keylength number of bits in key
  • Keyspace number of possible keys
  • Keyspace 2keylength
  • 2n ? 10 n(log102)
  • ? 10 0.30103n

7
Monoalphabetic Substitution Ciphers
  • Secret decoder ring or Caesar cipher
  • Algorithm uses key offset and algorithm
    transposition
  • e.g., if offset 3, then A becomes D, B E etc.
  • Subject to cryptanalysis using known letter
    frequencies in specific languages
  • English etaionshrdlu. . . .
  • For English alphabet, only 25 possible offsets
    therefore maximum 25 tries to find the key

8
Monoalphabetic Substitution Cipher Example
9
Polyalphabetic Substitution Ciphers
  • Can use different offsets for each position in
    plaintext
  • E.g., Vigenère cipher is like 26 Caesar ciphers
  • Use key indicating which offset to use for which
    position in sequence of 26 letters

10
One-Time Pad
  • Use a fixed and shared secret to determine
    offsets
  • In theory, is only cipher impossible to break IF
  • Pad kept secret
  • Key data truly random
  • Key data never re-used
  • In practice, people use natural language (e.g.,
    novels) and reduce strength of algorithm
  • Major problem how to distribute the pad
    securely?

11
Secure Key Distribution
  • The problem of distributing a key securely is
    completely general to all secret key algorithms
  • A shared secret is essential for both enciphering
    and deciphering data
  • Therefore both sender and receiver must share the
    secret securely
  • But if it were secure to transmit the key, you
    could transmit the plaintext message too
  • So how do you get the secret from one to the
    other securely?
  • Need an alternate communications channel with
    higher security

12
Cryptanalysis
  • Kerchoffs Principle
  • Cryptanalytical Methods
  • Types of Cryptanalytical Attacks

13
Kerchoffs Principle
  • The strength of an encryption algorithm does not
    reside in the secrecy of the algorithm
  • Corollary
  • The strength of an encryption algorithm is not
    measurable unless the algorithm is known

14
Dangers of Proprietary Algorithms
  • Therefore beware of secret, proprietary
    algorithms
  • Many amateurs have failed utterly to defeat
    cryptanalysis
  • Must demonstrate that even with knowledge of the
    algorithm and even knowledge of a plaintext
    ciphertext sample, still too expensive to decrypt
    general ciphertext to make cryptanalysis
    worthwhile

15
Cryptanalytical Methods
  • Frequency-Based Cryptanalysis
  • Brute-Force Cracking
  • Attacking Weak Algorithms

16
Frequency-Based Cryptanalysis
  • Possible to use frequency of single letters and
    digraphs (pairs of letters) to analyze ciphertext
  • But this technique works only for plaintext based
    on natural language
  • Must know (or guess) which language is used
  • Need large amounts of data
  • Does not help with cryptanalysis of purely
    numerical data unless there are regularities in
    the plaintext

e.g., frequency of single letters in plain
English follows sequence ETAOINSHRDLU
17
Brute-Force Cracking
  • Try every possible key
  • Facilitated by massively parallel computing
  • Dictionary attacks narrow the range of keys
  • Helpful when one suspects that the target user
    has chosen bad key
  • Names of pets, friends, sports teams, hobbies,
    objects on desk
  • Password-cracking programs use dictionaries
  • Try every word and combination
  • Can also introduce numbers and symbols

18
Defending Against Password-Cracking Programs
  • How can you choose passwords that are hard to
    crack?
  • Dont use real words
  • Introduce numbers and symbols into the password
    sequence
  • Change your password periodically
  • Dont use the same password on public Web sites
    as on important / secure production sites

19
Interfering with Brute-Force Cracking
  • Need to know the algorithm used for encryption
  • Must be able to recognize successful decryption
  • Superencryption of plaintext makes brute-force
    cracking more difficult but not impossible
  • Suppose adversary uses two algorithms, E1 and E2
    using keys k1 and k2 respectively
  • Thus must crack E2k2((E1k1(P)) which has a
    keyspace that is the product of k1 and k2
  • Using different data encoding schemes can confuse
    cryptanalyst (e.g., use EBCDIC ASCII)

20
Stronger Encryption
  • Transposition Ciphers
  • Product Ciphers
  • Triple DES (3DES)
  • AES
  • PKC

21
Stronger Encryption
  • Substitution ciphers are generally weak (i.e.,
    cheap or quick to crack)
  • Stronger ciphers include
  • Transposition ciphers
  • Block ciphers chaining
  • Product ciphers

22
Transposition Ciphers
  • Change order of plaintext
  • Use specific algorithm (rule)
  • Example matrix rotation
  • Matrix dimensions can serve as key e.g., 6 x 8
    then read as 8 x 6
  • Read text in opposite direction of matrix
  • Interferes with expected frequencies of digraphs,
    trigraphs etc.

23
Transposition Ciphers Example
The quick brown fox jumped over the lazy
dogs. Tioxerlohcw d ageeknj tzs uohy.qbfmve
urope d
24
Cryptanalytical Attacks on Transposition Ciphers
  • Susceptible to combination of brute-force and
    frequency-based analysis
  • Try different offsets looking for familiar /
    frequent digraphs
  • This helps to determine the original matrix and
    its rotation
  • Nonetheless, transposition is an important part
    of more complex encryption schemes

25
Triple DES (3DES)
  • C Ek1Dk2Ek1(P)
  • Where
  • Ek1(P) means encrypt plaintext using key 1
  • C means ciphertext
  • Keylength 110 bits
  • Keyspace 2110 ? 1036
  • Much used for key management

26
AES Advanced Encryption Standard
  • 1997 NIST requested new encryption algorithm
  • Protect sensitive unclassified US government
    information
  • Competition among candidate algorithms
  • Winner Rijndael (Rhine doll)
  • Drs Joan Daeman Vincent Rijmen from Belgium
  • Block cipher with variable block length
    variable key length (easily extendible)
  • Easy to implement in hardware (e.g., smart cards)
    as well as software

27
The Public Key Cryptosystem (PKC)
  • Protecting confidentiality
  • Assuring integrity
  • Demonstrating authenticity
  • Using PGP

28
Encryption Using PKC
  • Key generation produces 2 keys
  • Each can decrypt the ciphertext produced by the
    other
  • One is defined as public
  • Other is kept as private

29
Sending a Ciphertext to Multiple Recipients
  • What if you have to send a message securely to
    many people?
  • Obvious way is to encrypt the message separately
    for each recipient
  • Thus generate as many ciphertexts as recipients

Public Key for Recipient 2
30
Multiple Recipients (contd)
  • However, e-mail normally makes it easy to send
    one message to multiple recipients
  • Dont want to send a different ciphertext to each
    recipient
  • PKC algorithms are computationally demanding
  • Can take significant time to encrypt messages
  • Encrypting same message n times could take a long
    time

31
Multiple Recipients contd
  • Use a one-time symmetric key to create ciphertext
    -- the session key
  • Prepare as many copies of this symmetric key as
    necessary to reach all the recipients
  • Encrypt a copy of the symmetric key with the
    public key of a specific recipient
  • Do this step for each recipient

Session Key encrypted for each recipient
32
Multiple Recipients (contd)
  • Send both the ciphertext and the encrypted
    decryption keys to all the recipients

33
Exam Review Questions
  • Why did cryptographers develop transposition,
    block and product ciphers?
  • How do transposition ciphers manage to strengthen
    a ciphertext compared with substitution ciphers?
  • How does the recipient of a message encrypted
    solely for that person using the PKC decrypt the
    received message?
  • How do we manage to encrypt a message only once
    using the PKC when we have multiple recipients?

34
Exam Review Questions
  • Distinguish between plaintext and ciphertext.
  • Explain the difference between symmetric and
    asymmetric encryption.
  • What is the keyspace of a 128-bit key expressed
    in powers of 2? In powers of 10?
  • How much bigger is the keyspace of a 64-bit key
    than the keyspace of a 40-bit key?
  • Why is the Caesar cipher no longer used in real
    cryptography?
  • Why was the Caesar cipher effective when it was
    invented if it is no longer useful today?

35
Exam Review Questions
  • What is the significance of etaionshrdlu?
  • Why is useful to know etaionshrdlu ?
  • What kind of encryption algorithm is the Caesar
    cipher?
  • What kind of encryption is the Vigenère cipher?
  • Why is a polyalphabetic substitution cipher
    inherently harder to crack than a monoalphabetic
    substitution cipher?
  • What is the only cipher that is theoretically
    impossible to crack?

36
Exam Review Questions
  • Why do dictionary-based brute-force attacks work
    so well against bad passwords chosen by
    poorly-trained computer users?
  • Why is not necessary to find the exact matches to
    passwords to be able to break security using a
    password-cracking program?
  • Explain how to defend your passwords against
    password-cracking programs.
Write a Comment
User Comments (0)
About PowerShow.com