rsa - network security- cryptography -
i solving rsa problem , facing difficulty compute d plz me this
given p-971, q-52 Ø(n) - 506340
gcd(Ø(n),e) = 1 1< e < Ø(n) therefore gcd(506340, 83) = 1 e= 83 .
e * d mod Ø(n) = 1 i want compute d , have info can u me how computer d this. (83 * d) mod 506340 = 1 little wean in maths having difficulties finding d above equation.
your value q not prime 52=2^2 * 13. therefore cannot find d because maths calculating relies upon fact both p , q prime.
i suggest working way through examples given here http://en.wikipedia.org/wiki/rsa_%28cryptosystem%29
normally, hesitate suggest wikipedia link such that, found useful preliminary source when doing project on rsa part of degree.
you need quite competent @ modular arithmetic grips how rsa works. if want understand how find d need learn find modular multiplicative inverse - google this, didn't come across incorrect when doing myself.
good luck.
a worked example
let's take p=11, q=5. in reality use large primes going doing hand want smaller numbers. keep both of these private.
now need n, given n=pq , in our case n=55. needs made public.
the next item need totient of n. phi(n)=(p-1)(q-1) our example phi(n)=40. keep private.
now calculate encryption exponent, e. defined such 1<e<phi(n) , gcd(e,phi(n))=1. there many possible different values of e - pick 1 (in real application choice determined additional factors - different choices of e make algorithm easier/harder crack). in example choose e=7. needs made public.
finally, last item calculated d, decryption exponent. calculate d must solve equation ed mod phi(n) = 1. commonly calculated using extended euclidean algorithm. algorithm solves equation phi(n)x+ed=1 subject 1<d<phi(n), x unknown multiplicative factor - identical writing previous equation without using mod. in our particular example, solving leads d=23. should kept private.
then public key is: n=55, e=7 , private key is: n=55, d=23
to see workthrough of extended euclidean algorithm check out youtube video https://www.youtube.com/watch?v=kyasb426yjk. values used in video same ones used here.
rsa complicated , mathematics gets involved. try solving couple of examples small values of p , q until comfortable method before attempting problem large values.
Comments
Post a Comment