Encryption Algorithms: Difference between revisions
Line 21: | Line 21: | ||
So these method offers the comfortable key management as well as the velocity. |
So these method offers the comfortable key management as well as the velocity. |
||
=== RSA an asymmetric algorithm === |
=== RSA an asymmetric algorithm === |
||
The RSA Algorithm was invented by R.Rivest,A.Shamir and L.Adleman in 1978 while they were attempting to show that Public Key Cryptography is impossible. |
|||
=== How does it work? === |
|||
RSA is based on the following fact: <br> |
|||
Let ''n=pq'' be the product of 2 primes ''p,q (p≠q)''. Then for every natural number ''m<n'' and for every natural number ''k'' we have |
|||
<center> |
|||
'''<math>m^{k(p-1)(q-1)+1}\bmod n = m </math>'''<br> |
|||
<math>((p-1)(q-1) = \phi (n) )</math></center> |
|||
The function <math> \phi </math> is called the Euler phi function, where <math>\phi (n)</math> is the number of positive integers less than ''n'' that are relatively prime to ''n''(Two positive integers ''a'' and ''b'' are relativly prime when their greatest common divisor is 1. |
|||
If you want, look in below listed cryptography-books for more details of number theory. There you also find the necessary information for proving the above statement. The focus of this site is just to present and not to deduce the basic statements used by RSA. <br> |
|||
=== What do I have to do to enable a group of humans to communicate with RSA? === |
|||
#search big primes ''p,q'' |
|||
#compute ''n=pq'' |
|||
#compute <math> \phi (n)=(p-1)(q-1) </math> |
|||
#choose a number ''e'' which is relatively prime to <math> \phi (n)</math> |
|||
#compute ''d'' with <math> ed=1 \bmod \phi (n)</math> (that is when ''ed=k(p-1)(q-1)+1 '' |
|||
#forget ''p,q,φ(n)'' (or keep this numbers secret!!) |
|||
#give ''d'' to the person as a private (secret) key |
|||
#publish ''e'' and ''n'' |
|||
=== If Alice wants to send a message to Bob... === |
Revision as of 20:58, 29 January 2005
Symmetric Cryptography
What is it
follows soon...
DES a symmetric algorithm
follows soon...
Asymmetric Cryptography
What is it
The concept of Asymetric Cryptography, also called Public Key Cryptography, was described for the first time by Whitfield Diffie and Martin Hellman in 1976. In contrast to the Symmetric Cryptography in which we have the same secret key for encryption and decryption, we now have one public key (ecncryption key) and one private key (decryption key) for each person . While the public key can be published to the whole world the private key is to be treaten as a secret and only the person knows it. An important characteristic of such a crypto system is that it is computationally infeasible to determine the private key given the corresponding public key.
The idea of Public Key Cryptography can be visualised like a mailbox. Generally the address of someone is public and everybody can send him a letter, but only the reciever owns the key for opening the mailbox and reading the letters. Remember that Symmetric Cryptography works like a safe. For instance assume that Alice wants to send a message m to Bob. She encrypts the plaintext m with Bob's public key e , computes the ciphertext c=f(m,e) and sends c to him. Now Bob can decrypt the recieved cipher c with his private key d and computes the plaintext m=f'(c,d).
The biggest advantage of Asymetric Cryptography is the enormously reduced effort for the key management. Imagine a company with 100 staffers gets a new employee Bob and you have to offer Bob the possibility to communicate securely to each other person. Using a symmetric crypto system means that you must create 100 new keys and distribute them. With a asymetric system you only have to create the key pair , publish and tell Bob his private key .
A disadvantage is the velocity. Comparing DES and RSA the most popular representatives of both worlds, we get that DES is at least 100 times as fast in software and between 1,000 and 10,000 times as fast in hardware. Generally we can say that asymetric algorithms are significant slower than symmetric algorithms.
A solution for this are Hybride Systems which work as follows:
- First asymmetric cryptography is used for the key exchange of a session key .
- Then symmetric cryptography is used for encryption and decryption of the data with the exchanged key .
So these method offers the comfortable key management as well as the velocity.
RSA an asymmetric algorithm
The RSA Algorithm was invented by R.Rivest,A.Shamir and L.Adleman in 1978 while they were attempting to show that Public Key Cryptography is impossible.
How does it work?
RSA is based on the following fact:
Let n=pq be the product of 2 primes p,q (p≠q). Then for every natural number m<n and for every natural number k we have
The function is called the Euler phi function, where is the number of positive integers less than n that are relatively prime to n(Two positive integers a and b are relativly prime when their greatest common divisor is 1.
If you want, look in below listed cryptography-books for more details of number theory. There you also find the necessary information for proving the above statement. The focus of this site is just to present and not to deduce the basic statements used by RSA.
What do I have to do to enable a group of humans to communicate with RSA?
- search big primes p,q
- compute n=pq
- compute
- choose a number e which is relatively prime to
- compute d with (that is when ed=k(p-1)(q-1)+1
- forget p,q,φ(n) (or keep this numbers secret!!)
- give d to the person as a private (secret) key
- publish e and n