SlideShare uma empresa Scribd logo
1 de 79
Cipher Techniques




April 9, 2013
                             1
Road Map
 Basic  Terminology
 Cryptosystem

 Classical Cryptography

 Algorithm Types and Modes

 Data Encryption Standard

 Other Stream & Block Ciphers




April 9, 2013
                                 2
Basic Terminology

     plaintext - the original message
     ciphertext - the coded message
     cipher - algorithm for transforming plaintext to ciphertext
     key - info used in cipher known only to sender/receiver
     encipher (encrypt) - converting plaintext to ciphertext
     decipher (decrypt) - recovering ciphertext from plaintext
     cryptography - study of encryption principles/methods
     cryptanalysis (codebreaking) - the study of principles/ methods
      of deciphering ciphertext without knowing key
     cryptology - the field of both cryptography and cryptanalysis



April 9, 2013
                                                                    3
Cryptosystem

     A cryptosystem is a five-tuple (P,C,K,E,D),
        where the following are satisfied:
    1.   P is a finite set of possible plaintexts.
    2.   C is a finite set of possible ciphertexts.
    3.   K, the key space, is a finite set of possible
        keys
    4.  ∀K∈K, ∃EK∈E (encryption rule), ∃DK∈D
        (decryption rule).
        Each EK: P→C and DK: C→P are functions
        such that ∀x∈P, DK(EK(x)) = x.
April 9, 2013
                                                         4
Cryptography
 Cryptography
           Symmetric / private key / single key
           Asymmetric / public-key / two - key




April 9, 2013
                                                   5
Symmetric Cryptography




April 9, 2013
                         6
Asymmetric Cryptography




April 9, 2013
                          7
Requirements
 Two    requirements for secure use of
      symmetric encryption:
           a strong encryption algorithm
           a secret key known only to sender / receiver
            Y = EK(X)
            X = DK(Y)
 assume   encryption algorithm is known
 implies a secure channel to distribute key


April 9, 2013
                                                           8
Symmetric cryptography
 Transposition  Techniques
 Substitution techniques
           Caesar Cipher
           Monoalphabetic Cipher
           Polyalphabethic Cipher
           Playfair Cipher




April 9, 2013
                                     9
Types of Cryptanalytic Attacks
 adversary needs
 strongest attack        ciphertext only
                           only know algorithm / ciphertext, statistical, can
                             identify plaintext, or worse: the key
                         known plaintext
                           know/suspect plaintext & ciphertext to attack
                             cipher
                         chosen plaintext
                           select plaintext and obtain ciphertext to attack
                             cipher
                         chosen ciphertext
                           select ciphertext and obtain plaintext to attack

adversary’s attacks          cipher
  can be weaker          chosen text
  April 9, 2013
                           select either plaintext or ciphertext to en/decrypt 10
                                                                                to
Brute Force Search
 always possible to simply try every key
 most basic attack, proportional to size of key
  space
 assume either know / recognise plaintext




April 9, 2013
                                               11
Transposition Ciphers
 Consider   classical transposition or
  permutation ciphers
 these hide the message by rearranging the
  letter order
 without altering the actual letters used

 can recognise these since have the same
  frequency distribution as the original text


April 9, 2013
                                                12
Rail Fence cipher
 writemessage letters out diagonally over a
  number of rows
 then read off cipher row by row

 eg. write message out as:
      m e m a t r h t g p r y
       e t e f e t e o a a t
 giving        ciphertext
      MEMATRHTGPRYETEFETEOAAT


April 9, 2013
                                               13
Row Transposition Ciphers
a  more complex scheme
 write letters of message out in rows over a
  specified number of columns
 then reorder the columns according to some
  key before reading off the rows
      Key:       4 3 1 2 5 6 7
      Plaintext: a t t a c k p
                 o s t p o n e
                 d u n t i l t
                 w o a m x y z
      Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ
April 9, 2013
                                                 14
Classical Substitution Ciphers
 where   letters of plaintext are replaced by
  other letters or by numbers or symbols
 or if plaintext is viewed as a sequence of bits,
  then substitution involves replacing plaintext
  bit patterns with ciphertext bit patterns




April 9, 2013
                                                15
Caesar Cipher
 earliest  known substitution cipher
 by Julius Caesar

 first attested use in military affairs

 replaces each letter by 3rd letter after it

 example:

      meet me after the toga party
      PHHW PH DIWHU WKH WRJD SDUWB


April 9, 2013
                                                16
Caesar Cipher
 can           define transformation as:
      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
      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
 mathematically                  give each letter a number
      a b c     d e f   g h i   j k l m
      0 1 2     3 4 5   6 7 8   9 10 11 12
      n o       p q     r s     t u v w x y Z
      13 14     15 16   17 18   19 20 21 22 23 24 25
 then          have Caesar cipher as:
      C = E(p) = (p + k) mod (26)
      p = D(C) = (C – k) mod (26)

April 9, 2013
                                                              17
Monoalphabetic Cipher
     rather than just shifting the alphabet
     could shuffle (jumble) the letters arbitrarily
     each plaintext letter maps to a different random
      ciphertext letter
     hence key is 26 letters long

      Plain: abcdefghijklmnopqrstuvwxyz
      Cipher: DKVQFIBJWPESCXHTMYAUOLRGZN
      Plaintext: ifwewishtoreplaceletters
      Ciphertext: WIRFRWAJUHYFTSDVFSFUUFYA

April 9, 2013
                                                         18
Playfair Cipher
 not even the large number of keys in a
  monoalphabetic cipher provides security
 one approach to improving security was to
  encrypt multiple letters
 the Playfair Cipher is an example

 invented by Charles Wheatstone in 1854, but
  named after his friend Baron Playfair


April 9, 2013
                                            19
Playfair Key Matrix
     a 5X5 matrix of letters based on a keyword
           (I and J aren’t distinguished)
     fill in letters of keyword (sans duplicates)
     fill rest of matrix with other letters
     eg. using the keyword MONARCHY
            MONAR
            CHYBD
            EFGIK
            LPQST
            UVWXZ

April 9, 2013
                                                     20
Encrypting and Decrypting
          plaintext encrypted two letters at a time:
      1.        each letter is replaced by the one in its row in the column
                of the other letter of the pair, eg. “hs" encrypts to "BP",
                and “ea" to "IM" or "JM" (as desired). Except when that
                doesn’t work!
      2.        if a pair is a repeated letter, insert a filler like 'X', eg.
                "balloon" transformed to "ba lx lo on"
      3.        if both letters fall in the same row, replace each with
                letter to right (wrapping back to start from end),        eg.
                “ar" encrypts as "RM"
      4.        if both letters fall in the same column, replace each with
                the letter below it (again wrapping to top from bottom),
                eg. “mu" encrypts to "CM"


April 9, 2013
                                                                           21
Polyalphabetic Ciphers
     another approach to improving security is to use
      multiple cipher alphabets
     called polyalphabetic substitution ciphers
     makes cryptanalysis harder with more alphabets to
      guess and flatter frequency distribution
     use a key to select which alphabet is used for each
      letter of the message
     use each alphabet in turn
     repeat from start after end of key is reached

April 9, 2013
                                                        22
Vigenère Cipher
 simplest    polyalphabetic substitution cipher is
  the Vigenère Cipher
 effectively multiple caesar ciphers

 key is multiple letters long K = k1 k2 ... kd

 ith letter specifies ith alphabet to use

 use each alphabet in turn

 repeat from start after d letters in message

 decryption simply works in reverse

April 9, 2013
                                                  23
Example
 write the plaintext out
 write the keyword repeated above it
 use each key letter as a caesar cipher key
 encrypt the corresponding plaintext letter
 eg using keyword deceptive
      key:       deceptivedeceptivedeceptive
      plaintext: wearediscoveredsaveyourself
      ciphertext:ZICVTWQNGRZGVTWAVZHCQYGLMGJ

April 9, 2013
                                               24
Autokey Cipher
    ideally want a key as long as the message
    Vigenère proposed the autokey cipher
    with keyword is prefixed to message as key
    knowing keyword can recover the first few letters
    use these in turn on the rest of the message
    but still have frequency characteristics to attack
    eg. given key deceptive
     key:       deceptivewearediscoveredsav
     plaintext: wearediscoveredsaveyourself
     ciphertext:ZICVTWQNGKZEIIGASXSTSLVVWLA
April 9, 2013
                                                          25
One-Time Pad
 ifa truly random key as long as the message
  is used, the cipher will be secure
 called a One-Time pad
 is unbreakable since ciphertext bears no
  statistical relationship to the plaintext
 since for any plaintext & any ciphertext
  there exists a key mapping one to other
 unconditional security! why look any
  further??
April 9, 2013
                                            26
Product Ciphers
     ciphers using substitutions or transpositions are not
      secure because of language characteristics
     hence consider using several ciphers in succession
      to make harder (Shannon)
           two substitutions make a more complex substitution
           two transpositions make more complex transposition
           but a substitution followed by a transposition makes a new
            much harder cipher
     this is bridge from classical to modern ciphers


April 9, 2013
                                                                     27
Rotor Machines
     before modern ciphers, rotor machines were most
      common product cipher
     were widely used in WW2
           German Enigma, Allied Hagelin, Japanese Purple
     implemented a very complex, varying substitution
      cipher
     used a series of cylinders, each giving one
      substitution, which rotated and changed after each
      letter was encrypted
     with 3 cylinders have 263=17576 alphabets
           3! rearrangements of cylinders in Enigma
April 9, 2013
                                                             28
Steganography
 an alternative to encryption
 hides existence of message
           using only a subset of letters/words in a longer
            message marked in some way
           using invisible ink
           hiding in LSB in graphic image or sound file
 has           drawbacks
           high overhead to hide relatively few info bits

April 9, 2013
                                                               29
Algorithm Types and Modes
 An  Algorithm type defines what size of plain
  text should be encrypted in each step of
  algorithm
 An Algorithm mode defines the details of the
  cryptographic algorithm, once the type is
  decided.



April 9, 2013
                                              30
Algorithm Types
 Stream Ciphers
 Block Ciphers



Algorithm Modes
 ElectronicCode Book         Work On Block Cipher
 Cipher Block Chaining

 Cipher FeedBack
                          Work On Block Ciphers acting as
 Output FeedBack                Stream Cipher


April 9, 2013
                                                      31
Stream, Block Ciphers
     E encipherment function
           Ek(b) encipherment of message b with key k
           In what follows, m = b1b2 …, each bi of fixed length
     Block cipher
           Ek(m) = Ek(b1)Ek(b2) …
     Stream cipher
           k = k1k2 …
           Ek(m) = Ek1(b1)Ek2(b2) …
           If k1k2 … repeats itself, cipher is periodic and the kength of
            its period is one cycle of k1k2 …

April 9, 2013
                                                                         32
Stream Ciphers
 Often      (try to) implement one-time pad by
      xor’ing each bit of key with one bit of
      message
           Example:
                             m = 00101
                             k = 10010
                             c = 10111
 But           how to generate a good key?

April 9, 2013
                                                  33
Synchronous Stream Ciphers
 n-stage     Linear Feedback Shift Register:
      consists of
           n bit register r = r0…rn–1
           n bit tap sequence t = t0…tn–1
           Use:
               Use rn–1 as key bit
               Compute x = r0t0 ⊕ … ⊕ rn–1tn–1
               Shift r one bit to right, dropping rn–1, x becomes r0


April 9, 2013
                                                                        34
Operation

                                                                  …
                r0          …               rn–1    ⊕              bi
                                                                  …
                                                                  ci

                r0´          …              rn–1´       ri´ = ri–1,
                                                        0<i≤n

                      r0t0 + … + rn–1tn–1
April 9, 2013
                                                                        35
Example
        4-stage LFSR; t = 1001
      r        ki     new bit computation        new r
      0010     0      01⊕00⊕10⊕01 = 0            0001
      0001     1      01⊕00⊕00⊕11 = 1            1000
      1000     0      11⊕00⊕00⊕01 = 1            1100
      1100     0      11⊕10⊕00⊕01 = 1            1110
      1110     0      11⊕10⊕10⊕01 = 1            1111
      1111     1      11⊕10⊕10⊕11 = 0            0111
      0111     1      11⊕10⊕10⊕11 = 1            1011
        Key sequence has period of 15 (010001111010110)


April 9, 2013
                                                           36
NLFSR
 n-stage     Non-Linear Feedback Shift Register:
      consists of
           n bit register r = r0…rn–1
           Use:
               Use rn–1 as key bit
               Compute x = f(r0, …, rn–1); f is any function
               Shift r one bit to right, dropping rn–1, x becomes r0
            Note same operation as LFSR but more general
            bit replacement function
April 9, 2013
                                                                        37
Example
   4-stage NLFSR; f(r0, r1, r2, r3) = (r0 & r2) | r3
    r                ki   new bit computation           new r
       1100               0     (1 & 0) | 0 = 0
              0110
       0110               0     (0 & 1) | 0 = 0
              0011
       0011               1     (0 & 1) | 1 = 1
              1001
       1001               1     (1 & 0) | 1 = 1
              1100
       1100               0     (1 & 0) | 0 = 0
              0110
       0110
April 9, 2013
                          0     (0 & 1) | 0 = 0
                                                                38
              0011
Self-Synchronous Stream
Cipher
 Takekey from message itself (autokey)
 Example: Vigenère, key drawn from plaintext
           key           XTHEBOYHASTHEBA
           plaintext     THEBOYHASTHEBAG
           ciphertext    QALFPNFHSLALFCT
 Problem:
           Statistical regularities in plaintext show in key
           Once you get any part of the message, you can
            decipher more

April 9, 2013
                                                                39
Another Example
 Take key from ciphertext (autokey)
 Example: Vigenère, key drawn from
  ciphertext
           key           XQXBCQOVVNGNRTT
           plaintext     THEBOYHASTHEBAG
           ciphertext    QXBCQOVVNGNRTTM
 Problem:
           Attacker gets key along with ciphertext, so
            deciphering is trivial
April 9, 2013
                                                          40
Block Cipher
 Block Cipher – treat a
  block of plaintext as a whole
       Feistel Cipher
       DES/3DES/AES
 Stream   coding – encrypt one
  bit or byte at a time



 April 9, 2013
                                  41
Block Ciphers
 Encipher,  decipher multiple bits at once
 Each block enciphered independently
 Problem: identical plaintext blocks produce
  identical ciphertext blocks
           Example: two database records
               MEMBER: HOLLY INCOME $100,000
               MEMBER: HEIDI INCOME $100,000
           Encipherment:
               ABCQZRME GHQMRSIB CTXUVYSS RMGRPFQN
               ABCQZRME ORMPABRZ CTXUVYSS RMGRPFQN
April 9, 2013
                                                      42
Solutions
 Insert information about block’s position into
  the plaintext block, then encipher
 Cipher block chaining:
           Exclusive-or current plaintext block with previous
            ciphertext block:
               c0 = Ek(m0 ⊕ I)
               ci = Ek(mi ⊕ ci–1) for i > 0
            where I is the initialization vector

April 9, 2013
                                                             43
Algorithm Modes
 ElectronicCode Book            Work On Block Cipher
 Cipher Block Chaining

 Cipher FeedBack
                          Work On Block Ciphers acting as
 Output FeedBack                Stream Cipher




April 9, 2013
                                                        44
ECB (Electronic CodeBook) Mode
   Encryption: for 1≤j≤t, cj <= EK(xj).
   Decryption: for 1≤j≤t, xj <= DK(cj).
               Identical plaintext (under the same key) result in
                identical ciphertext
               blocks are enciphered independently of other
                blocks
               bit errors in a single ciphertext affect decipherment
                of that block only


April 9, 2013
                                                                    45
ECB Mode (Cont’d)



                      xj
                           n


          key        E                E-1          key

                           n
                                     x’j = xj
                               cj
                encipherment        decipherment




April 9, 2013
                                                         46
CBC (Cipher-Block Chaining)
   Mode

                   C0=IV                Cj


                           C j-1

                   n                                      key
             xj        ⊕                     E-1

                                             ⊕
                                                                 C j-1
           key              E
                                   Cj
<Encipherment>         n                     X’j = xj
                                                        <Decipherment>




   April 9, 2013
                                                                         47
CBC Mode (Cont’d)

   Encryption: c0 ← IV, cj ← EK(cj−1⊕ xj)
   Decryption: c0 ← IV, xj ← cj−1 ⊕ E−1K(cj)
               chaining causes ciphertext cj to depend on all preceding
                plaintext
               a single bit error in cj affects decipherment of blocks cj and
                cj+1
               self-synchronizing: error cj (not cj+1, cj+2) is correctly
                decrypted to xj+2.
April 9, 2013
                                                                             48
CFB-r(Cipher FeedBack) Mode
                            r-bit Shift                          r-bit Shift


                I1=IV

                key              E                 key                 E


          leftmost r bits        Oj            leftmost r bits        Oj


                   xj                     ci           ci                      xj


                        Encipherment                        Decipherment


April 9, 2013
                                                                                    49
OFB(Output FeedBack) Mode
with full(or r-bit) feedback
                   Ij     r-bit Shift              Ij        r-bit Shift


                I1=IV

                key            E                 key                 E


          Leftmost r-bits      Oj            Leftmost r-bits        Oj


                    xj                  cj              cj                 xj


                         Encipherment                        Deciphering


April 9, 2013
                                                                                50
Data Encryption
                   Standard
       The Data Encryption Standard (DES)
       specifies a FIPS approved
       cryptographic algorithm as required
       by FIPS 140-1.(Federal Information
       Processing Standards 140-1)


April 9, 2013
                                             51
April 9, 2013
                52
Enciphering
 The      64 bits of the input block to be
      enciphered are first subjected to the following
      initial permutation IP:




April 9, 2013
                                                   53
 IP
                      58 50 42 34 26 18   10   2
                60   52 44 36 28 20 12    4
                62   54 46 38 30 22 14    6
                64   56 48 40 32 24 16    8
                57   49 41 33 25 17 9     1
                59   51 43 35 27 19 11    3
                61   53 45 37 29 21 13    5
                63   55 47 39 31 23 15    7
April 9, 2013
                                                   54
 The  permuted input block is then the input
      to a complex key-dependent computation.
     The output of that computation (preoutput)
      is then subjected to the next permutation
      which is the inverse of the initial
      permutation.



April 9, 2013
                                                    55
 IP-1      40 8 48 16 56 24 64 32
                39 7 47 15 55 23 63 31
                38 6 46 14 54 22 62 30
                37 5 45 13 53 21 61 29
                36 4 44 12 52 20 60 28
                35 3 43 11 51 19 59 27
                34 2 42 10 50 18 58 26
                33 1 41   9 49 17 57 25

April 9, 2013
                                          56
 Let     K be a block of 48 bits chosen from the
          64-bit (how? explained next). Then the
          output L'R' of an iteration with input LR is
          defined by:
          L' = R
          R' = L (+) f (R,K)
     L'R'     is the output of the 16th iteration then
          R'L' is the preoutput block.
April 9, 2013
                                                          57
One round of DES




April 9, 2013
                   58
April 9, 2013
                59
 PC-1     (Key Permutation)
            57 49 41 33 25           17    9
             1 58 50 42 34           26   18
            10   2 59 51 43          35   27
            19   11    3   60   52   44   36


            63   55   47   39   31   23   15
             7   62   54   46   38   30   22
            14    6   61   53   45   37   29
            21   13    5   28   20   12    4

April 9, 2013
                                               60
 Iteration     corresponds to left shifts:

                1   2   3   4   5   6   7   8
                1   1   2   2   2   2   2   2

                9 10 11 12 13 14 15 16
                1 2 2 2 2 2 2 1


April 9, 2013
                                                  61
 PC-2           (Compression Permutation)
                14    17   11   24    1    5
                3     28   15    6   21   10
                23    19   12    4   26    8
                16     7   27   20   13    2
                41    52   31   37   47   55
                30    40   51   45   33   48
                44    49   39   56   34   53
                46    42   50   36   29   32
April 9, 2013
                                                 62
One round of DES




April 9, 2013
                   63
 The      Cipher Function f : A sketch of
          the calculation of f (R, K) is given by




April 9, 2013
                                                    64
Expansion Permutation
                   1 2 3 4    5 6 7 8     9 10 11 12




                1 2 3 4 5 6 7 8 9 10 111213 14 15 16



April 9, 2013
                                                       65
E          bit-selection table
                32   1   2   3   4    5
                 4   5   6   7   8    9
                 8   9 10 11 12 13
                12 13 14 15 16 17
                16 17 18 19 20 21
                20 21 22 23 24 25
                24 25 26 27 28 29
                28 29 30 31 32        1

April 9, 2013
                                          66
One round of DES




April 9, 2013
                   67
S
                1

    14          4 13    1   2 15 11     8   3 10    6 12    5   9   0   7
      O 15          7   4 14    2 13    1 10    6 12 11     9   5   3   8
      4         1 14    8 13    6   2 11 15 12      9   7   3 10    5   0
    15 12           8   2   4   9   1   7   5 11    3 14 10     O   6 13



    S
                2
    15          1   8 14    6 11    3   4   9   7   2 13 12     O   5 10
      3 13          4   7 15    2   8 14 12     0   1 10    6   9 11    5
      0 14          7 11 10     4 13    1   5   8 12    6   9   3   2 15

    13          8 10    1   3 15    4   2 11    6   7 12    0   5 14    9
April 9, 2013
                                                                            68
S
                3
    10          0   9 14    6   3 15    5   1 13 12     7 11   4   2   8
    13          7   O   9   3   4   6 10    2   8   5 14 12 11 15      1
    13          6   4   9   8 15    3   0 11    1   2 12   5 10 14     7
       1 10 13          0   6   9   8   7   4 15 14     3 11   5   2 12



    S
                4
       7 13 14          3   0   6   9 10    1   2   8   5 11 12    4 15
    13          8 11    5   6 15    O   3   4   7   2 12   1 10 14     9
    10          6   9   0 12 11     7 13 15     1   3 14   5   2   8   4

       3 15         O   6 10    1 13    8   9   4   5 11 12    7   2 14

April 9, 2013
                                                                           69
S
                5
       2 12         4   1   7 10 11     6   8   5   3 15 13     O 14    9
    14 11           2 12    4   7 13    1   5   0 15 10     3   9   8   6
       4        2   1 11 10 13      7   8 15    9 12    5   6   3   O 14
    11          8 12    7   1 14    2 13    6 15    O   9 10    4   5   3



    S
                6
    12          1 10 15     9   2   6   8   O 13    3   4 14    7   5 11
    10 15           4   2   7 12    9   5   6   1 13 14     O 11    3   8
       9 14 15          5   2   8 12    3   7   0   4 10    1 13 11     6

       4        3   2 12    9   5 15 10 11 14       1   7   6   0   8 13

April 9, 2013
                                                                            70
S
                7
       4 11         2 14 15     0   8 13    3 12    9   7   5 10    6   1
    13          0 11    7   4   9   1 10 14     3   5 12    2 15    8   6
       1        4 11 13 12      3   7 14 10 15      6   8   0   5   9   2
       6 11 13          8   1   4 10    7   9   5   0 15 14     2   3 12



    S
                8
    13          2   8   4   6 15 11     1 10    9   3 14    5   0 12    7
       1 15 13          8 10    3   7   4 12    5   6 11    0 14    9   2
       7 11         4   1   9 12 14     2   0   6 10 13 15      3   5   8

       2        1 14    7   4 10    8 13 15 12      9   0   3   5   6 11

April 9, 2013
                                                                            71
          S1
                0   1   2   3   4   5   6   7   8   9 10 11 12 13 14 15
0         14        4 13    1   2 15 11     8   3 10   6 12    5   9   0   7
1               0 15    7   4 14    2 13    1 10    6 12 11    9   5   3   8
2               4   1 14    8 13    6   2 11 15 12     9   7   3 10    5   0
3         15 12         8   2   4   9   1   7   5 11   3 14 10     0   6 13



          For example, for input 011011 the row is 01,
           that is row 1, and the column is determined
           by 1101, that is column 13. In row 1 column
           13 appears 5 so that the output is 0101.
April 9, 2013
                                                                               72
One round of DES




April 9, 2013
                   73
 The permutation function P yields a 32-
     bit output from a 32-bit input by
     permuting the bits of the input block
    P        16    7 20 21
                29   12   28   17
                 1   15   23   26
                 5   18   31   10
                 2    8   24   14
                32   27    3    9
                19   13   30    6
                22   11   4    25

April 9, 2013
                                                74
Primitive functions for the data
  encryption algorithm

          The choice of the primitive functions KS,
           S1, ..., S8 and P is critical to the strength of an
           encipherment resulting from the algorithm
          The recommended set of functions are
           described as S1, ..., S8 and P in the
           algorithm.


April 9, 2013
                                                                 75
Deciphering
 The       permutation IP-1 applied to the
      preoutput block is the inverse of the
      initial permutation IP applied to the
      input.
               R = L'
                L = R' (+) f (L', K)


April 9, 2013
                                              76
Other Stream Ciphers
     RC4
           Variable key size stream cipher
           Proprietary for 7 years (1987 - 1994)
           In 1994 source code was posted to mailing list
           Works in OFB
           Encryption is 10 times faster than DES

     SEAL (Software-optimized Encryption ALgorithm)
           length-increasing pseudorandom function which maps a 32-bit sequence
            number n to an L-bit keystream under control of a 160-bit secret key a
           In the preprocessing stage, the key is stretched into larger tables using the
            table-generation function Ga (based on SHA-1)
           Subsequent to this preprocessing, keystream generation requires about 5
            machine instructions per byte
           order of magnitude faster than DES



April 9, 2013
                                                                                        77
Other Block Ciphers
     FEAL
           Fast N-round block cipher
           Suffers a lot of attacks, and hence introduce new attacks
            on block ciphers
           Japan standard
     IDEA
           64-64-128-8
           James Massey
           Using algebraic functions (mult mod 2n+1, add mod 2n)
     SAFER, RC-5, AES
April 9, 2013
                                                                        78
Thank You
                       reachable at
                naasir_k@donboscoit.ac.in




April 9, 2013
                                            79

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Cryptography
CryptographyCryptography
Cryptography
 
Ch02...1
Ch02...1Ch02...1
Ch02...1
 
Principles of public key cryptography and its Uses
Principles of  public key cryptography and its UsesPrinciples of  public key cryptography and its Uses
Principles of public key cryptography and its Uses
 
Cryptography and Network Security William Stallings Lawrie Brown
Cryptography and Network Security William Stallings Lawrie BrownCryptography and Network Security William Stallings Lawrie Brown
Cryptography and Network Security William Stallings Lawrie Brown
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
 
Cryptography
CryptographyCryptography
Cryptography
 
Transposition cipher
Transposition cipherTransposition cipher
Transposition cipher
 
Asymmetric Cryptography
Asymmetric CryptographyAsymmetric Cryptography
Asymmetric Cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
symmetric key encryption algorithms
 symmetric key encryption algorithms symmetric key encryption algorithms
symmetric key encryption algorithms
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
Traditional symmetric-key cipher
Traditional symmetric-key cipherTraditional symmetric-key cipher
Traditional symmetric-key cipher
 
Digital signature
Digital signatureDigital signature
Digital signature
 
Cs8792 cns - unit v
Cs8792   cns - unit vCs8792   cns - unit v
Cs8792 cns - unit v
 
RSA ALGORITHM
RSA ALGORITHMRSA ALGORITHM
RSA ALGORITHM
 
cryptography
cryptographycryptography
cryptography
 
Encryption And Decryption
Encryption And DecryptionEncryption And Decryption
Encryption And Decryption
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipherCryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipher
 

Semelhante a Cipher techniques

4.Cryptography handout 2.pptx
4.Cryptography  handout 2.pptx4.Cryptography  handout 2.pptx
4.Cryptography handout 2.pptxMikiAbera
 
classicalencryptiontechniques.ppt
classicalencryptiontechniques.pptclassicalencryptiontechniques.ppt
classicalencryptiontechniques.pptutsavkakkad1
 
Cryptography 387 © David Lippman Creative Commons BY-.docx
  Cryptography   387 © David Lippman  Creative Commons BY-.docx  Cryptography   387 © David Lippman  Creative Commons BY-.docx
Cryptography 387 © David Lippman Creative Commons BY-.docxrobert345678
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniquesdhivyakesavan3
 
Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2AfiqEfendy Zaen
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniquesJanani S
 
SYMMETRIC CRYPTOGRAPHY
SYMMETRIC CRYPTOGRAPHY SYMMETRIC CRYPTOGRAPHY
SYMMETRIC CRYPTOGRAPHY Santosh Naidu
 
02 Information System Security
02  Information System Security02  Information System Security
02 Information System SecurityShu Shin
 
Cryptography (Revised Edition)
Cryptography (Revised Edition)Cryptography (Revised Edition)
Cryptography (Revised Edition)Somaditya Basak
 
Cryptograph yreport 2003
Cryptograph yreport 2003Cryptograph yreport 2003
Cryptograph yreport 2003keyurbz
 
Computer Network Unit-5 (Part-1).pdf
Computer Network Unit-5 (Part-1).pdfComputer Network Unit-5 (Part-1).pdf
Computer Network Unit-5 (Part-1).pdfParshantYadav13
 
Secret key cryptography
Secret key cryptographySecret key cryptography
Secret key cryptographyPrabhat Goel
 
Symmetric Encryption Techniques
Symmetric Encryption Techniques Symmetric Encryption Techniques
Symmetric Encryption Techniques Dr. Kapil Gupta
 
Enhancing security of caesar cipher using different
Enhancing security of caesar cipher using differentEnhancing security of caesar cipher using different
Enhancing security of caesar cipher using differenteSAT Journals
 

Semelhante a Cipher techniques (20)

unit 2.ppt
unit 2.pptunit 2.ppt
unit 2.ppt
 
Ch02
Ch02Ch02
Ch02
 
4.Cryptography handout 2.pptx
4.Cryptography  handout 2.pptx4.Cryptography  handout 2.pptx
4.Cryptography handout 2.pptx
 
classicalencryptiontechniques.ppt
classicalencryptiontechniques.pptclassicalencryptiontechniques.ppt
classicalencryptiontechniques.ppt
 
Cryptography 387 © David Lippman Creative Commons BY-.docx
  Cryptography   387 © David Lippman  Creative Commons BY-.docx  Cryptography   387 © David Lippman  Creative Commons BY-.docx
Cryptography 387 © David Lippman Creative Commons BY-.docx
 
ch02.ppt
ch02.pptch02.ppt
ch02.ppt
 
Unit i
Unit iUnit i
Unit i
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
 
unit -1.ppt
unit -1.pptunit -1.ppt
unit -1.ppt
 
Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
 
SYMMETRIC CRYPTOGRAPHY
SYMMETRIC CRYPTOGRAPHY SYMMETRIC CRYPTOGRAPHY
SYMMETRIC CRYPTOGRAPHY
 
02 Information System Security
02  Information System Security02  Information System Security
02 Information System Security
 
Cryptography (Revised Edition)
Cryptography (Revised Edition)Cryptography (Revised Edition)
Cryptography (Revised Edition)
 
Cryptograph yreport 2003
Cryptograph yreport 2003Cryptograph yreport 2003
Cryptograph yreport 2003
 
Computer Network Unit-5 (Part-1).pdf
Computer Network Unit-5 (Part-1).pdfComputer Network Unit-5 (Part-1).pdf
Computer Network Unit-5 (Part-1).pdf
 
Secret key cryptography
Secret key cryptographySecret key cryptography
Secret key cryptography
 
Symmetric Encryption Techniques
Symmetric Encryption Techniques Symmetric Encryption Techniques
Symmetric Encryption Techniques
 
Enhancing security of caesar cipher using different
Enhancing security of caesar cipher using differentEnhancing security of caesar cipher using different
Enhancing security of caesar cipher using different
 
Edward Schaefer
Edward SchaeferEdward Schaefer
Edward Schaefer
 

Mais de Mohd Arif

Bootp and dhcp
Bootp and dhcpBootp and dhcp
Bootp and dhcpMohd Arif
 
Arp and rarp
Arp and rarpArp and rarp
Arp and rarpMohd Arif
 
User datagram protocol
User datagram protocolUser datagram protocol
User datagram protocolMohd Arif
 
Project identification
Project identificationProject identification
Project identificationMohd Arif
 
Project evalaution techniques
Project evalaution techniquesProject evalaution techniques
Project evalaution techniquesMohd Arif
 
Presentation
PresentationPresentation
PresentationMohd Arif
 
Pointers in c
Pointers in cPointers in c
Pointers in cMohd Arif
 
Peer to-peer
Peer to-peerPeer to-peer
Peer to-peerMohd Arif
 
Overview of current communications systems
Overview of current communications systemsOverview of current communications systems
Overview of current communications systemsMohd Arif
 
Overall 23 11_2007_hdp
Overall 23 11_2007_hdpOverall 23 11_2007_hdp
Overall 23 11_2007_hdpMohd Arif
 
Objectives of budgeting
Objectives of budgetingObjectives of budgeting
Objectives of budgetingMohd Arif
 
Network management
Network managementNetwork management
Network managementMohd Arif
 
Networing basics
Networing basicsNetworing basics
Networing basicsMohd Arif
 
Iris ngx next generation ip based switching platform
Iris ngx next generation ip based switching platformIris ngx next generation ip based switching platform
Iris ngx next generation ip based switching platformMohd Arif
 
Ip sec and ssl
Ip sec and  sslIp sec and  ssl
Ip sec and sslMohd Arif
 
Ip security in i psec
Ip security in i psecIp security in i psec
Ip security in i psecMohd Arif
 
Intro to comp. hardware
Intro to comp. hardwareIntro to comp. hardware
Intro to comp. hardwareMohd Arif
 

Mais de Mohd Arif (20)

Bootp and dhcp
Bootp and dhcpBootp and dhcp
Bootp and dhcp
 
Arp and rarp
Arp and rarpArp and rarp
Arp and rarp
 
User datagram protocol
User datagram protocolUser datagram protocol
User datagram protocol
 
Project identification
Project identificationProject identification
Project identification
 
Project evalaution techniques
Project evalaution techniquesProject evalaution techniques
Project evalaution techniques
 
Presentation
PresentationPresentation
Presentation
 
Pointers in c
Pointers in cPointers in c
Pointers in c
 
Peer to-peer
Peer to-peerPeer to-peer
Peer to-peer
 
Overview of current communications systems
Overview of current communications systemsOverview of current communications systems
Overview of current communications systems
 
Overall 23 11_2007_hdp
Overall 23 11_2007_hdpOverall 23 11_2007_hdp
Overall 23 11_2007_hdp
 
Objectives of budgeting
Objectives of budgetingObjectives of budgeting
Objectives of budgeting
 
Network management
Network managementNetwork management
Network management
 
Networing basics
Networing basicsNetworing basics
Networing basics
 
Loaders
LoadersLoaders
Loaders
 
Lists
ListsLists
Lists
 
Iris ngx next generation ip based switching platform
Iris ngx next generation ip based switching platformIris ngx next generation ip based switching platform
Iris ngx next generation ip based switching platform
 
Ip sec and ssl
Ip sec and  sslIp sec and  ssl
Ip sec and ssl
 
Ip security in i psec
Ip security in i psecIp security in i psec
Ip security in i psec
 
Intro to comp. hardware
Intro to comp. hardwareIntro to comp. hardware
Intro to comp. hardware
 
Heap sort
Heap sortHeap sort
Heap sort
 

Último

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 

Último (20)

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 

Cipher techniques

  • 2. Road Map  Basic Terminology  Cryptosystem  Classical Cryptography  Algorithm Types and Modes  Data Encryption Standard  Other Stream & Block Ciphers April 9, 2013 2
  • 3. Basic Terminology  plaintext - the original message  ciphertext - the coded message  cipher - algorithm for transforming plaintext to ciphertext  key - info used in cipher known only to sender/receiver  encipher (encrypt) - converting plaintext to ciphertext  decipher (decrypt) - recovering ciphertext from plaintext  cryptography - study of encryption principles/methods  cryptanalysis (codebreaking) - the study of principles/ methods of deciphering ciphertext without knowing key  cryptology - the field of both cryptography and cryptanalysis April 9, 2013 3
  • 4. Cryptosystem A cryptosystem is a five-tuple (P,C,K,E,D), where the following are satisfied: 1. P is a finite set of possible plaintexts. 2. C is a finite set of possible ciphertexts. 3. K, the key space, is a finite set of possible keys 4. ∀K∈K, ∃EK∈E (encryption rule), ∃DK∈D (decryption rule). Each EK: P→C and DK: C→P are functions such that ∀x∈P, DK(EK(x)) = x. April 9, 2013 4
  • 5. Cryptography  Cryptography  Symmetric / private key / single key  Asymmetric / public-key / two - key April 9, 2013 5
  • 8. Requirements  Two requirements for secure use of symmetric encryption:  a strong encryption algorithm  a secret key known only to sender / receiver Y = EK(X) X = DK(Y)  assume encryption algorithm is known  implies a secure channel to distribute key April 9, 2013 8
  • 9. Symmetric cryptography  Transposition Techniques  Substitution techniques  Caesar Cipher  Monoalphabetic Cipher  Polyalphabethic Cipher  Playfair Cipher April 9, 2013 9
  • 10. Types of Cryptanalytic Attacks adversary needs strongest attack  ciphertext only  only know algorithm / ciphertext, statistical, can identify plaintext, or worse: the key  known plaintext  know/suspect plaintext & ciphertext to attack cipher  chosen plaintext  select plaintext and obtain ciphertext to attack cipher  chosen ciphertext  select ciphertext and obtain plaintext to attack adversary’s attacks cipher can be weaker  chosen text April 9, 2013  select either plaintext or ciphertext to en/decrypt 10 to
  • 11. Brute Force Search  always possible to simply try every key  most basic attack, proportional to size of key space  assume either know / recognise plaintext April 9, 2013 11
  • 12. Transposition Ciphers  Consider classical transposition or permutation ciphers  these hide the message by rearranging the letter order  without altering the actual letters used  can recognise these since have the same frequency distribution as the original text April 9, 2013 12
  • 13. Rail Fence cipher  writemessage letters out diagonally over a number of rows  then read off cipher row by row  eg. write message out as: m e m a t r h t g p r y e t e f e t e o a a t  giving ciphertext MEMATRHTGPRYETEFETEOAAT April 9, 2013 13
  • 14. Row Transposition Ciphers a more complex scheme  write letters of message out in rows over a specified number of columns  then reorder the columns according to some key before reading off the rows Key: 4 3 1 2 5 6 7 Plaintext: a t t a c k p o s t p o n e d u n t i l t w o a m x y z Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ April 9, 2013 14
  • 15. Classical Substitution Ciphers  where letters of plaintext are replaced by other letters or by numbers or symbols  or if plaintext is viewed as a sequence of bits, then substitution involves replacing plaintext bit patterns with ciphertext bit patterns April 9, 2013 15
  • 16. Caesar Cipher  earliest known substitution cipher  by Julius Caesar  first attested use in military affairs  replaces each letter by 3rd letter after it  example: meet me after the toga party PHHW PH DIWHU WKH WRJD SDUWB April 9, 2013 16
  • 17. Caesar Cipher  can define transformation as: 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 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  mathematically give each letter a number a b c d e f g h i j k l m 0 1 2 3 4 5 6 7 8 9 10 11 12 n o p q r s t u v w x y Z 13 14 15 16 17 18 19 20 21 22 23 24 25  then have Caesar cipher as: C = E(p) = (p + k) mod (26) p = D(C) = (C – k) mod (26) April 9, 2013 17
  • 18. Monoalphabetic Cipher  rather than just shifting the alphabet  could shuffle (jumble) the letters arbitrarily  each plaintext letter maps to a different random ciphertext letter  hence key is 26 letters long Plain: abcdefghijklmnopqrstuvwxyz Cipher: DKVQFIBJWPESCXHTMYAUOLRGZN Plaintext: ifwewishtoreplaceletters Ciphertext: WIRFRWAJUHYFTSDVFSFUUFYA April 9, 2013 18
  • 19. Playfair Cipher  not even the large number of keys in a monoalphabetic cipher provides security  one approach to improving security was to encrypt multiple letters  the Playfair Cipher is an example  invented by Charles Wheatstone in 1854, but named after his friend Baron Playfair April 9, 2013 19
  • 20. Playfair Key Matrix  a 5X5 matrix of letters based on a keyword  (I and J aren’t distinguished)  fill in letters of keyword (sans duplicates)  fill rest of matrix with other letters  eg. using the keyword MONARCHY MONAR CHYBD EFGIK LPQST UVWXZ April 9, 2013 20
  • 21. Encrypting and Decrypting  plaintext encrypted two letters at a time: 1. each letter is replaced by the one in its row in the column of the other letter of the pair, eg. “hs" encrypts to "BP", and “ea" to "IM" or "JM" (as desired). Except when that doesn’t work! 2. if a pair is a repeated letter, insert a filler like 'X', eg. "balloon" transformed to "ba lx lo on" 3. if both letters fall in the same row, replace each with letter to right (wrapping back to start from end), eg. “ar" encrypts as "RM" 4. if both letters fall in the same column, replace each with the letter below it (again wrapping to top from bottom), eg. “mu" encrypts to "CM" April 9, 2013 21
  • 22. Polyalphabetic Ciphers  another approach to improving security is to use multiple cipher alphabets  called polyalphabetic substitution ciphers  makes cryptanalysis harder with more alphabets to guess and flatter frequency distribution  use a key to select which alphabet is used for each letter of the message  use each alphabet in turn  repeat from start after end of key is reached April 9, 2013 22
  • 23. Vigenère Cipher  simplest polyalphabetic substitution cipher is the Vigenère Cipher  effectively multiple caesar ciphers  key is multiple letters long K = k1 k2 ... kd  ith letter specifies ith alphabet to use  use each alphabet in turn  repeat from start after d letters in message  decryption simply works in reverse April 9, 2013 23
  • 24. Example  write the plaintext out  write the keyword repeated above it  use each key letter as a caesar cipher key  encrypt the corresponding plaintext letter  eg using keyword deceptive key: deceptivedeceptivedeceptive plaintext: wearediscoveredsaveyourself ciphertext:ZICVTWQNGRZGVTWAVZHCQYGLMGJ April 9, 2013 24
  • 25. Autokey Cipher  ideally want a key as long as the message  Vigenère proposed the autokey cipher  with keyword is prefixed to message as key  knowing keyword can recover the first few letters  use these in turn on the rest of the message  but still have frequency characteristics to attack  eg. given key deceptive key: deceptivewearediscoveredsav plaintext: wearediscoveredsaveyourself ciphertext:ZICVTWQNGKZEIIGASXSTSLVVWLA April 9, 2013 25
  • 26. One-Time Pad  ifa truly random key as long as the message is used, the cipher will be secure  called a One-Time pad  is unbreakable since ciphertext bears no statistical relationship to the plaintext  since for any plaintext & any ciphertext there exists a key mapping one to other  unconditional security! why look any further?? April 9, 2013 26
  • 27. Product Ciphers  ciphers using substitutions or transpositions are not secure because of language characteristics  hence consider using several ciphers in succession to make harder (Shannon)  two substitutions make a more complex substitution  two transpositions make more complex transposition  but a substitution followed by a transposition makes a new much harder cipher  this is bridge from classical to modern ciphers April 9, 2013 27
  • 28. Rotor Machines  before modern ciphers, rotor machines were most common product cipher  were widely used in WW2  German Enigma, Allied Hagelin, Japanese Purple  implemented a very complex, varying substitution cipher  used a series of cylinders, each giving one substitution, which rotated and changed after each letter was encrypted  with 3 cylinders have 263=17576 alphabets  3! rearrangements of cylinders in Enigma April 9, 2013 28
  • 29. Steganography  an alternative to encryption  hides existence of message  using only a subset of letters/words in a longer message marked in some way  using invisible ink  hiding in LSB in graphic image or sound file  has drawbacks  high overhead to hide relatively few info bits April 9, 2013 29
  • 30. Algorithm Types and Modes  An Algorithm type defines what size of plain text should be encrypted in each step of algorithm  An Algorithm mode defines the details of the cryptographic algorithm, once the type is decided. April 9, 2013 30
  • 31. Algorithm Types  Stream Ciphers  Block Ciphers Algorithm Modes  ElectronicCode Book Work On Block Cipher  Cipher Block Chaining  Cipher FeedBack Work On Block Ciphers acting as  Output FeedBack Stream Cipher April 9, 2013 31
  • 32. Stream, Block Ciphers  E encipherment function  Ek(b) encipherment of message b with key k  In what follows, m = b1b2 …, each bi of fixed length  Block cipher  Ek(m) = Ek(b1)Ek(b2) …  Stream cipher  k = k1k2 …  Ek(m) = Ek1(b1)Ek2(b2) …  If k1k2 … repeats itself, cipher is periodic and the kength of its period is one cycle of k1k2 … April 9, 2013 32
  • 33. Stream Ciphers  Often (try to) implement one-time pad by xor’ing each bit of key with one bit of message  Example: m = 00101 k = 10010 c = 10111  But how to generate a good key? April 9, 2013 33
  • 34. Synchronous Stream Ciphers  n-stage Linear Feedback Shift Register: consists of  n bit register r = r0…rn–1  n bit tap sequence t = t0…tn–1  Use:  Use rn–1 as key bit  Compute x = r0t0 ⊕ … ⊕ rn–1tn–1  Shift r one bit to right, dropping rn–1, x becomes r0 April 9, 2013 34
  • 35. Operation … r0 … rn–1 ⊕ bi … ci r0´ … rn–1´ ri´ = ri–1, 0<i≤n r0t0 + … + rn–1tn–1 April 9, 2013 35
  • 36. Example  4-stage LFSR; t = 1001 r ki new bit computation new r 0010 0 01⊕00⊕10⊕01 = 0 0001 0001 1 01⊕00⊕00⊕11 = 1 1000 1000 0 11⊕00⊕00⊕01 = 1 1100 1100 0 11⊕10⊕00⊕01 = 1 1110 1110 0 11⊕10⊕10⊕01 = 1 1111 1111 1 11⊕10⊕10⊕11 = 0 0111 0111 1 11⊕10⊕10⊕11 = 1 1011  Key sequence has period of 15 (010001111010110) April 9, 2013 36
  • 37. NLFSR  n-stage Non-Linear Feedback Shift Register: consists of  n bit register r = r0…rn–1  Use:  Use rn–1 as key bit  Compute x = f(r0, …, rn–1); f is any function  Shift r one bit to right, dropping rn–1, x becomes r0 Note same operation as LFSR but more general bit replacement function April 9, 2013 37
  • 38. Example  4-stage NLFSR; f(r0, r1, r2, r3) = (r0 & r2) | r3 r ki new bit computation new r 1100 0 (1 & 0) | 0 = 0 0110 0110 0 (0 & 1) | 0 = 0 0011 0011 1 (0 & 1) | 1 = 1 1001 1001 1 (1 & 0) | 1 = 1 1100 1100 0 (1 & 0) | 0 = 0 0110 0110 April 9, 2013 0 (0 & 1) | 0 = 0 38 0011
  • 39. Self-Synchronous Stream Cipher  Takekey from message itself (autokey)  Example: Vigenère, key drawn from plaintext  key XTHEBOYHASTHEBA  plaintext THEBOYHASTHEBAG  ciphertext QALFPNFHSLALFCT  Problem:  Statistical regularities in plaintext show in key  Once you get any part of the message, you can decipher more April 9, 2013 39
  • 40. Another Example  Take key from ciphertext (autokey)  Example: Vigenère, key drawn from ciphertext  key XQXBCQOVVNGNRTT  plaintext THEBOYHASTHEBAG  ciphertext QXBCQOVVNGNRTTM  Problem:  Attacker gets key along with ciphertext, so deciphering is trivial April 9, 2013 40
  • 41. Block Cipher  Block Cipher – treat a block of plaintext as a whole  Feistel Cipher  DES/3DES/AES  Stream coding – encrypt one bit or byte at a time April 9, 2013 41
  • 42. Block Ciphers  Encipher, decipher multiple bits at once  Each block enciphered independently  Problem: identical plaintext blocks produce identical ciphertext blocks  Example: two database records  MEMBER: HOLLY INCOME $100,000  MEMBER: HEIDI INCOME $100,000  Encipherment:  ABCQZRME GHQMRSIB CTXUVYSS RMGRPFQN  ABCQZRME ORMPABRZ CTXUVYSS RMGRPFQN April 9, 2013 42
  • 43. Solutions  Insert information about block’s position into the plaintext block, then encipher  Cipher block chaining:  Exclusive-or current plaintext block with previous ciphertext block:  c0 = Ek(m0 ⊕ I)  ci = Ek(mi ⊕ ci–1) for i > 0 where I is the initialization vector April 9, 2013 43
  • 44. Algorithm Modes  ElectronicCode Book Work On Block Cipher  Cipher Block Chaining  Cipher FeedBack Work On Block Ciphers acting as  Output FeedBack Stream Cipher April 9, 2013 44
  • 45. ECB (Electronic CodeBook) Mode  Encryption: for 1≤j≤t, cj <= EK(xj).  Decryption: for 1≤j≤t, xj <= DK(cj).  Identical plaintext (under the same key) result in identical ciphertext  blocks are enciphered independently of other blocks  bit errors in a single ciphertext affect decipherment of that block only April 9, 2013 45
  • 46. ECB Mode (Cont’d) xj n key E E-1 key n x’j = xj cj encipherment decipherment April 9, 2013 46
  • 47. CBC (Cipher-Block Chaining) Mode C0=IV Cj C j-1 n key xj ⊕ E-1 ⊕ C j-1 key E Cj <Encipherment> n X’j = xj <Decipherment> April 9, 2013 47
  • 48. CBC Mode (Cont’d)  Encryption: c0 ← IV, cj ← EK(cj−1⊕ xj)  Decryption: c0 ← IV, xj ← cj−1 ⊕ E−1K(cj)  chaining causes ciphertext cj to depend on all preceding plaintext  a single bit error in cj affects decipherment of blocks cj and cj+1  self-synchronizing: error cj (not cj+1, cj+2) is correctly decrypted to xj+2. April 9, 2013 48
  • 49. CFB-r(Cipher FeedBack) Mode r-bit Shift r-bit Shift I1=IV key E key E leftmost r bits Oj leftmost r bits Oj xj ci ci xj Encipherment Decipherment April 9, 2013 49
  • 50. OFB(Output FeedBack) Mode with full(or r-bit) feedback Ij r-bit Shift Ij r-bit Shift I1=IV key E key E Leftmost r-bits Oj Leftmost r-bits Oj xj cj cj xj Encipherment Deciphering April 9, 2013 50
  • 51. Data Encryption Standard The Data Encryption Standard (DES) specifies a FIPS approved cryptographic algorithm as required by FIPS 140-1.(Federal Information Processing Standards 140-1) April 9, 2013 51
  • 53. Enciphering  The 64 bits of the input block to be enciphered are first subjected to the following initial permutation IP: April 9, 2013 53
  • 54.  IP 58 50 42 34 26 18 10 2 60 52 44 36 28 20 12 4 62 54 46 38 30 22 14 6 64 56 48 40 32 24 16 8 57 49 41 33 25 17 9 1 59 51 43 35 27 19 11 3 61 53 45 37 29 21 13 5 63 55 47 39 31 23 15 7 April 9, 2013 54
  • 55.  The permuted input block is then the input to a complex key-dependent computation.  The output of that computation (preoutput) is then subjected to the next permutation which is the inverse of the initial permutation. April 9, 2013 55
  • 56.  IP-1 40 8 48 16 56 24 64 32 39 7 47 15 55 23 63 31 38 6 46 14 54 22 62 30 37 5 45 13 53 21 61 29 36 4 44 12 52 20 60 28 35 3 43 11 51 19 59 27 34 2 42 10 50 18 58 26 33 1 41 9 49 17 57 25 April 9, 2013 56
  • 57.  Let K be a block of 48 bits chosen from the 64-bit (how? explained next). Then the output L'R' of an iteration with input LR is defined by: L' = R R' = L (+) f (R,K)  L'R' is the output of the 16th iteration then R'L' is the preoutput block. April 9, 2013 57
  • 58. One round of DES April 9, 2013 58
  • 60.  PC-1 (Key Permutation) 57 49 41 33 25 17 9 1 58 50 42 34 26 18 10 2 59 51 43 35 27 19 11 3 60 52 44 36 63 55 47 39 31 23 15 7 62 54 46 38 30 22 14 6 61 53 45 37 29 21 13 5 28 20 12 4 April 9, 2013 60
  • 61.  Iteration corresponds to left shifts: 1 2 3 4 5 6 7 8 1 1 2 2 2 2 2 2 9 10 11 12 13 14 15 16 1 2 2 2 2 2 2 1 April 9, 2013 61
  • 62.  PC-2 (Compression Permutation) 14 17 11 24 1 5 3 28 15 6 21 10 23 19 12 4 26 8 16 7 27 20 13 2 41 52 31 37 47 55 30 40 51 45 33 48 44 49 39 56 34 53 46 42 50 36 29 32 April 9, 2013 62
  • 63. One round of DES April 9, 2013 63
  • 64.  The Cipher Function f : A sketch of the calculation of f (R, K) is given by April 9, 2013 64
  • 65. Expansion Permutation 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 111213 14 15 16 April 9, 2013 65
  • 66. E bit-selection table 32 1 2 3 4 5 4 5 6 7 8 9 8 9 10 11 12 13 12 13 14 15 16 17 16 17 18 19 20 21 20 21 22 23 24 25 24 25 26 27 28 29 28 29 30 31 32 1 April 9, 2013 66
  • 67. One round of DES April 9, 2013 67
  • 68. S 1 14 4 13 1 2 15 11 8 3 10 6 12 5 9 0 7 O 15 7 4 14 2 13 1 10 6 12 11 9 5 3 8 4 1 14 8 13 6 2 11 15 12 9 7 3 10 5 0 15 12 8 2 4 9 1 7 5 11 3 14 10 O 6 13 S 2 15 1 8 14 6 11 3 4 9 7 2 13 12 O 5 10 3 13 4 7 15 2 8 14 12 0 1 10 6 9 11 5 0 14 7 11 10 4 13 1 5 8 12 6 9 3 2 15 13 8 10 1 3 15 4 2 11 6 7 12 0 5 14 9 April 9, 2013 68
  • 69. S 3 10 0 9 14 6 3 15 5 1 13 12 7 11 4 2 8 13 7 O 9 3 4 6 10 2 8 5 14 12 11 15 1 13 6 4 9 8 15 3 0 11 1 2 12 5 10 14 7 1 10 13 0 6 9 8 7 4 15 14 3 11 5 2 12 S 4 7 13 14 3 0 6 9 10 1 2 8 5 11 12 4 15 13 8 11 5 6 15 O 3 4 7 2 12 1 10 14 9 10 6 9 0 12 11 7 13 15 1 3 14 5 2 8 4 3 15 O 6 10 1 13 8 9 4 5 11 12 7 2 14 April 9, 2013 69
  • 70. S 5 2 12 4 1 7 10 11 6 8 5 3 15 13 O 14 9 14 11 2 12 4 7 13 1 5 0 15 10 3 9 8 6 4 2 1 11 10 13 7 8 15 9 12 5 6 3 O 14 11 8 12 7 1 14 2 13 6 15 O 9 10 4 5 3 S 6 12 1 10 15 9 2 6 8 O 13 3 4 14 7 5 11 10 15 4 2 7 12 9 5 6 1 13 14 O 11 3 8 9 14 15 5 2 8 12 3 7 0 4 10 1 13 11 6 4 3 2 12 9 5 15 10 11 14 1 7 6 0 8 13 April 9, 2013 70
  • 71. S 7 4 11 2 14 15 0 8 13 3 12 9 7 5 10 6 1 13 0 11 7 4 9 1 10 14 3 5 12 2 15 8 6 1 4 11 13 12 3 7 14 10 15 6 8 0 5 9 2 6 11 13 8 1 4 10 7 9 5 0 15 14 2 3 12 S 8 13 2 8 4 6 15 11 1 10 9 3 14 5 0 12 7 1 15 13 8 10 3 7 4 12 5 6 11 0 14 9 2 7 11 4 1 9 12 14 2 0 6 10 13 15 3 5 8 2 1 14 7 4 10 8 13 15 12 9 0 3 5 6 11 April 9, 2013 71
  • 72. S1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 14 4 13 1 2 15 11 8 3 10 6 12 5 9 0 7 1 0 15 7 4 14 2 13 1 10 6 12 11 9 5 3 8 2 4 1 14 8 13 6 2 11 15 12 9 7 3 10 5 0 3 15 12 8 2 4 9 1 7 5 11 3 14 10 0 6 13  For example, for input 011011 the row is 01, that is row 1, and the column is determined by 1101, that is column 13. In row 1 column 13 appears 5 so that the output is 0101. April 9, 2013 72
  • 73. One round of DES April 9, 2013 73
  • 74.  The permutation function P yields a 32- bit output from a 32-bit input by permuting the bits of the input block P 16 7 20 21 29 12 28 17 1 15 23 26 5 18 31 10 2 8 24 14 32 27 3 9 19 13 30 6 22 11 4 25 April 9, 2013 74
  • 75. Primitive functions for the data encryption algorithm  The choice of the primitive functions KS, S1, ..., S8 and P is critical to the strength of an encipherment resulting from the algorithm  The recommended set of functions are described as S1, ..., S8 and P in the algorithm. April 9, 2013 75
  • 76. Deciphering  The permutation IP-1 applied to the preoutput block is the inverse of the initial permutation IP applied to the input.  R = L' L = R' (+) f (L', K) April 9, 2013 76
  • 77. Other Stream Ciphers  RC4  Variable key size stream cipher  Proprietary for 7 years (1987 - 1994)  In 1994 source code was posted to mailing list  Works in OFB  Encryption is 10 times faster than DES  SEAL (Software-optimized Encryption ALgorithm)  length-increasing pseudorandom function which maps a 32-bit sequence number n to an L-bit keystream under control of a 160-bit secret key a  In the preprocessing stage, the key is stretched into larger tables using the table-generation function Ga (based on SHA-1)  Subsequent to this preprocessing, keystream generation requires about 5 machine instructions per byte  order of magnitude faster than DES April 9, 2013 77
  • 78. Other Block Ciphers  FEAL  Fast N-round block cipher  Suffers a lot of attacks, and hence introduce new attacks on block ciphers  Japan standard  IDEA  64-64-128-8  James Massey  Using algebraic functions (mult mod 2n+1, add mod 2n)  SAFER, RC-5, AES April 9, 2013 78
  • 79. Thank You reachable at naasir_k@donboscoit.ac.in April 9, 2013 79

Notas do Editor

  1. Briefly review some terminology used throughout the course.
  2. Detail 5 ingredients of the symmetric cipher model: plaintext encryption algorithm – performs substitutions/transformations on plaintext secret key – control exact substitutions/transformations used in encryption algorithm ciphertext decryption algorithm – inverse of encryption algorithm
  3. Basert på enveis funksjoner Offentlige nøkler kan sender over usikret media, mens private nøkler skal holdes hemmelige. Forskjell fra symmetrisk pga privat skal kun 1 person vite mens ved secret er det flere enn 1 person som kjenner til nøklen. Vanskeligheten ligger i sikker utveksling av offentlig nøkkel Hvem som helst kan lese det som krypteres med privat nøkkel (autentisering) Bare eier av den private nøkkel kan lese det som krypteres med den offentlige nøkkelen (kryptering) RSA. Diffie-Hellman
  4. Generally assume that the algorithm is known. This allows easy distribution of s/w and h/w implementations. Hence assume just keeping key secret is sufficient to secure encrypted messages. Have plaintext X, ciphertext Y, key K, encryption alg Ek, decryption alg Dk.
  5. Deep crack, EFF ’98: 88x10^9 encr/s -&gt; approx 5 days. They solved a 56 bit key in 3 days.
  6. Transposition Ciphers form the second basic building block of ciphers. The core idea is to rearrange the order of basic units (letters/bytes/bits) without altering their actual values.
  7. Example message is: &quot;meet me after the toga party&quot; with a rail fence of depth 2. How do you cryptanalyze this? Freq analysis shows expected distribution with expected letters, so you have to suspect transpositions
  8. Transposition ciphers often are block ciphers…
  9. In this section and the next, we examine a sampling of what might be called classical encryption techniques. A study of these techniques enables us to illustrate the basic approaches to symmetric encryption used today and the types of cryptanalytic attacks that must be anticipated. The two basic building blocks of all encryption techniques: substitution and transposition. We examine these in the next two sections. Finally, we discuss a system that combine both substitution and transposition.
  10. Substitution ciphers form the first of the fundamental building blocks. The core idea is to replace one basic unit (letter/byte) with another. Whilst the early Greeks described several substitution ciphers, the first attested use in military affairs of one was by Julius Caesar, described by him in Gallic Wars (cf. Kahn pp83-84). Still call any cipher using a simple letter shift a caesar cipher , not just those with shift 3. Note: when letters are involved, the following conventions are used in this course: Plaintext is always in lowercase; ciphertext is in uppercase; key values are in italicized lowercase.
  11. This mathematical description uses modulo arithmetic (ie clock arithmetic). Here, when you reach Z you go back to A and start again. Mod 26 implies that when you reach 26, you use 0 instead (ie the letter after Z, or 25 + 1 goes to A or 0). Example: howdy (7,14,22,3,24) encrypted using key f (5) is MTBID
  12. Definition: each character is independently encrypted (hence, a single rewriting alphabet is used)
  13. Consider ways to reduce the &quot;spikyness&quot; of natural language text, since if just map one letter always to another, the frequency distribution is just shuffled. One approach is to encrypt more than one letter at once. Playfair cipher is an example of doing this.
  14. Have here the rules for filling in the 5x5 matrix, L to R, top to bottom, first with keyword after duplicate letters have been removed, and then with the remain letters, with I/J used as a single letter. This example comes from Dorothy Sayer&apos;s book &quot;Have His Carcase&quot;, in which Lord Peter Wimsey solves this, and describes the use of a probably word attack.
  15. Note the various rules, and how you wrap from right side back to left, or from bottom back to top. Decrypting of course works exactly in reverse. Can see this by working the example pairs shown, backwards.
  16. One approach to reducing the &quot;spikyness&quot; of natural language text is used the Playfair cipher which encrypts more than one letter at once. We now consider the other alternative, using multiple cipher alphabets in turn. This gives the attacker more work, since many alphabets need to be guessed, and because the frequency distribution is more complex, since the same plaintext letter could be replaced by several ciphertext letters, depending on which alphabet is used. Definition: nonmonoalphabetic
  17. Simply create a set of caesar cipher translation alphabets, then use each in turn, as shown next.
  18. See that the key used is the keyword &quot;DECEPTIVE&quot; prefixed to as much of the message &quot;WEAREDISCOVEREDSAV&quot; as is needed. When deciphering, recover the first 9 letters using the keyword &quot;DECEPTIVE&quot;. Then instead of repeating the keyword, start using the recovered letters from the message &quot;WEAREDISC&quot;. As recover more letters, have more of key to recover later letters. Problem is that the same language characteristics are used by the key as the message. ie. a key of &apos;E&apos; will be used more often than a &apos;T&apos; etc hence an &apos;E&apos; encrypted with a key of &apos;E&apos; occurs with probability (0.1275)^2 = 0.01663, about twice as often as a &apos;T&apos; encrypted with a key of &apos;T&apos; have to use a larger frequency table, but it exists given sufficient ciphertext this can be broken.
  19. The One-Time Pad is an evolution of the Vernham cipher, which was invented by Gilbert Vernham in 1918, and used a long tape of random letters to encrypt the message. An Army Signal Corp officer, Joseph Mauborgne, proposed an improvement using a random key that was truly as long as the message, with no repetitions, which thus totally obscures the original message. Since any plaintext can be mapped to any ciphertext given some key, there is simply no way to determine which plaintext corresponds to a specific instance of ciphertext. Can only use once though. Still have problem of safe distribution of key
  20. Decryption of Enigma. Allies knew wiring by intercepting documents, but didn’t know the most current settings. Daily, Germans transmitted new settings in a way that reliably repeated some plaintext. Turing and others at Bletchley figured out how to use this to figure out settings. Using a huge amount of equipment and personnel they at times (not always) were able to decrypt transmissions within hours. This effort was just barely working – by adopting a little more hassle, the Germans could have made the numbers way too big for this decryption approach to work. But the Germans thought it was infeasible already.
  21. Wildly unsubstantiated claims in Sept 2001 that Al-Qaeda had been using steganography in public bulletin board systems to communicate -- pretty silly, since we didn’t even know who the terrorists were!
  22. Now let me explain modes of operation, Federal Information Processing Standards Publications (FIPS PUBS 81) This FIPS defines four modes of operation for the DES which may be used in a wide variety of applications. The modes specify how data will be encrypted (cryptographically protected) and decrypted (returned to original form). This recommendation specifies five confidentiality modes of operation for symmetric key block cipher algorithms, such as the algorithm specified in FIPS Pub. 197, the Advanced Encryption Standard (AES) [2]. The modes may be used in conjunction with any symmetric key block cipher algorithm that is approved by a Federal Information Processing Standard (FIPS). The five modes—the Electronic Codebook (ECB), Cipher Block Chaining (CBC), Cipher Feedback (CFB), Output Feedback (OFB), and Counter (CTR) modes—can provide data confidentiality.
  23. There are two recommended methods for generating unpredictable IVs. The first method is to apply the forward cipher function, under the same key that is used for the encryption of the plaintext, to a nonce. The nonce must be a data block that is unique to each execution of the encryption operation. For example, the nonce may be a counter,or a message number. The second method is to generate a random data block using a FIPS-approved random number generator.
  24. Let E denote a function which takes a block of 32 bits as input and yields a block of 48 bits as output. Let E be such that the 48 bits of its output, written as 8 blocks of 6 bits each, are obtained by selecting the bits in its inputs in order according to the following table: Each of the unique selection functions S1,S2,...,S8, takes a 6-bit block as input and yields a 4-bit block as output and is illustrated by using a table containing the recommended S1: