“Implementation of a RC5 block cipher algorithm and implementing an attack on it” Cryptography Team Presentation 1.

Slides:



Advertisements
Similar presentations
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
Advertisements

1 Lecture 3: Secret Key Cryptography Outline concepts DES IDEA AES.
Digital Kommunikationselektroink TNE027 Lecture 6 (Cryptography) 1 Cryptography Algorithms Symmetric and Asymmetric Cryptography Algorithms Data Stream.
Cryptography and Network Security Chapter 5 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Cryptography and Network Security Chapter 5
Block Ciphers and the Data Encryption Standard
Cryptography and Network Security
Data Encryption Standard (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.
This Lecture: AES Key Expansion Equivalent Inverse Cipher Rijndael performance summary.
Advanced Encryption Standard(AES) Presented by: Venkata Marella Slide #9-1.
AES clear a replacement for DES was needed
Advanced Encryption Standard. This Lecture Why AES? NIST Criteria for potential candidates The AES Cipher AES Functions and Inverse Functions AES Key.
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.
Introduction to Modern Cryptography Lecture 3 (1) Finite Groups, Rings and Fields (2) AES - Advanced Encryption Standard.
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
Dr. Lo’ai Tawalbeh 2007 Chapter 5: Advanced Encryption Standard (AES) Dr. Lo’ai Tawalbeh New York Institute of Technology (NYIT) Jordan’s Campus.
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
ECE454/CS594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2011.
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.
Practical Techniques for Searches on Encrypted Data Yongdae Kim Written by Song, Wagner, Perrig.
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."
1 Chapter 3 Ciphers Mechanism that decides the process of encryption/decryption Stream Cipher: Bit-by-bit encryption / decryption Block Cipher: Block-by-block.
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,
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.
Cryptography Team Presentation 2
Improving Encryption Algorithms Betty Huang Computer Systems Lab
Description of a New Variable-Length Key, 64-Bit Block Cipher (BLOWFISH) Bruce Schneier BY Sunitha Thodupunuri.
Chapter 3 Encryption Algorithms & Systems (Part D)
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
1 Symmetric key cryptography: DES DES: Data Encryption Standard US encryption standard [NIST 1993] 56-bit symmetric key, 64 bit plaintext input How secure.
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.
The RC5 Encryption Algorithm: Two Years On Lisa Yin RC5 Encryption –Ron Rivest, December 1994 –Fast Block Cipher –Software and Hardware Implementations.
Block Ciphers and the Advanced Encryption Standard
Plaintextciphertext encryption algorithmdecryption algorithm plaintext.
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.
The RC6 Block Cipher: A simple fast secure AES proposal
Instructor: Dania Alomar
Dr. Lo’ai Tawalbeh summer 2007 Chapter 6: Contemporary Symmetric Ciphers Dr. Lo’ai Tawalbeh New York Institute of Technology (NYIT) Jordan’s Campus INCS.
Network Security Lecture 3 Secret Key Cryptography
Block Ciphers and the Data Encryption Standard. Modern Block Ciphers  One of the most widely used types of cryptographic algorithms  Used in symmetric.
ECE 545 Project 1 Introduction & Specification Part I.
CST 312 Pablo Breuer. A block of plaintext is treated as a whole and used to produce a ciphertext block of equal length Typically a block size of 64 or.
Information and Computer Security CPIS 312 Lab 6 & 7 1 TRIGUI Mohamed Salim Symmetric key cryptography.
Lecture 4 Data Encryption Standard (DES) Dr. Nermin Hamza
The RC6 Block Cipher: A simple fast secure. Design Philosophy u Leverage our experience with RC5: use data-dependent rotations to achieve a high level.
Provides Confidentiality
Cryptography after DES
Unit 2 “Implementation of a RC5 block cipher algorithm and implementing an attack on it”
Cryptography Team Presentation 1
SYMMETRIC ENCRYPTION.
Presentation transcript:

“Implementation of a RC5 block cipher algorithm and implementing an attack on it” Cryptography Team Presentation 1

About RC5 ◦ Fast symmetric block cipher ◦ Same key for encryption and decryption ◦ Plaintext and ciphertext are fixed-length bit sequences (blocks)

Parameters of RC5 ◦ RC5 – w/r/b  E.g. RC5 – 32/16/10 ◦ w = 32 bits ◦ r = 16 rounds ◦ b = 10-byte (80-bit) secret key variable ◦ t = 2 (r + 1) = 2 (16 + 1) = 34 rounds

Important parameters in details “w”(bits) – variable word size  Allowable choice for “w” in RC5– 16,32 and 64  Suggested 32  “Two” word input (plaintext) block size – 64-bit plaintext  “Two” word output (ciphertext) block size – 64-bit ciphertext  Design accepts all w > 0  Variable word size can exploit longer word length of processors like 64 – bit processors.

Important parameters in details “r” – variable number of rounds  Tradeoff between high speed and high security.  Allowed values  Suggested – 12  Higher the number of rounds provides increased level of security.  “S” – Expanded key table – derived from user’s secret key.  “t” – The size of table “S” (depends on “r”) ◦ t = 2 ( r + 1 ) words.

Important parameters in details “b” – variable length secret cryptographic key ◦ The number of bytes in the secret key K. ◦ 16 bytes suggested with allowed values from 0 – 255 “K” – The b-byte secret key : K[0], K[1],..., K[b-1].

Discussion on parameters RC5 cannot be secure for all possible values ◦ r = 0  No rounds of security will provide no encryption ◦ r = 1  One round will provide very less security  As a matter of fact, it can be easily broken ◦ b = 0  No key, no security ◦ Maximum allowable parameter values will be overkill. ◦ Nominal Choice Proposed  RC5 – 32/12/16

Notation and RC5 Primitive Ops Three Primitive operations(and their inverses) ◦ Two’s complement addition of words, modulo 2 w  ‘+’  Inverse op, subtraction, ‘-’ ◦ Bit-wise exclusive OR of words, denoted by ⊕ ◦ A left-rotation of words  x <<< y, cyclic rotation of word x left by y bits  One word of the intermediate results is cyclically rotated by an amount determined bits of another intermediate results.  The inverse operation is right-rotation, x>>>y

Note We see that rotations are ‘rotations by variable amount’ that is plaintext dependent We know that on modern microprocessors, a variable rotation takes constant-time ◦ Time is independent of the rotation amount y No other non-linear operations in RC5 Strength,therefore, relies on data-dependent rotations

RC5 Algorithm Three parts:- ◦ Key Expansion ◦ Encryption Algorithm ◦ Decryption Algorithm

RC5 Algorithm – Key Expansion Requirements of key expansion ◦ Filling the expanded key table array S[0…t – 1] with random binary words  “t” – Size of table “S” => 2 ( r+1 ) ◦ S table is not an “S-box” like DES.  Entries in S sequentially, one at a time. ◦ Random binary words are derived from the K.

RC5 Algorithm – Key Expansion Starting with two magic constants ◦ Two word-sized binary constants ◦ P w = Odd((e - 2) 2 w ) ◦ Q w = Odd((φ – 1) 2 w )  e = … (base of natural logarithms)  Φ = … (golden ratio), ◦ Where, Odd(x) is the odd integer nearest to x ◦ For w = 16 and 32 in hexadecimal form  P16 = b7e1  Q16 = 9e37  P32 = b7e15163  Q32 = 9e3779b9

RC5 Algorithm – Key Expansion Converting the Secret Key from Bytes to Words ◦ c = ceiling(b/u) words ◦ Pseudo code for conversion:- Image Source:

RC5 Algorithm – Key Expansion Initializing the S Array ◦ Initialization to a particular fixed(key- independent) Image Source:

RC5 Algorithm – Key Expansion Mixing in the Secret Key ◦ Pseudo code:- Image Source:

RC5 Algorithm Encryption Algorithm ◦ Two w-bit words are denoted as A and B A = A + S[0]; B = B + S[1]; for i = 1 to r do A = (( A ⊕ B ) <<< B ) + S[ 2 * i ]; B = (( B ⊕ A) <<< A ) + S[ 2 * i + 1]; The output is in the registers A and B. Work is done on both A and B, unlike DES where only half input is updated. Image Source:

RC5 Algorithm Decryption Algorithm ◦ (easily derived from encryption) ◦ Two w-bit words are denoted as A and B for i = r downto 1 do B = (( B – S[ 2 * i + 1 ]) >>> A) ⊕ A; A = (( A – S[ 2 * i ] >>> B) ⊕ B; B = B - S[1]; A = A - S[0]; The output is in the registers A and B.

Important Notes Data dependent rotations – amount of rotation is not pre-determined. The behavior of each round is different as the rotation amount is different. ◦ Each round ends by adding expanded key from S It was experimentally [1] determined that after eight rounds in RC5-32, each message bit affected some rotation amount. [1]: Rivest, R. L. (1994). "The RC5 Encryption Algorithm" (pdf). Proceedings of the Second International Workshop on Fast Software Encryption (FSE) 1994e. pp. 86–96.

Next Presentation Differential Attack will be performed. ◦ Difficult because bits are rotated to “random” positions in each round. Analysis of the requirements of the attack. Analysis of the results of the attack.

References Rivest, R. L. (1994). "The RC5 Encryption Algorithm" (pdf). Proceedings of the Second International Workshop on Fast Software Encryption (FSE) 1994e. pp. 86– RC5 Encryption Diagram ◦ ◦