1 / 54

Class Assignment

Double Transposition Encryption Encrypt and decrypt the message we are all together using a double transposition cipher with the following key:  matrix 4×4 , row permutation (1,2,3,4) → (2,4,1,3) and Column permutation (1,2,3,4) → (3,1,2,4). Class Assignment. Home Assignment.

aislin
Download Presentation

Class Assignment

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Double Transposition Encryption Encrypt and decrypt the message we are all together using a double transposition cipher with the following key: matrix 4×4, row permutation (1,2,3,4) → (2,4,1,3) and Column permutation (1,2,3,4) → (3,1,2,4). Class Assignment Home Assignment

  2. http://usmantariq.org/support/ Student Help Desk

  3. Data Encryption Standard (DES)

  4. INTRODUCTION The Data Encryption Standard (DES) is a symmetric-key block cipher published by the National Institute of Standards and Technology (NIST). Symmetric-key encryption are secret-key, single-key, shared-key, one-key, and private-key encryption.

  5. History In 1973, NIST published a request for proposals for a national symmetric-key cryptosystem. A proposal from IBM, a modification of a project called Lucifer, was accepted as DES. DES was published in the Federal Register in March 1975 as a draft of the Federal Information Processing Standard (FIPS).

  6. Overview DES is a block cipher, as shown in Figure. Encryption and decryption with DES

  7. It is a symmetric key cipher operating on fixed-length groups of bits, called blocks, with an unvarying transformation. Encryption A block cipher encryption algorithm might take (for example) a 128-bit block of plaintext as input, and output a corresponding 128-bit block of ciphertext. The exact transformation is controlled using a second input — the secret key. Decryption Decryption is similar: the decryption algorithm takes, in this example, a 128-bit block of ciphertext together with the secret key, and yields the original 128-bit block of plaintext. Block ciphers Rr ÅF(kr,Lr) =Rr ÅF(kr,Rr-1) =Rr Å(Rr ÅLr-1) =Lr-1.

  8. As there are over 70,000,000,000,000,000 (seventy quadrillion) possible keys of 56 bits, the feasibility of deriving a particular key in this way is extremely unlikely in typical threat environments Why 56 bit key?

  9. DES Structure • The encryption process is made of two permutations (P-boxes), which we call • initial and final permutations, • and sixteen Feistel rounds. Permutation: A particular order in which things are arranged.

  10. Permutationisan operation performed by a function, which moves an element at place j to the place k. The key-dependentcomputation can be simply defined in terms of a function f, called the cipher function, and a function KS, called the key schedule. Permutation ?

  11. Continue General structure of DES Eight bits are used solely for checking parity, and are thereafter discarded. Every 8th bit of the selected key is discarded, i.e. positions 8, 16, 24, 32, 40, 48, 56, 64 are removed from the 64 bit key leaving behind only the 56 bit key. In mathematics, parity refers to the evenness or oddness of an integer, which for a binary number is determined only by the least significant bit. 

  12. Example: Transmission sent using even parity

  13. Initial and Final Permutations Figure Initial and finalpermutation steps in DES

  14. Continue Table Initial and final permutation tables

  15. Rounds DES uses 16 rounds. Each round of DES is a Feistel cipher. Figure A round in DES (encryption site)

  16. Feistel Cipher

  17. block size increasing size improves security, but slows cipher key size increasing size improves security, makes exhaustive key searching harder, but may slow cipher number of rounds increasing number improves security, but slows cipher subkey generation greater complexity can make analysis harder, but slows cipher round function greater complexity can make analysis harder, but slows cipher fast software en/decryption & ease of analysis are more recent concerns for practical use and testing Feistel Cipher Design Principles

  18. Feistel Cipher

  19. Continued DES Function The heart of DES is the DES function. The DES function applies a 48-bit key to the rightmost 32 bits to produce a 32-bit output. Figure DES function

  20. 8 S-boxes Each S-Box mapps 6 to 4 bits outer bits 1 & 6 (row bits) select the row inner bits 2-5 (col bits) select the column For example, in S1, for input 011001, the row is 01 (row 1) the column is 1100 (column 12). The value in row 1, column 12 is 9 The output is 1001. result is 8 X 4 bits, or 32 bits Substitution Boxes

  21. Substitution Table

  22. Continue Expansion P-box Since RI−1 is a 32-bit input and KI is a 48-bit key, we first need to expand RI−1 to 48 bits. Figure Expansion permutation

  23. Round Function

  24. Continue • Whitener (XOR) • After the expansion permutation, DES uses the XOR operation on the expanded right section and the round key. • Note that both the right section and the key are 48-bits in length. • Also note that the round key is used only in this operation.

  25. Continue S-Boxes The S-boxes do the real mixing (confusion). DES uses 8 S-boxes, each with a 6-bit input and a 4-bit output. See Figure Figure S-boxes

  26. Continue Figure 6.8 S-box rule

  27. Continue Table 6.3 shows the permutation for S-box 1 Table 6.3 S-box 1

  28. Continued Example 6.3 The input to S-box 1 is 100011. What is the output? Solution If we write the first and the sixth bits together, we get 11 in binary, which is 3 in decimal. The remaining bits are 0001 in binary, which is 1 in decimal. We look for the value in row 3, column 1, in Table. The result is 12 in decimal, which in binary is 1100. So the input 100011 yields the output 1100.

  29. Continued Example 6.4 The input to S-box 8 is 000000. What is the output? Solution If we write the first and the sixth bits together, we get 00 in binary, which is 0 in decimal. The remaining bits are 0000 in binary, which is 0 in decimal. We look for the value in row 0, column 0, in Table . The result is 14 in decimal, which is 1110 in binary. So the input 000000 yields the output 1110.

  30. 56-bit keys have 256 = 7.2 x 1016 values brute force search looks hard recent advances have shown is possible in 1997 on Internet in a few months in 1998 on dedicated hardware (EFF) in a few days in 1999 above combined in 22hrs! still must be able to recognize plaintext now considering alternatives to DES Strength of DES – Key Size

  31. 6.2.3 Cipher and Reverse Cipher Note Using mixers and swappers, we can create the cipher and reverse cipher, each having 16 rounds. First Approach To achieve this goal, one approach is to make the last round (round 16) different from the others; it has only a mixer and no swapper. In the first approach, there is no swapper in the last round.

  32. 6.2.3Continued Figure 6.9 DES cipher and reverse cipher for the first approach

  33. 6.2.3Continued Algorithm 6.1 Pseudocode for DES cipher

  34. 6.2.3Continued Algorithm 6.1 Pseudocode for DES cipher (Continued)

  35. 6.2.3Continued Algorithm 6.1 Pseudocode for DES cipher (Continued)

  36. 6.2.3Continued Algorithm 6.1 Pseudocode for DES cipher (Continued)

  37. 6.2.3Continued Alternative Approach We can make all 16 rounds the same by including one swapper to the 16th round and add an extra swapper after that (two swappers cancel the effect of each other). Key Generation The round-key generator creates sixteen 48-bit keys out of a 56-bit cipher key.

  38. Monday, 14 March, 2011

  39. 6.2.3Continued Figure 6.10Key generation

  40. 6-3 DES ANALYSIS Critics have used a strong magnifier to analyze DES. Tests have been done to measure the strength of some desired properties in a block cipher. Topics discussed in this section: 6.3.1 Properties6.3.2 Design Criteria 6.3.3 DES Weaknesses

  41. 6.3.1 Properties Two desired properties of a block cipher are the avalanche effect and the completeness. The avalanche effect is evident if, when an input is changed slightly (for example, flipping a single bit) the output changes significantly Example To check the avalanche effect in DES, let us encrypt two plaintext blocks (with the same key) that differ only in one bit and observe the differences in the number of bits in each round.

  42. 6.3.1Continued Example 6.7 Continued Although the two plaintext blocks differ only in the rightmost bit, the ciphertext blocks differ in 29 bits. This means that changing approximately 1.5 percent of the plaintext creates a hange of approximately 45 percent in the ciphertext. Table 6.17 Number of bit differences for Example 6.7

  43. 6.3.1Continued Completeness effect Completeness effect means that each bit of the ciphertext needs to depend on many bits on the plaintext.

  44. 6.3.2 Design Criteria S-Boxe The design provides confusion and diffusion of bits from each round to the next. P-Boxes They provide diffusion of bits. Number of Rounds DES uses sixteen rounds of Feistel ciphers. the ciphertext is thoroughly a random function of plaintext and ciphertext.

  45. 6.3.3 DES Weaknesses During the last few years critics have found some weaknesses in DES. Weaknesses in Cipher Design 1. Weaknesses in S-boxes 2. Weaknesses in P-boxes 3. Weaknesses in Key

  46. 6.3.3Continued Example 6.8 Let us try the first weak key in Table 6.18 to encrypt a block two times. After two encryptions with the same key the original plaintext block is created. Note that we have used the encryption algorithm two times, not one encryption followed by another decryption.

  47. 6.3.3Continued Figure 6.11 Double encryption and decryption with a weak key

  48. 6.3.3Continued

  49. 6.3.3Continued

  50. 6.3.3Continued Figure 6.12 A pair of semi-weak keys in encryption and decryption

More Related