The RC6 Block Cipher: A simple fast secure AES proposal

Slides:



Advertisements
Similar presentations
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.
Advertisements

Chap. 5: Advanced Encryption Standard (AES) Jen-Chang Liu, 2005 Adapted from lecture slides by Lawrie Brown.
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
TIE Extensions for Cryptographic Acceleration Charles-Henri Gros Alan Keefer Ankur Singla.
1 CIS 5371 Cryptography 5b. Pseudorandom Objects in Practice Block Ciphers.
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
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.
FEAL FEAL 1.
Akelarre 1 Akelarre Akelarre 2 Akelarre  Block cipher  Combines features of 2 strong ciphers o IDEA — “mixed mode” arithmetic o RC5 — keyed rotations.
AES clear a replacement for DES was needed
1 Overview of the DES A block cipher: –encrypts blocks of 64 bits using a 64 bit key –outputs 64 bits of ciphertext A product cipher –basic unit is the.
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 2 (D) – Contemporary Symmetric Ciphers "I am fairly familiar with all the forms of secret writings, and am myself the author of a trifling monograph.
ECE454/CS594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2011.
Cryptanalysis of Modern Symmetric-Key Block Ciphers [Based on “A Tutorial on Linear and Differential Cryptanalysis” by Howard Heys.] Modern block ciphers.
Chapter 5 Advanced Encryption Standard. Origins clear a replacement for DES was needed –have theoretical attacks that can break it –have demonstrated.
Cryptography and Network Security
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."
1 Chapter 3 Ciphers Mechanism that decides the process of encryption/decryption Stream Cipher: Bit-by-bit encryption / decryption Block Cipher: Block-by-block.
9/17/15UB Fall 2015 CSE565: S. Upadhyaya Lec 6.1 CSE565: Computer Security Lecture 6 Advanced Encryption Standard Shambhu Upadhyaya Computer Science &
Advance Encryption Standard. Topics  Origin of AES  Basic AES  Inside Algorithm  Final Notes.
AES Background and Mathematics CSCI 5857: Encoding and Encryption.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
Module 3 – Cryptography Cryptography basics Ciphers Symmetric Key Algorithms Public Key Algorithms Message Digests Digital Signatures.
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
David Evans CS551: Security and Privacy University of Virginia Computer Science Lecture 5: One Fish, Two Fish, Blowfish,
Improving Encryption Algorithms Betty Huang Computer Systems Lab
“Implementation of a RC5 block cipher algorithm and implementing an attack on it” Cryptography Team Presentation 1.
Cryptography and Network Security Contemporary Symmetric Ciphers.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Description of a New Variable-Length Key, 64-Bit Block Cipher (BLOWFISH) Bruce Schneier BY Sunitha Thodupunuri.
AES: Rijndael 林志信 王偉全. Outline Introduction Mathematical background Specification Motivation for design choice Conclusion Discussion.
Presented by: Dr. Munam Ali Shah
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.
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
A Ultra-Light Block Cipher KB1 Changhoon Lee Center for Information Security Technologies, Korea University.
Chapter 2 Symmetric Encryption.
© Information Security Group, ICU1 Block Cipher- introduction  DES Description: Feistel, S-box Exhaustive Search, DC and LC Modes of Operation  AES Description:
DES Analysis and Attacks CSCI 5857: Encoding and Encryption.
Linear Cryptanalysis of DES
DATA & COMPUTER SECURITY (CSNB414) MODULE 3 MODERN SYMMETRIC ENCRYPTION.
RTL Design Methodology Transition from Pseudocode & Interface
Block Cipher- introduction
CS519, © A.SelcukDifferential & Linear Cryptanalysis1 CS 519 Cryptography and Network Security Instructor: Ali Aydin Selcuk.
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.
RC6: The Simple Cipher Presenter: Morgan Monger. RC6 Cipher Created by Ronald Rivest et al. for AES submission Follows the evolution of RC5 cipher –Parameterized.
Linear Cryptanalysis of DES M. Matsui. 1.Linear Cryptanalysis Method for DES Cipher. EUROCRYPT 93, 1994.Linear Cryptanalysis Method for DES Cipher 2.The.
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.
หัวข้อบรรยาย Stream cipher RC4 WEP (in)security LFSR CSS (in)security.
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.
School of Computer Science and Engineering Pusan National University
Implementation of IDEA on a Reconfigurable Computer
Unit 2 “Implementation of a RC5 block cipher algorithm and implementing an attack on it”
Cryptography Team Presentation 1
Lecture 6: Two Fish on the Rijndael
Cryptography and Network Security Chapter 5 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Presentation transcript:

The RC6 Block Cipher: A simple fast secure AES proposal Ronald L. Rivest MIT Matt Robshaw RSA Labs Ray Sidney RSA Labs Yiqun Lisa Yin RSA Labs (August 21, 1998)

Outline Design Philosophy Description of RC6 Implementation Results Security Conclusion

Design Philosophy Leverage our experience with RC5: use data-dependent rotations to achieve a high level of security. Adapt RC5 to meet AES requirements Take advantage of a new primitive for increased security and efficiency: 32x32 multiplication, which executes quickly on modern processors, to compute rotation amounts.

Description of RC6

Description of RC6 RC6-w/r/b parameters: Key Expansion: Word size in bits: w ( 32 )( lg(w) = 5 ) Number of rounds: r ( 20 ) Number of key bytes: b ( 16, 24, or 32 ) Key Expansion: Produces array S[ 0 … 2r + 3 ] of w-bit round keys. Encryption and Decryption: Input/Output in 32-bit registers A,B,C,D

RC6 Primitive Operations A + B Addition modulo 2w A - B Subtraction modulo 2w A  B Exclusive-Or A <<< B Rotate A left by amount in low-order lg(w ) bits of B A >>> B Rotate A right, similarly (A,B,C,D) = (B,C,D,A) Parallel assignment A x B Multiplication modulo 2w RC5

RC6 Encryption (Generic) B = B + S[ 0 ] D = D + S[ 1 ] for i = 1 to r do { t = ( B x ( 2B + 1 ) ) <<< lg( w ) u = ( D x ( 2D + 1 ) ) <<< lg( w ) A = ( ( A  t ) <<< u ) + S[ 2i ] C = ( ( C  u ) <<< t ) + S[ 2i + 1 ] (A, B, C, D) = (B, C, D, A) } A = A + S[ 2r + 2 ] C = C + S[ 2r + 3 ]

RC6 Encryption (for AES) B = B + S[ 0 ] D = D + S[ 1 ] for i = 1 to 20 do { t = ( B x ( 2B + 1 ) ) <<< 5 u = ( D x ( 2D + 1 ) ) <<< 5 A = ( ( A  t ) <<< u ) + S[ 2i ] C = ( ( C  u ) <<< t ) + S[ 2i + 1 ] (A, B, C, D) = (B, C, D, A) } A = A + S[ 42 ] C = C + S[ 43 ]

RC6 Decryption (for AES) C = C - S[ 43 ] A = A - S[ 42 ] for i = 20 downto 1 do { (A, B, C, D) = (D, A, B, C) u = ( D x ( 2D + 1 ) ) <<< 5 t = ( B x ( 2B + 1 ) ) <<< 5 C = ( ( C - S[ 2i + 1 ] ) >>> t )  u A = ( ( A - S[ 2i ] ) >>> u )  t } D = D - S[ 1 ] B = B - S[ 0 ]

Key Expansion (Same as RC5’s) Input: array L[ 0 … c-1 ] of input key words Output: array S[ 0 … 43 ] of round key words Procedure: S[ 0 ] = 0xB7E15163 for i = 1 to 43 do S[i] = S[i-1] + 0x9E3779B9 A = B = i = j = 0 for s = 1 to 132 do { A = S[ i ] = ( S[ i ] + A + B ) <<< 3 B = L[ j ] = ( L[ j ] + A + B ) <<< ( A + B ) i = ( i + 1 ) mod 44 j = ( j + 1 ) mod c }

From RC5 to RC6 in seven easy steps

(1) Start with RC5 RC5 encryption inner loop: for i = 1 to r do { A = ( ( A  B ) <<< B ) + S[ i ] ( A, B ) = ( B, A ) } Can RC5 be strengthened by having rotation amounts depend on all the bits of B?

Better rotation amounts? Modulo function? Use low-order bits of ( B mod d ) Too slow! Linear function? Use high-order bits of ( c x B ) Hard to pick c well! Quadratic function? Use high-order bits of ( B x (2B+1) ) Just right!

B x (2B+1) is one-to-one mod 2w Proof: By contradiction. If B  C but B x (2B + 1) = C x (2C + 1) (mod 2w) then (B - C) x (2B+2C+1) = 0 (mod 2w) But (B-C) is nonzero and (2B+2C+1) is odd; their product can’t be zero!  Corollary: B uniform  B x (2B+1) uniform (and high-order bits are uniform too!)

High-order bits of B x (2B+1) The high-order bits of f(B) = B x ( 2B + 1 ) = 2B2 + B depend on all the bits of B . Let B = B31B30B29 … B1B0 in binary. Flipping bit i of input B Leaves bits 0 … i-1 of f(B) unchanged, Flips bit i of f(B) with probability one, Flips bit j of f(B) , for j > i , with probability approximately 1/2 (1/4…1), is likely to change some high-order bit.

(2) Quadratic Rotation Amounts for i = 1 to r do { t = ( B x ( 2B + 1 ) ) <<< 5 A = ( ( A  B ) <<< t ) + S[ i ] ( A, B ) = ( B, A ) } But now much of the output of this nice multiplication is being wasted...

(3) Use t, not B, as xor input for i = 1 to r do { t = ( B x ( 2B + 1 ) ) <<< 5 A = ( ( A  t ) <<< t ) + S[ i ] ( A, B ) = ( B, A ) } Now AES requires 128-bit blocks. We could use two 64-bit registers, but 64-bit operations are poorly supported with typical C compilers... Here are some notes for this page… Here are some more notes. What happens when we print them?

(4) Do two RC5’s in parallel Use four 32-bit regs (A,B,C,D), and do RC5 on (C,D) in parallel with RC5 on (A,B): for i = 1 to r do { t = ( B x ( 2B + 1 ) ) <<< 5 A = ( ( A  t ) <<< t ) + S[ 2i ] ( A, B ) = ( B, A ) u = ( D x ( 2D + 1 ) ) <<< 5 C = ( ( C  u ) <<< u ) + S[ 2i + 1 ] ( C, D ) = ( D, C ) }

(5) Mix up data between copies Switch rotation amounts between copies, and cyclically permute registers instead of swapping: for i = 1 to r do { t = ( B x ( 2B + 1 ) ) <<< 5 u = ( D x ( 2D + 1 ) ) <<< 5 A = ( ( A  t ) <<< u ) + S[ 2i ] C = ( ( C  u ) <<< t ) + S[ 2i + 1 ] (A, B, C, D) = (B, C, D, A) }

One Round of RC6 t u A B C D <<< f <<< f 5 5 <<< <<< S[2i] S[2i+1] A B C D

(6) Add Pre- and Post-Whitening B = B + S[ 0 ] D = D + S[ 1 ] for i = 1 to r do { t = ( B x ( 2B + 1 ) ) <<< 5 u = ( D x ( 2D + 1 ) ) <<< 5 A = ( ( A  t ) <<< u ) + S[ 2i ] C = ( ( C  u ) <<< t ) + S[ 2i + 1 ] (A, B, C, D) = (B, C, D, A) } A = A + S[ 2r + 2 ] C = C + S[ 2r + 3 ]

(7) Set r = 20 for high security (based on analysis) B = B + S[ 0 ] D = D + S[ 1 ] for i = 1 to 20 do { t = ( B x ( 2B + 1 ) ) <<< 5 u = ( D x ( 2D + 1 ) ) <<< 5 A = ( ( A  t ) <<< u ) + S[ 2i ] C = ( ( C  u ) <<< t ) + S[ 2i + 1 ] (A, B, C, D) = (B, C, D, A) } A = A + S[ 42 ] C = C + S[ 43 ] Final RC6

RC6 Implementation Results

CPU Cycles / Operation Less than two clocks per bit of plaintext !

Operations/Second (200MHz)

Encryption Rate (200MHz) MegaBytes / second MegaBits / second Over 100 Megabits / second !

On an 8-bit processor On an Intel MCS51 ( 1 Mhz clock ) Encrypt/decrypt at 9.2 Kbits/second (13535 cycles/block; from actual implementation) Key setup in 27 milliseconds Only 176 bytes needed for table of round keys. Fits on smart card (< 256 bytes RAM).

Custom RC6 IC 0.25 micron CMOS process One round/clock at 200 MHz Conventional multiplier designs 0.05 mm2 of silicon 21 milliwatts of power Encrypt/decrypt at 1.3 Gbits/second With pipelining, can go faster, at cost of more area and power

RC6 Security Analysis

Analysis procedures Intensive analysis, based on most effective known attacks (e.g. linear and differential cryptanalysis) Analyze not only RC6, but also several “simplified” forms (e.g. with no quadratic function, no fixed rotation by 5 bits, etc…)

Linear analysis Find approximations for r-2 rounds. Two ways to approximate A = B <<< C with one bit each of A, B, C (type I) with one bit each of A, B only (type II) each have bias 1/64; type I more useful Non-zero bias across f(B) only when input bit = output bit. (Best for lsb.) Also include effects of multiple linear approximations and linear hulls.

Security against linear attacks Estimate of number of plaintext/ciphertext pairs required to mount a linear attack. (Only 2128 such pairs are available.) Rounds Pairs 8 247 12 283 16 2119 20 RC6 2155 24 2191 Infeasible

Differential analysis Considers use of (iterative and non-iterative) (r-2)-round differentials as well as (r-2)-round characteristics. Considers two notions of “difference”: exclusive-or subtraction (better!) Combination of quadratic function and fixed rotation by 5 bits very good at thwarting differential attacks.

An iterative RC6 differential A B C D 1<<16 1<<11 0 0 1<<11 0 0 0 0 0 0 1<<s 0 1<<26 1<<s 0 1<<26 1<<21 0 1<<v 1<<21 1<<16 1<<v 0 1<<16 1<<11 0 0 Probability = 2-91

Security against differential attacks Estimate of number of plaintext pairs required to mount a differential attack. (Only 2128 such pairs are available.) Rounds Pairs 8 256 12 297 16 2190 20 RC6 2238 24 2299 Infeasible

Security of Key Expansion Key expansion is identical to that of RC5; no known weaknesses. No known weak keys. No known related-key attacks. Round keys appear to be a “random” function of the supplied key. Bonus: key expansion is quite “one-way”---difficult to infer supplied key from round keys.

Conclusion RC6 more than meets the requirements for the AES; it is simple, fast, and secure. For more information, including copy of these slides, copy of RC6 description, and security analysis, see www.rsa.com/rsalabs/aes

(The End)