4. Introduction to Encryption - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

4. Introduction to Encryption

Description:

All sorts of applications would be impossible if they couldn't be done ... Babbage ... Notably, Charles Babbage and Alan Turing were major contributors to the science ... – PowerPoint PPT presentation

Number of Views:47
Avg rating:3.0/5.0
Slides: 19
Provided by: jonatha229
Category:

less

Transcript and Presenter's Notes

Title: 4. Introduction to Encryption


1
4. Introduction to Encryption
  • The obvious mathematical breakthrough would be
    development of an easy way to factor large prime
    numbers.
  • Bill Gates, The Road Ahead
  • Reference
  • The Code Book, Simon Singh
  • Doubleday, 1999

2
Why is encryption so vital?
  • Information money !
  • All sorts of applications would be impossible if
    they couldnt be done confidentially
  • Banking
  • Any e-commerce
  • Remote logins
  • Password protection
  • Electronic signatures

3
Schematic of encryption problem
  • Two people, Alice and Bob, are trying to
    communicate without a third, Eve, understanding
    what they say

Alice
Bob
Eve
But Eve can see all messages passed between them!
4
Codes and ciphers
  • Historically, this challenge has been addressed
    by two related methods, codes and ciphers
  • Both work by replacing each bit, letter, word or
    phrase in the original message with another
  • For codes, the assignment rules are fixed, and
    have no built-in flexibility
  • Ciphers, on the other hand, are more flexible,
    and in general have a key which determines how
    each part of the message is encrypted

5
Example
  • Vigenere square
  • 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
  • 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 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 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
    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 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 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 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 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 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 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 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 A B C D E F G H I
    J K
  • .

Begin by choosing a key, like cake
C A K E C A K E C A K E C key T O B E O R N
O T T O B E message W P M J R S Y T W U Z G
H cipher
6
Weaknesses of codes and ciphers
  • In general, codes and ciphers can be broken by a
    frequency analysis, which takes advantage of the
    fact that certain letters or words are used more
    than others
  • For example in English, the letters e and t are
    the most common, occurring 13 and 9 of the
    time, while j, q and z are rarely used
  • The most common letters in the encrypted message
    will be those which are mapped into e and t
  • We can also look for common words, like the

7
Babbage and Turing
  • Frequency analysis is numerically challenging and
    involves exploring many different possible
    solutions
  • Computers are ideal for deciphering and much of
    their development was for this purpose
  • Notably, Charles Babbage and Alan Turing were
    major contributors to the science of cryptography
  • Turing was one of the leaders in deciphering the
    German Enigma code at Bletchley Park during World
    War II

8
One time pads
  • The only way to have a totally safe cipher is if
    the key is as long as the message being sent,
    which is known as a one-time pad
  • With it, every letter is mapped to a different
    one each time it appears, making a frequency
    analysis impossible
  • The drawback is that both sender and receiver
    must be in possession of a random key as long as
    the message which cannot be reused
  • The problem then becomes, how do they communicate
    the key?

9
Public key methods
  • Traditional ciphers use a private key method,
    where the key must be known by both and must be
    kept secret from everyone else
  • With it, both sender and receiver are able to
    code and decode any message
  • In the 1970s, public key methods were discovered
  • With a public key, anyone can encrypt a message
    to a person, given that persons key, which is
    made publicly available
  • However, only the originator of the key is able
    to decode messages encrypted with his key

10
One way and trap door functions
  • A one-way function is one that is easy to
    compute, but hard to invert
  • For example, multiplying two large prime numbers
    is easy to do, but its much harder to find the
    prime factors of a large number
  • Passwords usually are not saved themselves,
    instead one saves its result for a one way
    function
  • A trap door function is like a one way function,
    but is one which can be inverted easily given
    some extra information
  • Trap door functions form the basis of all public
    key encryption

11
The RSA cipher
  • The first working version of the public key
    method was developed in 1977 by Rivest, Shamir
    and Adelman
  • It was based on the difficulty of finding the
    prime factors of large composite numbers
  • It forms the basis of much encryption software,
    including pretty good privacy (pgp) and ssh
  • It also is used to electronically sign emails

12
How does RSA work?
  • Alice begins by finding two very large prime
    numbers, p and q, the larger the better
  • Alice multiplies these together to find Npq
  • Alice publishes N along with another random
    number e. These make up the public key.
  • Bob takes his message and converts it to a
    numerical value M, using ASC II or similar, and
    broken up into blocks as long as N
  • Bob then encrypts these by calculating the number
  • C Me modulo N

13
Deciphering the message
  • To decipher the message, Alice has to produce a
    special decryption key, d, which has the property
    that
  • d e 1 modulo (p 1 )(q 1)
  • This key is kept private and can easily be found
    if one knows p and q, but otherwise its very hard
    to determine
  • Finally, Alice can decipher Bobs message by
    raising it to the power d
  • Cd modulo N Med modulo N M

14
How secure is RSA?
  • The encryption is basically safe as long as N
    cannot be factored into p and q, and this kind of
    factorisation is apparently intractable.
  • It can be done easily if N has a few digits, but
    the time increases exponentially as the number of
    digits increases.
  • Typical implementations have 140 digits, which is
    just on the edge of what can be cracked by many
    computers working together, taking of order 1000
    years of CPU time
  • More secure implementations (e.g. for banking)
    use over 300 digits and seem fairly safe

15
Relating to P, NP and NP-complete
  • The encryption process should be tractable, as it
    must be done often. Thus it is in P.
  • Decryption is at least an NP process, because one
    should be able to check to see if a guess for a
    key works in polynomial time.
  • We want the trapdoor function to be difficult to
    invert (e.g. intractable) without the private
    key.
  • Thus, decryption should be an NP process (for the
    average case) but not in P.
  • For this to be true, it is essential that NP ? P.
  • Factorisation, the basis of RSA, is not believed
    to be either P or NP-complete

16
The Future
  • Processing power of computers has increased since
    computers were invented, resulting in part from
    an exponential increase in the number of
    transistors on integrated circuits
  • Moores law is an empirical observation that the
    density of transistors on chips seems to double
    every eighteen months
  • This is expected to hold for the next decade or
    two, but eventually we will reach the quantum
    limit, which derives from the fact that there is
    a fundamental unit of electric charge, the
    electron

17
Quantum computing
  • The long term future of computing is likely to be
    quantum computing, which exploits the physics of
    the very small discovered at the beginning of the
    20th century, known as quantum mechanics
  • Classical computers use bits to store a
    computers state, which can be 1 or 0
  • Quantum computers instead use qubits, which can
    be 1 or 0 or a combination of both at the same
    time, known as a superposition state
  • Using these, quantum computers can be used to
    factorise in polynomial time, putting algorithms
    like RSA in danger (though NP-complete problems
    appear to remain intractable)

18
Quantum encryption
  • Luckily, alternatives exist for encryption which
    also use quantum phenomena
  • These can be used to make completely secure
    encryption methods
  • These exploit quantum entanglement and
    Heisenbergs uncertainty principle, which states
    that it is impossible to measure all aspects of
    an object with absolute certainty
  • Like quantum computers, these techniques will
    take many years to become practical alternatives
Write a Comment
User Comments (0)
About PowerShow.com