CPTR 427 Programming DES. Outline Top Level Design Design Decisions Operations to write Putting it together.

Slides:



Advertisements
Similar presentations
6.1.2 Overview DES is a block cipher, as shown in Figure 6.1.
Advertisements

6.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 2 Data Encryption Standard (DES)
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
1 Lecture 3: Secret Key Cryptography Outline concepts DES IDEA AES.
Cryptography and Network Security Chapter 5 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Cryptography and Network Security Chapter 5
Cryptography and Network Security Chapter 3
Rachana Y. Patil 1 Data Encryption Standard (DES) (DES)
Data Encryption Standard (DES)
Cryptography and Network Security
Cryptography1 CPSC 3730 Cryptography Chapter 3 DES.
Simplified DES CS-480b Network Security Dick Steflik.
AES clear a replacement for DES was needed
DES 1 Data Encryption Standard DES 2 Data Encryption Standard  DES developed in 1970’s  Based on IBM Lucifer cipher  U.S. government standard  DES.
1 Chapter 3 – Block Ciphers and the Data Encryption Standard Modern Block Ciphers  now look at modern block ciphers  one of the most widely used types.
1 Chapter 3 – Block Ciphers and the Data Encryption Standard Modern Block Ciphers  now look at modern block ciphers  one of the most widely used types.
ICS 454: Principles of Cryptography
Cryptography and Network Security Chapter 5. Chapter 5 –Advanced Encryption Standard "It seems very simple." "It is very simple. But if you don't know.
Cryptography and Network Security Chapter 5 Fourth Edition by William Stallings.
ICS 454 Principles of Cryptography Advanced Encryption Standard (AES) (AES) Sultan Almuhammadi.
Lecture 23 Symmetric Encryption
Dr. Lo’ai Tawalbeh 2007 Chapter 5: Advanced Encryption Standard (AES) Dr. Lo’ai Tawalbeh New York Institute of Technology (NYIT) Jordan’s Campus.
Data Encryption Standard (DES). Symmetric Cryptography  C = E(P,K)  P = D(C,K)  Requirements  Given C, the only way to obtain P should be with  the.
The Digital Encryption Standard CSCI 5857: Encoding and Encryption.
Frank Rowe John Gaetano Chuck Figiel.  CryptoViz implements and visualizes the Data Encryption Standard (DES) algorithm.  DES was used by the government.
A Cryptography Education Tool Anna Yu Department of Computer Science College of Engineering North Carolina A&T State University June 18, 2009.
Dr. Khalid A. Kaabneh Amman Arab University
Chapter 5 Advanced Encryption Standard. Origins clear a replacement for DES was needed –have theoretical attacks that can break it –have demonstrated.
1 University of Palestine Information Security Principles ITGD 2202 Ms. Eman Alajrami 2 nd Semester
Cryptography and Network Security
Chapter 5 –Advanced Encryption Standard "It seems very simple." "It is very simple. But if you don't know what the key is it's virtually indecipherable."
CSCI 5857: Encoding and Encryption
Cryptography and Network Security Chapter 3. Modern Block Ciphers  now look at modern block ciphers  one of the most widely used types of cryptographic.
1 Chapter 3 Ciphers Mechanism that decides the process of encryption/decryption Stream Cipher: Bit-by-bit encryption / decryption Block Cipher: Block-by-block.
TE/CS 536 Network Security Spring 2006 – Lectures 6&7 Secret Key Cryptography.
Feistel Cipher Structure
Simplified DES Cryptography and Network Security
Cryptography Team Presentation 2
Lecture 3 Page 1 Advanced Network Security Review of Cryptography Advanced Network Security Peter Reiher August, 2014.
Classical &ontemporyryptology 1 Block Cipher Today’s most widely used ciphers are in the class of Block Ciphers Today’s most widely used ciphers are in.
DES Algorithm Data Encryption Standard. DES Features Block cipher, 64 bits per block 64-bit key, with only 56 bits effective ECB mode and CBC mode.
“Implementation of a RC5 block cipher algorithm and implementing an attack on it” Cryptography Team Presentation 1.
‘Baby DES’ cipher Alexei Vernitski. Block cipher A message is a sequence of bits: … We split the message in blocks of a fixed length.
Permuted Choice #
TE/CS 536 Network Security Spring 2005 – Lecture 8 Security of symmetric algorithms.
GPU ASSISTED LM HASH CRACKING WILLIAM GROESBECK UNIVERSITY OF NEVADA, RENO – SPRING 2013 (Psst, the 90’s called - they want their hashing algorithm back)
LUCIFER hell's favorite cipher.... By: OUTSOURCED Trevin Maerten Eitan Romanoff.
Advanced Encryption Standard. Origins NIST issued a new version of DES in 1999 (FIPS PUB 46-3) DES should only be used in legacy systems 3DES will be.
Fifth Edition by William Stallings
Advanced Encryption Standard Dr. Shengli Liu Tel: (O) Cryptography and Information Security Lab. Dept. of Computer.
Computer and Network Security Rabie A. Ramadan Lecture 3.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
DES Analysis and Attacks CSCI 5857: Encoding and Encryption.
Linear Cryptanalysis of DES
DATA & COMPUTER SECURITY (CSNB414) MODULE 3 MODERN SYMMETRIC ENCRYPTION.
5.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 5 Introduction to Modern Symmetric-key Ciphers.
Data Encryption Standard (DES) most widely used block cipher in world adopted in 1977 by NBS (now NIST) – as FIPS PUB 46 encrypts 64-bit data using 56-bit.
Linear Cryptanalysis of DES M. Matsui. 1.Linear Cryptanalysis Method for DES Cipher. EUROCRYPT 93, 1994.Linear Cryptanalysis Method for DES Cipher 2.The.
Lecture 4 Page 1 CS 236 Stream and Block Ciphers Stream ciphers convert one symbol of plaintext immediately into one symbol of ciphertext Block ciphers.
Computer Science and Engineering Computer System Security CSE 5339/7339 Lecture 7 September 9, 2004.
Cipher Transmission and Storage Modes Part 2: Stream Cipher Modes CSCI 5857: Encoding and Encryption.
Module :MA3036NI Symmetric Encryption -3 Lecture Week 4.
Simplified DES.
The Advanced Encryption Standard Part 1: Overview
Information and Computer Security CPIS 312 Lab 6 & 7 1 TRIGUI Mohamed Salim Symmetric key cryptography.
Outline Desirable characteristics of ciphers Stream and block ciphers
Chapter -2 Block Ciphers and the Data Encryption Standard
DATA ENCRYPTION STANDARD (DES)
ICS 555: Block Ciphers & DES Sultan Almuhammadi.
Presentation transcript:

CPTR 427 Programming DES

Outline Top Level Design Design Decisions Operations to write Putting it together

Top Level Design Depending on whether we are encrypting or decrypting we set the input files accordingly. Create a “Keys” object that generates all the round keys used by DES in the order needed to encrypt or decrypt This is the hard part! Let’s delve into the design decisions that have to be made first.

Design Decisions Representing Data consistently BitSets (Java) BitArray (C#) UInt64 (C#) Long (Java) Operations Permutations Expansions/Contractions XOR operations Odd side consideration: we work with 4/6/28/32/48/56/64 bit values

BitSets and BitArrays Advantages: Easy to perform permutations – bit level access Can easily expand or contract length… … can express arbitrary size Has XOR operation Bit position easy to understand Disadvantages Data is not in this format natively… Must convert between bytes and BitSets/BitArrays SLOW!

Long and UInt64 Advantages Bytes convert easily to long or unsigned int64 Easy shift and XOR operations Unnecessary to convert data to a new object type THIS IS THE WAY IT SHOULD BE DONE… Disadvantages Odd size information location (e.g. where does my 56 bits start?) Permutations are no longer intuitive

What format? For better or worse, I chose long in Java to avoid and delt with the permutation issues – in retrospect that was a good choice because it made my work easier because I didn’t have to process data in two very different formats. My Advice: Chose long/UInt64 and deal with the selection problem instead.

Operations Permutations Left Circular Shifts Swaps

Operations (Single Round) XOR S-Box operations

Operations to Write Simple Ops Permutations (with expansion or contraction + odd sizes) Separate left circular shifts within a 64 bit long/UInt64 Swaps (first 32 bits for second 32 bits) XOR (Native) S-Box Operations Named Ops Data: IP and IP -1, E, S-Box, P, XOR Key: PC-1, PC-2, XOR, Left Circular shifts

Permutations Defined by Data Input Size of input data Data Output Size of output data Mapping: input  output That takes care of IP, IP -1, E, P, PC-1, PC-2 Leaving: S-Box, Left Circular Shifts, swap32 and XOR public UInt64 perm(UInt64 input, int insize, int outsize, int[] map)

Permutation Logic Move a bit from position x in the input to position y in the output.

The rest of the Ops public UInt64 leftShift(UInt64 input, int shiftAmount) public UInt64 swap32(UInt64 input) public UInt64 sBox(UInt64 input)

Putting it all together… The entire goal of this project is for you to put this together using the instructions from the Stallings textbook. Use the notes and the program skeleton provided!