Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

  64 bit data block   64 bit key of which 56 bits are used.   Uses 16 rounds   A round consists of   Reordering bits   XORing with the key   Run the Feistel function   Swapping the data block halves

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

  Methods   DES::algorithm( .. )   DES::keyschedule( .. )   DES::mixer( .. )   DES::f(..)   Implemented in C++   --std=c99   Uses OOP Design

Slide 5

Slide 5 text

  Schedule’s all 16 key’s   Initial Permutation   For each round   Choose key for round   Run Feistel function   Cross over halves of key’s   Inverse Initial Permutation

Slide 6

Slide 6 text

  Permutation Choice #1   For each round   Shift bits N times   Permutation Choice #2   Store key for this round

Slide 7

Slide 7 text

  Rearrange the order of bit’s based on the given parameters.   General use function, total of 6 different permutations that are performed on the key or data block in DES. /* IP defined on pg: 14 */ InitialPermutation[]= { 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 };

Slide 8

Slide 8 text

  Expansion Permutation on data block   XOR Expanded data with Subkey   For each S-Box   Run selected bits through   Primitive Permutation on combined S-Box output

Slide 9

Slide 9 text

Average over 3 runs of 1 Million encryptions: 10.879 seconds

Slide 10

Slide 10 text

  Loop unrolling of all permutations   Manual function in lining   Where ever mixer was called we in lined the permutation   While unrolling we discovered that in some places we could combine multiple steps to reduce the amount of times we iterate through the data.

Slide 11

Slide 11 text

Average over 3 runs of 1 Million encryptions: 5.958 seconds

Slide 12

Slide 12 text

  Before 44 seconds   f() = 22.88%   keyschedule() = 20.2%   algorithm() = 8.2%   mixer() = 40.9   get() = 5.6%   After 14.2 seconds   f() = 42.9%   keyschedule() = 24.4%   algorithm() = 24.2%   N/A   N/A

Slide 13

Slide 13 text

  How easy it is to make a critical mistake in cryptography.   There are definitely security flaws in our implementation which would probably make it unusable for actual serious cryptography.  

Slide 14

Slide 14 text

  A few more loops could be unrolled.   It would be really ugly   It would be very complicated.   It would be possible to inline all functions   Not really a clean implementation, not positive how much would be gained   Change from operations on individual array’s of bits to operations on entire bytes (ex. Skein implementation)   Feistel function may be optimizable, not sure how.