Lecture5 – Introduction to Cryptography 3/ Implementation Rice ELEC 528/ COMP 538 Farinaz Koushanfar Spring 2009.

Slides:



Advertisements
Similar presentations
IS 302: Information Security and Trust Week 4: Asymmetric Encryption
Advertisements

TIE Extensions for Cryptographic Acceleration Charles-Henri Gros Alan Keefer Ankur Singla.
Cryptography and Network Security Chapter 5 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Cryptography and Network Security Chapter 5
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (4) Information Security.
CSE331: Introduction to Networks and Security Lecture 19 Fall 2002.
BY : Darshana Chaturvedi.  INTRODUCTION  RSA ALGORITHM  EXAMPLES  RSA IS EFFECTIVE  FERMAT’S LITTLE THEOREM  EUCLID’S ALGORITHM  REFERENCES.
Public Key Encryption Algorithm
Week 3 - Friday.  What did we talk about last time?  AES  Public key cryptography.
Computer Science CSC 405By Dr. Peng Ning1 CSC 405 Introduction to Computer Security Topic 2. Basic Cryptography (Part II)
Lecture 3.3: Public Key Cryptography III CS 436/636/736 Spring 2012 Nitesh Saxena.
Public-key Cryptography Montclair State University CMPT 109 J.W. Benham Spring, 1998.
Public Key Cryptography
Public Encryption: RSA
McGraw-Hill©The McGraw-Hill Companies, Inc., Security PART VII.
Cryptography & Number Theory
Chapter 3 Encryption Algorithms & Systems (Part C)
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
8: Network Security8-1 Symmetric key cryptography symmetric key crypto: Bob and Alice share know same (symmetric) key: K r e.g., key is knowing substitution.
Lecture 6: Public Key Cryptography
Public Key Model 8. Cryptography part 2.
 Introduction  Requirements for RSA  Ingredients for RSA  RSA Algorithm  RSA Example  Problems on RSA.
Andreas Steffen, , 4-PublicKey.pptx 1 Internet Security 1 (IntSi1) Prof. Dr. Andreas Steffen Institute for Internet Technologies and Applications.
Network and Communications Network Security Department of Computer Science Virginia Commonwealth University.
1 Network Security Lecture 6 Public Key Algorithms Waleed Ejaz
A Compact and Efficient FPGA Implementation of DES Algorithm Saqib, N.A et al. In:International Conference on Reconfigurable Computing and FPGAs, Sept.
Network Security. Cryptography Cryptography functions Secret key (e.g., DES) Public key (e.g., RSA) Message digest (e.g., MD5) Security services Privacy:
RSA Implementation. What is Encryption ? Encryption is the transformation of data into a form that is as close to impossible as possible to read without.
10/1/2015 9:38:06 AM1AIIS. OUTLINE Introduction Goals In Cryptography Secrete Key Cryptography Public Key Cryptograpgy Digital Signatures 2 10/1/2015.
Prelude to Public-Key Cryptography Rocky K. C. Chang, February
AES Background and Mathematics CSCI 5857: Encoding and Encryption.
Public Key Encryption and the RSA Public Key Algorithm CSCI 5857: Encoding and Encryption.
1 Lecture 9 Public Key Cryptography Public Key Algorithms CIS CIS 5357 Network Security.
Midterm Review Cryptography & Network Security
MA/CSSE 473 Day 11 Primality testing summary Data Encryption RSA.
BASIC CRYPTOGRAPHIC CONCEPTS. Public Key Cryptography  Uses two keys for every simplex logical communication link.  Public key  Private key  The use.
Improving Encryption Algorithms Betty Huang Computer Systems Lab
Day 37 8: Network Security8-1. 8: Network Security8-2 Symmetric key cryptography symmetric key crypto: Bob and Alice share know same (symmetric) key:
By Yernar.  Background  Key generation  Encryption  Decryption  Preset Bits  Example.
A Method for Obtaining Digital Signatures and Public-key Cryptosystems
Strength of Cryptographic Systems Dr. C F Chong, Dr. K P Chow Department of Computer Science and Information Systems The University of Hong Kong.
Public-Key Encryption
1 Number Theory and Advanced Cryptography 5. Cryptanalysis of RSA Chih-Hung Wang Sept Part I: Introduction to Number Theory Part II: Advanced Cryptography.
RSA Prepared by: SITI ZAINAH ADNAN
CS461/ECE422 Spring 2012 Nikita Borisov — UIUC1.  Text Chapters 2 and 21  Handbook of Applied Cryptography, Chapter 8 
Algebra of RSA codes Yinduo Ma Tong Li. Ron Rivest, Adi Shamir and Leonard Adleman.
The RSA Algorithm. Content Review of Encryption RSA An RSA example.
Some Number Theory Modulo Operation: Question: What is 12 mod 9?
24-Nov-15Security Cryptography Cryptography is the science and art of transforming messages to make them secure and immune to attacks. It involves plaintext,
Scott CH Huang COM 5336 Cryptography Lecture 6 Public Key Cryptography & RSA Scott CH Huang COM 5336 Cryptography Lecture 6.
Public Key Cryptosystems RSA Diffie-Hellman Department of Computer Engineering Sharif University of Technology 3/8/2006.
Fifth Edition by William Stallings
Lecture 6.1: Misc. Topics: Number Theory CS 250, Discrete Structures, Fall 2011 Nitesh Saxena.
COMP 424 Lecture 04 Advanced Encryption Techniques (DES, AES, RSA)
Public Key Algorithms Lesson Introduction ●Modular arithmetic ●RSA ●Diffie-Hellman.
POON TENG HIN.  RSA  Shamir’s Three-Pass Protocol  Other issues.
The Advanced Encryption Standard Part 2: Mathematical Background
EE 122: Lecture 24 (Security) Ion Stoica December 4, 2001.
Lecture 3 (Chapter 9) Public-Key Cryptography and RSA Prepared by Dr. Lamiaa M. Elshenawy 1.
Introduction to Elliptic Curve Cryptography CSCI 5857: Encoding and Encryption.
RSA Pubic Key Encryption CSCI 5857: Encoding and Encryption.
Lecture 6. RSA Use in Encryption to encrypt a message M the sender: – obtains public key of recipient PU={e,n} – computes: C = M e mod n, where 0≤M
1 The RSA Algorithm Rocky K. C. Chang February 23, 2007.
Public Key Cryptography
Rivest, Shamir and Adleman
Analysis of the RSA Encryption Algorithm
Dynamic High-Performance Multi-Mode Architectures for AES Encryption
ADVANCED ENCRYPTION STANDARDADVANCED ENCRYPTION STANDARD
Alireza Hodjat IVGroup
Presentation transcript:

Lecture5 – Introduction to Cryptography 3/ Implementation Rice ELEC 528/ COMP 538 Farinaz Koushanfar Spring 2009

Rivest, Shamir, Adelman (RSA) Number theory + difficulty of determining prime factors of a large number Two keys d and e are used for encryption and decryption Plaintext message P is encrypted to ciphertext C C=P e mod n The plaintext is recovered by P=C d mod n Encrypt/decrypt are mutual inverses and commutative P=C d mod n = (P e ) d mod n = (P d ) e mod n

RSA – Key Choice Starting point: select a value for n –Product of two large primes p and q – they are ~100 digits  n is ~200 bits –A relatively large e is selected that is relatively prime to (p-1)*(q-1), one easy way is to select e to be larger prime than both (p-1) and (q-1) Finally, d is selected such that e*d= 1 mod (p-1)*(q-1)

Mathematical Foundation The Euler totient function  (n) is the number of positive integers less than n relatively prime to n, if p is prime, then  (p) =p-1 If n=p*q, where p and q are both prime  (n)=  (p)*  (q) = (p-1)*(q-1) Euler and Fermat proved that x  (n) =1 mod n For any integer x, if n and x are relatively prime

Mathematical Foundation -- RSA Encrypt by RSA: E(P)=P e Value of e is selected s.t. the inverse d can be easily formed (inverses mod  (n)) e*d=1 mod  (n) Or, e*d=k*  (n)+1 for some int k Because of Euler/Fermat results, assuming P and p are relatively prime P p-1 =1 mod p

RSA Math (Cont’d) Since (p-1) is a factor of  (n) P k*  (n) =1 mod p Multiplying by P produces P k*  (n)+1 =P mod p The same is true for q: P k*  (n)+1 =P mod q (P e ) d = P ed = P k*  (n)+1 =P mod q=P mod p Thus, (P e ) d = P mod n And e and d are inverse operations

Crypto Processors There are many many HW implementations of the standard security protocols, e.g., AES, DES, PKP Please check: ciphers.com/en/index.htmlhttp:// ciphers.com/en/index.html Our goal is not to design a new one, or to teach you to design a new one, but to show to you how implementations look –What are the basic building blocks, what are the potential weaknesses/vulnerability of each block

Recommended reading A. Hodjat, I. Verbauwhede. Minimum area cost for a 30 to 70 Gbits/s AES processor. IEEE Computer society Annual Symposium on VLSI, pp , 2004.Minimum area cost for a 30 to 70 Gbits/s AES processor T. Good and M. Benaissa. AES on FPGA from the fastest to the smallest, 2005.AES on FPGA from the fastest to the smallest L. Batina, S. Berna Ors, B. Preneel and J. Vandewalle. Hardware architectures for public key cryptography, 2003.Hardware architectures for public key cryptography

Minimum Area Cost for a 30 to 70 Gbits/s AES Processor Alireza Hodjat Ingrid Verbauwhede Department of Electrical Engineering University of California, Los Angeles {ahodjat, ee.ucla.edu IEEE Computer Society Symposium on VLSI (ISVLSI 04) February 2004 This material is based upon work supported by the Space and Naval Warfare Systems Center - San Diego under contract No. N

Outline Motivation Ultra high throughput AES implementation Area efficient byte substitution High speed AES with online key scheduling High speed AES with offline key scheduling Conclusion

Motivation Cryptographically secure random number generation for optical link switches Advanced Encryption Standard algorithm in the Counter mode of operation –Non-feedback mode of operation (pipelining is allowed)

Ultra High Throughput AES The key length –Critical path is in the Key scheduling path –Fixed key size : only 128-bit Loop-unrolling Pipelining –Inner round pipelining –Outer round pipelining Choice of byte- substitution phase –LUT implementation –Implementation using GF operations (further pipelining)

Byte substitution optimization Byte substitution on GF(2 8 ) –First: multiplicative inverse in GF(2 8 ) –Second: Affine transformation (over Gf(2)) Multiplicative inverse in GF(2 8 ) is expensive –Area efficient implementation using GF(2 4 ) operations

Area Efficient Byte Substitution a : Byte substitution using LUT implementationb : Non-pipelined Sbox using GF operations c : Two-stage pipelined Sbox using GF operationsd : Three-stage pipelined Sbox using GF operations

Area-Delay Trade-off for Sbox The area cost of the Sbox using two-stage and three-stage composite field implementation is 23% and 32% less than the LUT design with the same speed

High Speed AES with Online Key Scheduling 2 pipeline stages per round 3 pipeline stages per round 4 pipeline stages per round

Throughput-Area Trade-off for AES Area cost for the design with three pipeline stages is 35% less than the design with LUT Sbox implementation Area cost for the design with four pipeline stages is 30% less than the design with LUT Sbox implementation

High Speed Design with Offline Key Scheduling Key does not vary as frequent as data Pre-calculate the key schedule and store them in the round key registers Key schedule is done in 20 cycles

Throughput-Area Trade-Off Offline key scheduling unit can reduce the area up to 28 %. Area cost for the design with three pipeline stages is 37% less than the design with LUT Sbox implementation Area cost for the design with four pipeline stages is 33% less than the design with LUT Sbox implementation

Conclusion Area efficient architectures for 30 to 70 Gbits/s AES processor Loop unrolling and inner and outer round pipelining were used Pipelined design of composite field implementation of the byte substitute phase reduces the area cost up to 35% Offline key scheduling unit reduces the area cost up to 28% Total area cost of the final architecture was reduced up to 48%