Shopping on line can be easy, simple and save you lots of money. It can also take a lot of your time, frustrate you, and result in unwanted purchases. Now the same can be said for regular high street shopping, but with the vast opportunity presented by the Internet it will pay you to spend a few minutes reading this and understanding how to better optimize your Rsa shopping experience:
1. Compare - without doubt the biggest advantage that the Rsa offers shoppers today is the ability to compare thousands of Rsa at a time. This is a great thing, but not necessarily all the time! Too much can be daunting at times so take advantage of the great comparison sites and where possible let them do the hard work for you.
2. Research - if it has been said it will be on the internet. Ignorance is no longer a justifiable reason for buying the wrong thing. Take the time to research in detail everything that you could possible want to know about
3. Testimonials - don't know anybody that has bought a Rsa? Wrong! If the Rsa is good the internet will let you know. Use the Internet as a friend and get testimonials before you buy.
4. Questions - Got a question about Rsa then search the Forums, FAQ's, Blogs etc. Don't be afraid to ask .....
5. Reputation - Never heard of the company selling Rsa? Don't worry, no reason why you should know every company in the world, but you know someone that does! Use the internet to find out what people are saying about Rsa and build up a picture of their reputation for sales, returns, customer service, delivery etc.
6. Returns - still worried that even after all of the above your Rsa wont be what you want? Check out the returns policy. There is so much competition now that someone, somewhere is bound to offer the terms that you are comfortable with.
7. Feedback - happy with your Rsa then let people know, after all you are depending on others people input in your buying decision, so why not give a little back.
8. Security - check for the yellow padlock on the Rsa site before you buy, and the s after http:/ /i.e. https:// = a secure site
9. Contact - got a question about Rsa, or want to leave a comment then check out the sites contact page. Reputable companies have them and respond.
10. Payment - ready to pay for your Rsa, then use your credit card or PayPal! Be aware of companies that don't accept them, there may be genuine reasons but given the huge amount of choice you have when buying online there is no reason at all not to buy via credit card or PayPal.
In
cryptography,
RSA is an
algorithm for
public-key cryptography. It was the first algorithm known to be suitable for digital signature as well as encryption, and one of the first great advances in public key cryptography. RSA is widely used in electronic commerce protocols, and is believed to be secure given sufficiently long keys and the use of up-to-date implementations.
History
The algorithm was publicly described in 1977 by
Ron Rivest,
Adi Shamir, and
Leonard Adleman at Massachusetts Institute of Technology; the letters
RSA are the initials of their surnames. Apocryphally , it was invented at a Passover Seder in
Schenectady, New York SIAM News, Volume 36, Number 5, June 2003, "Still Guarding Secrets after Years of Attacks, RSA Earns Accolades for its Founders", by Sara Robinson
Clifford Cocks, a British mathematician working for the United Kingdom intelligence agency Government Communications Headquarters, described an equivalent system in an internal document in 1973, but given the relatively expensive computers needed to implement it at the time, it was mostly considered a curiosity and, as far as is publicly known, was never deployed. His discovery, however, was not revealed until 1997 due to its top-secret classification, and Rivest, Shamir, and Adleman devised RSA independently of Cocks' work.
Massachusetts Institute of Technology was granted for a "Cryptographic communications system and method" that used the algorithm in 1983. The patent expired on 21 September
2000. Since a paper describing the algorithm had been published in August 1977, prior to the December 1977 filing date of the
patent application, regulations in much of the rest of the world precluded patents elsewhere and only the United States patent was granted. Had Cocks' work been publicly known, a patent in the US would not have been possible either.
Operation
RSA involves a public Key (cryptography) and a private key. The public key can be known to everyone and is used for encrypting messages. Messages encrypted with the public key can only be decrypted using the private key. The keys for the RSA algorithm are generated the following way:
Choose two distinct large random prime numbers p \, and q \,
Compute n = p q \,
Compute the totient: \phi(n) = (p-1)(q-1) \,.
Choose an integer e\, such that 1 < e\, < \phi(n)\,, and e\, and \phi (n)\, share no factors other than 1 (coprime)
- e\, is released as the public key exponent
Compute d\, to satisfy the Modular arithmetic#The congruence relation d e \equiv 1\pmod{\phi(n)}\,; i.e. de = 1 + k\phi(n)\, for some integer k\,.
- d\, is kept as the private key exponent
Notes on the above steps:
- Step 1: Numbers can be Primality test#Probabilistic_tests for primality.
- Step 3: changed in PKCS#1 v2.0 to \lambda(n) = {\rm lcm}(p-1, q-1) \, instead of \phi(n) = (p-1)(q-1) \,.
- Step 4: A popular choice for the public exponents is e\, = 216 + 1 = 65537. Some applications choose smaller values such as e\, = 3, 5, or 35 instead. This is done to make encryption and signature verification faster on small devices like smart cards but small public exponents may lead to greater security risks.
- Steps 4 and 5 can be performed with the extended Euclidean algorithm; see modular arithmetic.
The
public key consists of the modulus n\, and the public (or encryption) exponent e\,.
The
private key consists of the modulus n\, and the private (or decryption) exponent d\, which must be kept secret.
- For efficiency a different form of the private key can be stored:
- p\, and q\,: the primes from the key generation,
- d\mod (p - 1)\, and d\mod(q - 1)\,: often called dmp1 and dmq1.
- q^{-1} \mod(p)\,: often called iqmp
- All parts of the private key must be kept secret in this form. p\, and q\, are sensitive since they are the factors of n\,, and allow computation of d\, given e\,. If p\, and q\, are not stored in this form of the private key then they are securely deleted along with other intermediate values from key generation.
- Although this form allows faster decryption and signing by using the Chinese Remainder Theorem, it is considerably less secure since it enables side channel attacks. This is a particular problem if implemented on smart cards, which benefit most from the improved efficiency. (Start with y = x^e mod n and let the card decrypt that. So it computes y^d \pmod{p} or y^d \pmod{q} whose results give some value z. Now, induce an error in one of the computations. Then \gcd(z-x,n) will reveal p or q.)
Encrypting messages
Alice transmits her public key (n\, & e\,) to Bob and keeps the private key secret. Bob then wishes to send message
M to Alice.
He first turns
M into a number m\, < n\, by using an agreed-upon reversible protocol known as a
#Padding schemes. He then computes the ciphertext c\, corresponding to:
c = m^e \mod{n}
This can be done quickly using the method of exponentiation by squaring. Bob then transmits c\, to Alice.
Decrypting messages
Alice can recover m\, from c\, by using her private key exponent d\, by the following computation:
m = c^d \mod{n}.
Given m\,, she can recover the original message
M.
The above decryption procedure works because first
c^d \equiv (m^e)^d \equiv m^{ed}\pmod{n}.
Now, e d \equiv 1\pmod{(p - 1)(q - 1)}, and hence
e d \equiv 1\pmod{p - 1}\, and
e d \equiv 1\pmod{q - 1}\,
which can also be written as
e d = k (p - 1) + 1\, and
e d = h (q - 1) + 1\,
for proper values of k\, and h\,. If m\, is not a multiple of p\, then m\, and p\, are coprime because p\, is prime; so by Fermat's little theorem
m^{(p-1)} \equiv 1 \pmod{p}
and therefore, using the first expression for e d\,,
m^{ed} = m^{k (p-1) + 1} = (m^{p-1})^k m \equiv {1}^k m = m \pmod{p}\,.
If instead m\, is a multiple of p\,, then
m^{ed} \equiv 0^{ed} = 0 \equiv m \pmod{p}.
Using the second expression for e d\,, we similarly conclude that
m^{ed} \equiv m \pmod{q}\,.
Since p\, and q\, are distinct prime numbers, applying the Chinese remainder theorem to these two congruences yields
m^{ed} \equiv m \pmod{pq}.
Thus,
c^d \equiv m \pmod{n}.
A working example
Here is an example of RSA encryption and decryption. The parameters used here are artificially small, but you can also
Wikibooks:Transwiki:Generate a keypair using OpenSSL.
Choose two prime numbers
:p = 61 and q=53
Compute n = p q \,
:n=61*53=3233
Compute the totient \phi(n) = (p-1)(q-1) \,
:\phi(n) = (61 - 1)(53 - 1) = 3120\,
Choose e>1 coprime to 3120
:e=17
Compute d\, such that d e \equiv 1\pmod{\phi(n)}\, (d is uniquely determined by e and \phi(n)\,)
:d=2753
:17 * 2753 = 46801 = 1 + 15 * 3120.
The
public key is (n=3233, e=17). For a padded message m\, the encryption function is:
c = m^e\mod {n} = m^{17} \mod {3233}.
The
private key is (n=3233, d=2753). The decryption function is:
m = c^d\mod {n} = c^{2753} \mod {3233}.
For example, to encrypt m=123, we calculate
c = 123^{17}\mod {3233} = 855.
To decrypt c = 855, we calculate
m = 855^{2753}\mod {3233} = 123.
Both of these calculations can be computed efficiently using the
square-and-multiply algorithm for
modular exponentiation.
Padding schemes
When used in practice, RSA is generally combined with some padding (cryptography). The goal of the padding scheme is to prevent a number of attacks that potentially work against RSA without padding:
- When encrypting with low encryption exponents (e.g., e = 3) and small values of the m, (i.e. m
References
- Menezes, Alfred; van Oorschot, Paul C.; and Vanstone, Scott A. Handbook of Applied Cryptography. CRC Press, October 1996. ISBN 0-8493-8523-7
- R. Rivest, A. Shamir, L. Adleman. A Method for Obtaining Digital Signatures and Public-Key Cryptosystems. Communications of the ACM, Vol. 21 (2), pp.120–126. 1978. Previously released as an MIT "Technical Memo" in April 1977. Initial publication of the RSA scheme.
- Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms, Second Edition. MIT Press and McGraw-Hill, 2001. ISBN 0-262-03293-7. Section 31.7: The RSA public-key cryptosystem, pp.881–887.
External links
- PKCS #1: RSA Cryptography Standard (RSA Laboratories website)
- The PKCS #1 standardization "provides recommendations for the implementation of public-key cryptography based on the 'RSA algorithm, covering the following aspects: cryptographic Primitive type; encryption schemes; Digital signature schemes with appendix; ASN.1 syntax for representing keys and for identifying the schemes".
- Thorough walk through of RSA
- Online RSA Encryption Application
- RSA demo with Java and Javascript
- How the RSA Cipher Works
- Menezes, Oorschot, Vanstone, Scott: Handbook of Applied Cryptography (free PDF downloads), see Chapter 8
- Onur Aciicmez, Cetin Kaya Koc, Jean-Pierre Seifert: On the Power of Simple Branch Prediction Analysis
- A New Vulnerability In RSA Cryptography, CAcert NEWS Blog
- Example of an RSA implementation with PKCS#1 padding (LGPL source code)
- RSA implementation in the Tcl programming language
- A New Method of Serial Modular Multiplication describes a hardware design that does multiplication and modulo reduction simultaneously in a bit-serial fashion, speeding up operations such as RSA by a large factor. Creating the FAP4 chip is an informal description of implementing a chip (the world's first RSA chip, in 1985) using this design.
In cryptography, RSA is an algorithm for public-key cryptography. It was the first algorithm known to be suitable for digital signature as well as encryption, and one of the first great advances in public key cryptography. RSA is widely used in electronic commerce protocols, and is believed to be secure given sufficiently long keys and the use of up-to-date implementations.
History
The algorithm was publicly described in 1977 by Ron Rivest, Adi Shamir, and Leonard Adleman at Massachusetts Institute of Technology; the letters RSA are the initials of their surnames. Apocryphally , it was invented at a Passover Seder in Schenectady, New York SIAM News, Volume 36, Number 5, June 2003, "Still Guarding Secrets after Years of Attacks, RSA Earns Accolades for its Founders", by Sara Robinson
Clifford Cocks, a British mathematician working for the United Kingdom intelligence agency Government Communications Headquarters, described an equivalent system in an internal document in 1973, but given the relatively expensive computers needed to implement it at the time, it was mostly considered a curiosity and, as far as is publicly known, was never deployed. His discovery, however, was not revealed until 1997 due to its top-secret classification, and Rivest, Shamir, and Adleman devised RSA independently of Cocks' work.
Massachusetts Institute of Technology was granted for a "Cryptographic communications system and method" that used the algorithm in 1983. The patent expired on 21 September 2000. Since a paper describing the algorithm had been published in August 1977, prior to the December 1977 filing date of the patent application, regulations in much of the rest of the world precluded patents elsewhere and only the United States patent was granted. Had Cocks' work been publicly known, a patent in the US would not have been possible either.
Operation
RSA involves a public Key (cryptography) and a private key. The public key can be known to everyone and is used for encrypting messages. Messages encrypted with the public key can only be decrypted using the private key. The keys for the RSA algorithm are generated the following way:
- Choose two distinct large random prime numbers p \, and q \,
- Compute n = p q \,
- Compute the totient: \phi(n) = (p-1)(q-1) \,.
- Choose an integer e\, such that 1 < e\, < \phi(n)\,, and e\, and \phi (n)\, share no factors other than 1 (coprime)
- e\, is released as the public key exponent
- Compute d\, to satisfy the Modular arithmetic#The congruence relation d e \equiv 1\pmod{\phi(n)}\,; i.e. de = 1 + k\phi(n)\, for some integer k\,.
- d\, is kept as the private key exponent
Notes on the above steps:
- Step 1: Numbers can be Primality test#Probabilistic_tests for primality.
- Step 3: changed in PKCS#1 v2.0 to \lambda(n) = {\rm lcm}(p-1, q-1) \, instead of \phi(n) = (p-1)(q-1) \,.
- Step 4: A popular choice for the public exponents is e\, = 216 + 1 = 65537. Some applications choose smaller values such as e\, = 3, 5, or 35 instead. This is done to make encryption and signature verification faster on small devices like smart cards but small public exponents may lead to greater security risks.
- Steps 4 and 5 can be performed with the extended Euclidean algorithm; see modular arithmetic.
The public key consists of the modulus n\, and the public (or encryption) exponent e\,.
The private key consists of the modulus n\, and the private (or decryption) exponent d\, which must be kept secret.
- For efficiency a different form of the private key can be stored:
- p\, and q\,: the primes from the key generation,
- d\mod (p - 1)\, and d\mod(q - 1)\,: often called dmp1 and dmq1.
- q^{-1} \mod(p)\,: often called iqmp
- All parts of the private key must be kept secret in this form. p\, and q\, are sensitive since they are the factors of n\,, and allow computation of d\, given e\,. If p\, and q\, are not stored in this form of the private key then they are securely deleted along with other intermediate values from key generation.
- Although this form allows faster decryption and signing by using the Chinese Remainder Theorem, it is considerably less secure since it enables side channel attacks. This is a particular problem if implemented on smart cards, which benefit most from the improved efficiency. (Start with y = x^e mod n and let the card decrypt that. So it computes y^d \pmod{p} or y^d \pmod{q} whose results give some value z. Now, induce an error in one of the computations. Then \gcd(z-x,n) will reveal p or q.)
Encrypting messages
Alice transmits her public key (n\, & e\,) to Bob and keeps the private key secret. Bob then wishes to send message M to Alice.
He first turns M into a number m\, < n\, by using an agreed-upon reversible protocol known as a #Padding schemes. He then computes the ciphertext c\, corresponding to:
c = m^e \mod{n}
This can be done quickly using the method of exponentiation by squaring. Bob then transmits c\, to Alice.
Decrypting messages
Alice can recover m\, from c\, by using her private key exponent d\, by the following computation:
m = c^d \mod{n}.
Given m\,, she can recover the original message M.
The above decryption procedure works because first
c^d \equiv (m^e)^d \equiv m^{ed}\pmod{n}.
Now, e d \equiv 1\pmod{(p - 1)(q - 1)}, and hence
e d \equiv 1\pmod{p - 1}\, and
e d \equiv 1\pmod{q - 1}\,
which can also be written as
e d = k (p - 1) + 1\, and
e d = h (q - 1) + 1\,
for proper values of k\, and h\,. If m\, is not a multiple of p\, then m\, and p\, are coprime because p\, is prime; so by Fermat's little theorem
m^{(p-1)} \equiv 1 \pmod{p}
and therefore, using the first expression for e d\,,
m^{ed} = m^{k (p-1) + 1} = (m^{p-1})^k m \equiv {1}^k m = m \pmod{p}\,.
If instead m\, is a multiple of p\,, then
m^{ed} \equiv 0^{ed} = 0 \equiv m \pmod{p}.
Using the second expression for e d\,, we similarly conclude that
m^{ed} \equiv m \pmod{q}\,.
Since p\, and q\, are distinct prime numbers, applying the Chinese remainder theorem to these two congruences yields
m^{ed} \equiv m \pmod{pq}.
Thus,
c^d \equiv m \pmod{n}.
A working example
Here is an example of RSA encryption and decryption. The parameters used here are artificially small, but you can also Wikibooks:Transwiki:Generate a keypair using OpenSSL.
- Choose two prime numbers
- :p = 61 and q=53
- Compute n = p q \,
- :n=61*53=3233
- Compute the totient \phi(n) = (p-1)(q-1) \,
- :\phi(n) = (61 - 1)(53 - 1) = 3120\,
- Choose e>1 coprime to 3120
- :e=17
- Compute d\, such that d e \equiv 1\pmod{\phi(n)}\, (d is uniquely determined by e and \phi(n)\,)
- :d=2753
- :17 * 2753 = 46801 = 1 + 15 * 3120.
The public key is (n=3233, e=17). For a padded message m\, the encryption function is:
c = m^e\mod {n} = m^{17} \mod {3233}.
The private key is (n=3233, d=2753). The decryption function is:
m = c^d\mod {n} = c^{2753} \mod {3233}.
For example, to encrypt m=123, we calculate
c = 123^{17}\mod {3233} = 855.
To decrypt c = 855, we calculate
m = 855^{2753}\mod {3233} = 123.
Both of these calculations can be computed efficiently using the square-and-multiply algorithm for modular exponentiation.
Padding schemes
When used in practice, RSA is generally combined with some padding (cryptography). The goal of the padding scheme is to prevent a number of attacks that potentially work against RSA without padding:
- When encrypting with low encryption exponents (e.g., e = 3) and small values of the m, (i.e. m
References
- Menezes, Alfred; van Oorschot, Paul C.; and Vanstone, Scott A. Handbook of Applied Cryptography. CRC Press, October 1996. ISBN 0-8493-8523-7
- R. Rivest, A. Shamir, L. Adleman. A Method for Obtaining Digital Signatures and Public-Key Cryptosystems. Communications of the ACM, Vol. 21 (2), pp.120–126. 1978. Previously released as an MIT "Technical Memo" in April 1977. Initial publication of the RSA scheme.
- Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms, Second Edition. MIT Press and McGraw-Hill, 2001. ISBN 0-262-03293-7. Section 31.7: The RSA public-key cryptosystem, pp.881–887.
External links
- PKCS #1: RSA Cryptography Standard (RSA Laboratories website)
- The PKCS #1 standardization "provides recommendations for the implementation of public-key cryptography based on the 'RSA algorithm, covering the following aspects: cryptographic Primitive type; encryption schemes; Digital signature schemes with appendix; ASN.1 syntax for representing keys and for identifying the schemes".
- Thorough walk through of RSA
- Online RSA Encryption Application
- RSA demo with Java and Javascript
- How the RSA Cipher Works
- Menezes, Oorschot, Vanstone, Scott: Handbook of Applied Cryptography (free PDF downloads), see Chapter 8
- Onur Aciicmez, Cetin Kaya Koc, Jean-Pierre Seifert: On the Power of Simple Branch Prediction Analysis
- A New Vulnerability In RSA Cryptography, CAcert NEWS Blog
- Example of an RSA implementation with PKCS#1 padding (LGPL source code)
- RSA implementation in the Tcl programming language
- A New Method of Serial Modular Multiplication describes a hardware design that does multiplication and modulo reduction simultaneously in a bit-serial fashion, speeding up operations such as RSA by a large factor. Creating the FAP4 chip is an informal description of implementing a chip (the world's first RSA chip, in 1985) using this design.
RSA - Home
Brown's recovery. Matthew Taylor predicts a narrowing in the polls as focus shifts away from politics and firmly onto the economy.
RSA from FOLDOC
RSA < cryptography, company > (The initials of the authors) 1. RSA Data Security, Inc. 2. Their cryptography systems, especially RSA encryption. The RSA algorithm was first ...
RSA, The Security Division of EMC - Security Solutions for Business ...
RSA, The Security Division of EMC, provides Secure Data, Compliance, SIM, SEM, Consumer Identity, and Access solutions to over 90% of the Fortune 500.
RSA - Home
Matthew's Blog. Catch up with RSA news and join our chief executive as he covers a variety of issues in his blog. In the latest post, he is grasping for a more positive spin on ...
RSA - Wikipedia, the free encyclopedia
In cryptography, RSA is an algorithm for public-key cryptography. It is the first algorithm known to be suitable for signing as well as encryption, and one of the first great ...
RSA SecurID
RSA SecurID two-factor authentication includes hardware token authenticators, software authenticators, authentication agents and appliances.
The Royal Scottish Academy, Edinburgh, Scotland
The Royal Scottish Academy RSA the Mound Edinburgh Scotland, the home of contemporary Scottish art.
RSA encryption from FOLDOC
RSA encryption < cryptography, algorithm > A public-key cryptosystem for both encryption and authentication, invented in 1977 by Ron Rivest, Adi Shamir, and Leonard Adleman.
User account | RSA Networks
Welcome to the RSA Networks platform, an online space in which RSA Fellows can connect and collaborate. The first time you visit, you need to ‘ create a new account
RSA Environmental Health Ltd
Provides environmental health consultancy and training. Includes details of services. Located in Northamptonshire, UK.