Welcome to CS 490B Cryptography - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Welcome to CS 490B Cryptography

Description:

Once upon a time (The Debate in Sign Language) Course mechanics ... But details vary wildly with the application. Must be hard, given the ciphertext, to determine: ... – PowerPoint PPT presentation

Number of Views:121
Avg rating:3.0/5.0
Slides: 19
Provided by: LaptopSoft
Category:

less

Transcript and Presenter's Notes

Title: Welcome to CS 490B Cryptography


1
Welcome to CS 490BCryptography
  • David Mutchler
  • Spring term, 1998-99
  • Lecture 1

2
Today
  • Once upon a time (The Debate in Sign Language)
  • Course mechanics
  • This course involves lots of abstract
    mathematics.
  • Compilers and Systems Programming are great!
  • www.rose-hulman.edu/Class/cs/cryptography
  • Grading, schedule (especially Week 9)
  • Some classical cryptosystems
  • Zm, arithmetic modulo m.

3
What is a cryptosystem? (informal)
  • Alice, Bob and Oscar
  • Alice wants to send a message to Bob.
  • She uses a key to encrypt her plaintextto obtain
    ciphertext.
  • She sends the ciphertext to Bobover an insecure
    channel.
  • Oscar, eavesdropping, sees the ciphertext.But he
    cannot determine the plaintext.
  • Bob, who knows the key,decrypts the ciphertext
    to obtain the plaintext.

4
What is a cryptosystem?
  • Three finite sets
  • P set of possible plaintexts
  • C set of possible ciphertexts
  • K set of possible keys
  • Encryption and decryption functions e and d.For
    each k in K
  • ek P? C dk C ? P
  • Main property for any plaintext x and key k
    dk(ek(x)) x

5
Private key protocol
  • Alice and Bob pick a key k in K
  • At the same place (not observed by Oscar).
  • Or, over a secure channel.
  • Later, if Alice wants to send Bob x x1x2
    ... xn where each xi is in P,she
    uses the encryption rule ek specified by key
    kand sends y y1y2 ... yn where yi
    ek(xi)
  • When Bob receives y1y2 ... yn , he decrypts each
    yi using the decryption key dk, obtaining x1x2
    ... xn

6
Some important properties
  • Main property decrypt and encrypt are inverses
  • Each encryption function ek is one-to-one.
    (Why?)
  • Must be able to decrypt and encrypt efficiently
  • But details vary wildly with the application.
  • Must be hard, given the ciphertext, to determine
  • The key.
  • The plaintext.
  • Usually, only the key is kept secret.The
    cryptographic system is assumed to be public.

7
Shift cipher
  • Encrypt by shifting each letter by k.
  • For example, if k 3 (Caesars cipher)
  • e3(a) d
  • e3(b) e
  • ... e3(z) c
  • Exercise secret encrypts into ___________
  • For a formal definition,we need arithmetic
    modulo m

8
Arithmetic modulo m
  • Suppose a and b are integersand m is a positive
    integer.
  • a mod m is the remainder (residue)when a is
    divided by the modulus m
  • a ? b mod m iff a mod m b mod n
  • a is congruent to b modulo m
  • a is reduced modulo m means replace a by a mod
    m
  • Examples
  • 38 mod 5 is ?? 38 ? ?? mod 5
  • 142 is reduced modulo 32 to ??

9
Arithmetic modulo m Zm
  • Zm is the set 0, 1, ... m-1 (called
    residues)plus two operations, ? and ?
  • Do addition and multiplication just like in the
    real numbers, except reduce results modulo m.
  • Zm forms a ring. Exercises
  • What are the properties of a ring?
  • What is the additive inverse of a in Zm?
  • What does a ? b mean in Zm?

10
Shift cipher
  • P C K Z26
  • For k between 0 and 25,and for x and y in Z26,
    define
  • ek(x) x ? k mod 26
  • dk(y) y ? k mod 26

11
Shift cipher encryption
  • Exercise (from Stinson) use k 11 to encrypt
    we will meet at midnight

12
Shift cipher cryptanalysis
  • Exercise (from Stinson)
  • Do an exhaustive key search to decrypt
    HBCRCLQRWCRVNBJENBWRWN
  • How many keys must be tried, at worst? On average?

13
Substitution cipher
  • P C a, b, ... z
  • K is the set of all permutations of P.
  • Encrypt by applying a permutation.
  • Decrypt by applying the inverse permutation.

14
Substitution cipher
  • Example (from Stinson) use the permutation
    below to decrypt MGZVYZLGHCMHJMY
    XSSFMNHAHYCDLMHA

15
Substitution cipher
  • Exhaustive key search
  • How many keys?
  • 26! ? 4?1026
  • At 1,000,000 keys per second,thats over 100
    billion centuries!
  • But there are other methods of attack!
  • Shift cipher is a special case of substitution

16
Affine cipher
  • Another special case of substitution
  • P C Z26
  • K (a,b) in Z26 ? Z26 ____________
  • ek(x) ax b mod 26
  • Exercises
  • What is dk(x)?
  • Does (4, 7) work for this method?
  • How many (a,b) pairs work in Z26? In Zm?

17
Affine cipher
  • Reasoning as if it were real arithmetic
  • y ek(x) ax b mod 26
  • Solve for x
  • y ? b ax mod 26
  • a-1(y ? b) x mod 26
  • So dk(y) a-1(y ? b)
  • But if the key is (4, 7)
  • e(4,7)(10) 47 mod 26 21
  • e(4,7)(23) 99 mod 26 21

18
Affine cipher
  • Definitions
  • gcd(a, b) is the greatest common divisor of a and
    b
  • a and b are relatively prime iff gcd(a, b) 1.
  • Suppose a?Zm. The multiplicative inverse of a is
    a number a-1?Zm such that aa-1 1 mod m.
  • Theorem
  • An element a in Zm has a multiplicative inverse
    a-1 in Zm iff gcd(a, m) 1
  • If gcd(a, m) 1, then dk(ek(x)) x
Write a Comment
User Comments (0)
About PowerShow.com