|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
why MSDN sample's RSAParameters.Exponent always byte {1,0,1}?Hi, :)
I want to know why the RSAParameters.Exponent is always set to byte {1,0,1}, what's the meaning of this field? thanks very much ^_^ Hi,
3 bytes {1,0,1} in RSAParameters.Exponent is a standard recommended public exponent = 2^16 + 1 = 65537 = 0x10001. It is recommended because it gives good performance for operations involving public key (due to low hamming weight). 3 as public exponent gives better performance, but 3 exponent could not be used to encrypt the same message to more than two different participants (i.e. public exponent 3, but different modulus) otherwise message could be easily recovered. With 0x10001 it could be a threat only if you send the same message encrypted with more than 65536 different public keys that uses 0x10001 as public exponent - which is much higher threshold and isn't usually a practical threat. 3 and 2^16+1 as public exponent have best performance of encryption and signature verification, least amount of messages that encrypts to themselves (message convolution), guarantees that private exponent will be big and not be vulnerable to Weiner attack; +++. RSA function (also called RSA trapdoor permutation) is defined following way: n is product of two distinct prime numbers p and q (i.e. n = p*q); phi(n) is (p-1)*(q-1); public exponent e is a number relative prime to phi(n) (i.e. gcd(e,phi(n)) = 1); private exponent d is chosen such that e*d = 1 mod phi(n) [*] then for any positive m less than n following is true: (m^e)^d = m mod n Therefore encryption is simple exponentiation: cipher = m^e mod n and decryption is another exponentiation: cipher^d mod n = (m^e)^d mod n = m RSA trapdoor permutation is a basis of RSA encryption. RSA encryption is actually more that just RSA trapdoor permutation and additionally defines a set of rules (like padding and such) about how to apply RSA trapdoor permutation to encrypt some plain text in secure way. If you are interested to find out about internal details of cryptography - you should read some books. Since you are newbie in crypto - entry level books, like Bruce Schneier's Applied Cryptography, and/or Neil Ferguson's and Bruce Schneier's Practical Cryptography would be a good beginning for you. -Valery. http://www.harper.no/valery [*] note that private exponent only requires to satisfy e*d=1 mod lcm(p-1,q-1), but since last requires calculation of least common multiplier, e*d = 1 mod phi(n) is usually used instead. Show quoteHide quote "overpro" <over***@bbn.cn> wrote in message news:O93RIKbPFHA.2144@TK2MSFTNGP09.phx.gbl... > Hi, :) > I want to know why the RSAParameters.Exponent is always set to byte > {1,0,1}, > what's the meaning of this field? > thanks very much ^_^ > >
Cannot open log for source {0}. You may not have write access. (Access right wanish after a while)
local admin security question AzMan threading problems How to run aspnet with system account web application can not access event log Difference between VS2003 / VS20005 causes CRYPTO BAD DATA excepti Cannot run program from network drive Rijndael decryption succeeds SOMETIMES Help How to add publisher condition ?? Question regarding in Forms authentication |
|||||||||||||||||||||||