120 likes | 269 Views
Technion - Israel institute of technology department of Electrical Engineering . הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל. Encryption / Decryption VHDL Core Project Characterization . Instructor : Mony Orbach Semester : Winter-Spring 2013
E N D
Technion - Israel institute of technology department of Electrical Engineering הטכניון - מכון טכנולוגי לישראלהפקולטה להנדסת חשמל Encryption / Decryption VHDL CoreProject Characterization Instructor : MonyOrbach Semester : Winter-Spring 2013 Performed By: Watad Duna, Watad Esam
Introduction • We are interesting to send a message From A to B • Transferring messages done by a unsecured channel • Encryption can provide a means of securing information <Message> <Message> !hd#4!xZf Decrypt Encrypt
Symmetric Vs. Asymmetric • Symmetric: • When using symmetric algorithms, both parties share the same key for encryption and decryption • Once somebody else gets to know the key, it is not safe any more • Symmetric algorithms have the advantage of not consuming too much computing • Asymmetric: • Asymmetric algorithms use pairs of keys, one is used for encryption and the other one for decryption • The decryption key is typically kept secretly, therefore called ``private key'' while the encryption key is spread to all who might want to send encrypted messages, therefore called ``public key'‘ • The secret key can't be reconstructed from the public key
RSA Algorithm • The RSA algorithm is named after Ron Rivest, Adi Shamir and Len Adlemanwho invented it in 1977 • It is the most widely-used asymmetric algorithm encryption in the world • It can be used to encrypt a message without the need to exchange a secret key separately • The security of the RSA cryptosystem is based on two mathematical problems • The problem of factoring large numbers • The RSA problem
Project’s Goals • Enhancing encryption and decryption processing time by implementing RSA algorithm by hardware • Achieving reasonable safety level
RSA Theory • Key Generation Algorithm • Generate two large random primes, p and q • Compute n = pq and (phi) φ = (p-1)(q-1) • Choose an integer e, 1<e<phi, such that gcd(e,phi) = 1 • Compute the secret exponent d, 1 < d < phi, such that (e x d) ≡ 1 (mod phi) • The public key is (n, e) and the private key (d, p, q)
RSA Theory (Cont.) • Encryption Sender A does the following: • Obtains the recipient B's public key (n, e) • Represents message as a positive integer m, 1< m< n • Computes c = me mod n • Sends the c to B
RSA Theory (Cont.) • Decryption Recipient B does the following: • Uses his private key (n, d) to compute m = cd mod n • Extracts the message from the representative m
RSA – Very Simple Example • Select primes p=11, q=3 • n = p*q=11*3 = 33 phi=(p-1)(q-1)=10*2=20 • Choose e=3 ( gcd(3, 20) = 1 ) • Compute d such that e*d ≡ 1 (mod phi)simple calculation lead to d=7 • say we want to encrypt the message m = 7c = me mod n = 73 mod 33 = 343 mod 33 = 13 • To decrypt the encryption result we computem' = cd mod n = 137 mod 33 = 7
Work Flow Studying Theory Background Writing a C code illustrate RSA Encryption/Decryption Choosing Work Environment According To Implementation Requirements Simulation/Testing Improving performance Writing VHDL Code Which Implements RSA Synthesis / Validation