DOC PREVIEW
MASON ECE 646 - Lecture Slides

This preview shows page 1-2-3-4-5-6 out of 17 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Radix – 4 Implementation of a Montgomery Multiplier for a RSA CryptosystemPresentation TopicsRSA Public-Key CryptosystemRSA EquationsBinary ExponentiationMontgomery MultiplicationMontgomery ConversionExponentiation in Montgomery DomainRadix – 2 Processing ElementData PathRadix – 4 MultiplicationRadix – 4 Multiplication Using Carry Save AddersRadix – 4 Multiplication Using Booth EncodingRadix – 4 Montgomery MultiplicationRadix – 4 Montgomery ImplementationResultsConclusionRadix Radix ––4 Implementation 4 Implementation of a Montgomery Multiplier of a Montgomery Multiplier for a RSA Cryptosystemfor a RSA CryptosystemSteven Hubbard Steven Hubbard ECE ECE ––646646Presentation TopicsPresentation TopicsRSA Cryptography AlgorithmRSA Cryptography AlgorithmMontgomery MultiplicationMontgomery MultiplicationRadix Radix ––4 Multiplication4 MultiplicationRadix Radix ––4 Implementation of Montgomery 4 Implementation of Montgomery MultiplicationMultiplicationPublished Results & ConclusionsPublished Results & ConclusionsRSA PublicRSA Public--Key CryptosystemKey CryptosystemDeveloped by Developed by RivestRivest, , ShamirShamir, and , and AdlemanAdlemanin in 19781978Private Key contains two large prime numbers, Private Key contains two large prime numbers, ppand and qq, as well as a secret exponent , as well as a secret exponent ddPublic Key consists of n = Public Key consists of n = pp* * qq, with exponent , with exponent eeRequires Modular ExponentiationRequires Modular ExponentiationDecryption involves larger exponentiationDecryption involves larger exponentiationRSA EquationsRSA EquationsPublic Exponent Public Exponent eeis a number such that:is a number such that:gcd(egcd(e, , φφ) = 1) = 1φφ= (p = (p ––1)(q 1)(q ––1)1)Private Exponent d is obtained by:Private Exponent d is obtained by:d = ed = e--11mod mod φφEncryption OperationEncryption OperationC = MC = Meemod nmod nDecryption OperationDecryption OperationM = M = CCddmod nmod nBinary ExponentiationBinary ExponentiationRight to LeftRight to LeftLeftLeftto Rightto RightY = 1;Y = 1;Y = 1Y = 1S = X;S = X;for i=Lfor i=L--1 1 downtodownto00for i=0 to Lfor i=0 to L--11{{{{Y = YY = Y22mod N;mod N;if (if (eeii== 1)== 1)if (if (eeii== 1) == 1) Y = Y*S mod N;Y = Y*S mod N;Y = Y*X mod N;Y = Y*X mod N;S = S2 mod N;S = S2 mod N;}}} }Montgomery MultiplicationMontgomery MultiplicationEfficient technique for computing modular Efficient technique for computing modular exponentiations exponentiations Does not require division in taking modulusDoes not require division in taking modulusReplaces with bit shifting, which is fast and easy Replaces with bit shifting, which is fast and easy in hardwarein hardwareSimple conversion to Montgomery Domain Simple conversion to Montgomery Domain done before and after Multiplicationdone before and after MultiplicationMontgomery ConversionMontgomery ConversionGiven an integer a < M, A is said to be its MGiven an integer a < M, A is said to be its M--residue with residue with respect to r if,respect to r if,A = a*2k (mod M)A = a*2k (mod M)Likewise, given an integer b < n, B is its nLikewise, given an integer b < n, B is its n--residue with respect residue with respect to r if,to r if,B = b*2k (mod M)B = b*2k (mod M)The Montgomery product of A and B can then be defined as,The Montgomery product of A and B can then be defined as,C = A*B*rC = A*B*r--1 (mod M)1 (mod M)Exponentiation in Montgomery Domain Right-to-left binary exponentiationY = 1;S = X;Y’ = MP(Y, 22kmod N, N)S’ = MP(S, 22kmod N, N) for i=0 to L-1{if (ei == 1)Y’ = MP(Y’, S’, N);S’ = MP(S’, S’, N);}S = MP(S’, 1, N);Radix Radix ––2 Processing Element2 Processing ElementMultiple elements connected in serial to compute the multiplicatMultiple elements connected in serial to compute the multiplication. ion. The data path receives inputs from the previous stage and computThe data path receives inputs from the previous stage and computes the es the next next S(jS(j) )Data PathData PathRadix Radix ––4 Multiplication4 MultiplicationMultiply 2 bits of Multiplier per cycleMultiply 2 bits of Multiplier per cycleReduces partial products by halfReduces partial products by halfRequires additional MultiplexerRequires additional MultiplexerRadix Radix ––4 Multiplication Using Carry 4 Multiplication Using Carry Save AddersSave AddersUsing Carry Save Adders (CSA) instead of MultiplexerUsing Carry Save Adders (CSA) instead of MultiplexerDoes not require calculating “3a”Does not require calculating “3a”Radix Radix ––4 Multiplication Using 4 Multiplication Using Booth EncodingBooth EncodingUses xUses xi+1i+1, x, and x, x, and xii--11and recodes to zand recodes to z1/21/2between [2, between [2, --2]2]Radix Radix ––4 Montgomery 4 Montgomery MultiplicationMultiplicationUses principles of radix Uses principles of radix ––4 multiplication in Montgomery Domain4 multiplication in Montgomery DomainStepStep1: 1: S S = 0= 0xx--1 = 01 = 02: 2: FOR FOR j j = 0 TO = 0 TO N N --1 STEP 21 STEP 23: 3: ZjZj= = RecodingRecoding1(1(xjxj++1..¡1..¡--1)1)4: 4: ((Ca, SCa, S(0)) = (0)) = SS(0) + ((0) + (ZjZj* Y * Y )(0))(0)5: 5: qMjqMj= = SS(0)1(0)1....0 0 * * (4 (4 --MM(0)(0)--1111....0 ) mod 40 ) mod 45a:5a:q’Mjq’Mj= = RecodingRecoding2(2(qMj qMj ))6: 6: ((CbCb, S, S(0)) = (0)) = SS(0) + ((0) + (q’Mjq’Mj* M* M)(0))(0)7: 7: FOR FOR i i = 1 TO = 1 TO e e ––118:8:((Ca, Ca, SS((ii)) = )) = Ca Ca + + SS((ii) + () + (ZjZj* Y * Y )()(ii))9:9:((CbCb, , SS((ii)) = )) = CbCb+ + SS((ii) + () + (q’Mjq’Mj* * MM)()(ii))10:10:SS((ii--1) = (1) = (SS((ii)1)1....00, S, S((ii--1)1)BPWBPW--11....2)2)END FOR;END FOR;11: 11: Ca Ca = = CaCaor or CbCb12: 12: SS((ee--1) = 1) = signextsignext((CaCa, S, S((ee--1)1)BPWBPW--11....2)2)END FOR;END FOR;Radix Radix ––4 Montgomery 4 Montgomery ImplementationImplementationUses parallel Processing Elements to calculate multiple Uses parallel Processing Elements to calculate multiple iterations of Montgomery Multiplication algorithm at iterations of Montgomery Multiplication algorithm at onceonceResultsResultsResults from paper by Results from paper by KocKoc, , TawalbehTawalbeh, and , and TencaTencaat at Oregon State UniversityOregon State


View Full Document

MASON ECE 646 - Lecture Slides

Documents in this Course
Load more
Download Lecture Slides
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Slides and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Slides 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?