TWOFISH ENCRYPTION ALGORITHM CS–627: Cryptology Fall 2004 Horatiu Paul Stancu.

Slides:



Advertisements
Similar presentations
DES The Data Encryption Standard (DES) is a classic symmetric block cipher algorithm. DES was developed in the 1970’s as a US government standard The block.
Advertisements

Origins  clear a replacement for DES was needed Key size is too small Key size is too small The variants are just patches The variants are just patches.
“Advanced Encryption Standard” & “Modes of Operation”
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
1 Lecture 3: Secret Key Cryptography Outline concepts DES IDEA AES.
Chapter 3  Symmetric Key Cryptosystems 1 Overview  Modern symmetric-key cryptosystems o Data Encryption Standard (DES)  Adopted in 1976  Block size.
1 CIS 5371 Cryptography 5b. Pseudorandom Objects in Practice Block Ciphers.
Digital Kommunikationselektroink TNE027 Lecture 6 (Cryptography) 1 Cryptography Algorithms Symmetric and Asymmetric Cryptography Algorithms Data Stream.
Cryptography and Network Security Chapter 3
Rachana Y. Patil 1 Data Encryption Standard (DES) (DES)
Cryptography and Network Security
1 The AES block cipher Niels Ferguson. 2 What is it? Block cipher: encrypts fixed-size blocks. Design by two Belgians. Chosen from 15 entries in a competition.
1 Pertemuan 07 Enkripsi Simetrik Kontemporer Matakuliah: H0242 / Keamanan Jaringan Tahun: 2006 Versi: 1.
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.
Cryptography and Network Security (AES) Dr. Monther Aldwairi New York Institute of Technology- Amman Campus 10/18/2009 INCS 741: Cryptography 10/18/20091Dr.
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.
Lecture 23 Symmetric Encryption
Symmetric Cryptography
Dr. Lo’ai Tawalbeh 2007 Chapter 5: Advanced Encryption Standard (AES) Dr. Lo’ai Tawalbeh New York Institute of Technology (NYIT) Jordan’s Campus.
CS555Spring 2012/Topic 91 Cryptography CS 555 Topic 9: Block Cipher Construction & DES.
Encryption Schemes Second Pass Brice Toth 21 November 2001.
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.
Cryptanalysis of Modern Symmetric-Key Block Ciphers [Based on “A Tutorial on Linear and Differential Cryptanalysis” by Howard Heys.] Modern block ciphers.
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."
“It seems that our competence to secure the net cannot keep up with our desire to use it.” by ARJEN K. LENSTRA in ‘Securing the Net – The Fruits of Incompetence’,
Blowfish A widely used block cipher. Blowfish Designed by Bruce Schneier (1993) A variant of it (Twofish) was an AES finalist candidate 64-bit block size,
9/17/15UB Fall 2015 CSE565: S. Upadhyaya Lec 6.1 CSE565: Computer Security Lecture 6 Advanced Encryption Standard Shambhu Upadhyaya Computer Science &
Classical &ontemporyryptology 1 AESAES Classical &ontemporyryptology 2 Advanced Encryption Standard Since DES was becoming less reliable as new cryptanalysis.
Advance Encryption Standard. Topics  Origin of AES  Basic AES  Inside Algorithm  Final Notes.
Chapter 20 Symmetric Encryption and Message Confidentiality.
TE/CS 536 Network Security Spring 2006 – Lectures 6&7 Secret Key Cryptography.
Chapter 20 Symmetric Encryption and Message Confidentiality.
Block ciphers Structure of a multiround block cipher
13. Other Block Ciphers 13.1 LUCIFER 13.2 MADRYGA 13.3 NEWDES 13.4 FEAL 13.5 REDOC 13.6 LOKI.
Data Encryption Standard (DES) © 2000 Gregory Kesden.
Description of a New Variable-Length Key, 64-Bit Block Cipher (BLOWFISH) Bruce Schneier BY Sunitha Thodupunuri.
Introduction to Modern Symmetric-key Ciphers
Le Trong Ngoc Security Fundamentals (2) Encryption mechanisms 4/2011.
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.
Lecture 23 Symmetric Encryption
Fifth Edition by William Stallings
Advanced Encryption Standard Dr. Shengli Liu Tel: (O) Cryptography and Information Security Lab. Dept. of Computer.
A Ultra-Light Block Cipher KB1 Changhoon Lee Center for Information Security Technologies, Korea University.
Plaintextciphertext encryption algorithmdecryption algorithm plaintext.
DATA & COMPUTER SECURITY (CSNB414) MODULE 3 MODERN SYMMETRIC ENCRYPTION.
Conventional Encryption Chapter 4. Multiple DES Advantage of extra stages –Each stage gives 56 more bits of key length –Double DES subject to meet-in-the-middle.
Module :MA3036NI Symmetric Encryption -3 Lecture Week 4.
Block Ciphers and the Data Encryption Standard. Modern Block Ciphers  One of the most widely used types of cryptographic algorithms  Used in symmetric.
Understanding Cryptography by Christof Paar and Jan Pelzl Chapter 4 – The Advanced Encryption Standard (AES) ver. October 28, 2009.
Information and Network Security Lecture 2 Dr. Hadi AL Saadi.
Information and Computer Security CPIS 312 Lab 6 & 7 1 TRIGUI Mohamed Salim Symmetric key cryptography.
1 CPCS425: Information Security (Topic 5) Topic 5  Symmetrical Cryptography  Understand the principles of modern symmetric (conventional) cryptography.
Lecture 4 Data Encryption Standard (DES) Dr. Nermin Hamza
Provides Confidentiality
6b. Practical Constructions of Symmetric-Key Primitives.
Cryptography and Network Security Chapter 3
Block Ciphers and the Data Encryption Standard (DES)
About Blowfish Encryption Video made by: Tudor Mare Sorin Nita Valentina Sociu Stefan Stefanescu.
SYMMETRIC ENCRYPTION.
DES (Data Encryption Standard)
Florida State University
Advanced Encryption Standard
Feistel Cipher Structure
Presentation transcript:

TWOFISH ENCRYPTION ALGORITHM CS–627: Cryptology Fall 2004 Horatiu Paul Stancu

General Description 128-bit block 128, 192, or 256-bit key 16 rounds Works in all standard modes Encrypts data in: –18 clocks/byte on a Pentium –16.1 clocks/byte on a Pentium Pro

General Description (Bruce Schneier,

General Description (Bruce Schneier,

General Description (Bruce Schneier,

General Description Main Advantages: Extensively cryptanalyzed Unpatented Uncopyrighted Free

Twofish Design Goals A 128-bit symmetric block cipher. Key lengths of 128 bits, 192 bits, and 256 bits. No weak keys. Efficiency, both on the Intel Pentium Pro and other software and hardware platforms. Flexible design: e.g., accept additional key lengths; be implementable on a wide variety of platforms and applications; and be suitable for a stream cipher, hash function, and MAC. Simple design, both to facilitate ease of analysis and ease of implementation.

Twofish Design Goals Encrypt data in less than 500 clock cycles per block on an Intel Pentium, Pentium Pro, and Pentium II, for a fully optimized version of the algorithm. Be capable of setting up a 128-bit key (for optimal encryption speed) in less than the time required to encrypt 32 blocks on a Pentium, Pentium Pro, and Pentium II. Encrypt data in less than 5000 clock cycles per block on a Pentium, Pentium Pro, and Pentium II with no key setup time.

Twofish Design Goals Accept any key length up to 256 bits Not contain any operations that make it inefficient on other 32-bit microprocessors. Not contain any operations that make it inefficient on 8-bit and 16-bit microprocessors. Not contain any operations that reduce its efficiency on proposed 64-bit microprocessors; e.g., Merced. Not include any elements that make it inefficient in hardware.

Twofish Design Goals Have a variety of performance tradeoffs with respect to the key schedule. Encrypt data in less than 10 milliseconds on a commodity 8-bit microprocessor. Be implementable on a 8-bit microprocessor with only 64 bytes of RAM. Be implementable in hardware using less than 20,000 gates.

Twofish Building Blocks Feistel Networks – the fundamental building block is the F function:  a key-dependent mapping of an input string onto an output string.  An F function is always non-linear and possibly non-surjective  where n is the block size of the Feistel Network, and F is a function taking n/2 bits of the block and N bits of a key as input, and producing an output of length n/2 bits

Twofish Building Blocks S-boxes:  An S-box is a table-driven non-linear substitution operation used in most block ciphers  S-boxes vary in both input size and output size, and can be created either randomly or algorithmically  Twofish uses four different, bijective, key-dependent, 8-by-8-bit S-boxes  These S-boxes are built using two fixed 8-by-8-bit permutations and key material

Twofish Twofish uses a 16-round Feistel-like structure with additional whitening of the input and output The only non-Feistel elements are the 1-bit rotates The rotations can be moved into the F function to create a pure Feistel structure, but this requires an additional rotation of the words just before the output whitening step The plaintext is split into four 32-bit words. In the input whitening step, these are XORed with four key words. This is followed by sixteen rounds

Twofish (Bruce Schneier, John Kelsey, Doug Whiting, David Wagner, Chris Hall, Niels Ferguson,1998)

Twofish In each round, the two words on the left are used as input to the g functions - one of them is rotated by 8 bits first. The g function consists of four byte-wide key- dependent S-boxes, followed by a linear mixing step based on an MDS matrix The results of the two g functions are combined using a Pseudo-Hadamard Transform (PHT), and two keywords are added These two results are then XORed into the words on the right (one of which is rotated left by 1 bit first, the other is rotated right afterwards)

Twofish The left and right halves are then swapped for the next round After all the rounds, the swap of the last round is reversed, and the four words are XORed with four more key words to produce the ciphertext the 16 bytes of plaintext p0……… p15 are first split into 4 words P0,…, P3 of 32 bits each using the little-endian convention

Twofish In the input whitening step, these words are XORed with 4 words of the expanded key In each of the 16 rounds, the first two words are used as input to the function F, which also takes the round number as input The third word is XORed with the first output of F and then rotated right by one bit

Twofish The fourth word is rotated left by one bit and then XORed with the second output word of F Finally, the two halves are exchanged

Performance of Twofish (Bruce Schneier, John Kelsey, Doug Whiting, David Wagner, Chris Hall, Niels Ferguson,1998)

Performance of Twofish Performance on Large Microprocessors : Full Keying - this option performs the full key precomputations Partial Keying - for applications where few blocks are encrypted with a single key, it may not make sense to build the complete key schedule Minimal Keying - for applications where very few blocks are encrypted with a single key, there is a further possible optimization

Performance of Twofish Hardware Performance: (Bruce Schneier, John Kelsey, Doug Whiting, David Wagner, Chris Hall, Niels Ferguson,1998)