Encryption Algorithms

From
Jump to navigation Jump to search

Symmetric Cryptography

What is it?

follows soon...

DES a symmetric encryption 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 eP (ecncryption key) and one private key dP (decryption key) for each person P . While the public key eP can be published to the whole world the private key dP is to be treaten as a secret and only the person P 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 (eP,dP) , publish eBob and tell Bob his private key dBob .

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 ks .
  • Then symmetric cryptography is used for encryption and decryption of the data with the exchanged key ks.

So these method offers the comfortable key management as well as the velocity.

RSA an asymmetric encryption 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 φ(n) is the number of positive integers less than n that are relatively prime to n (a positive integers a is relativly prime to n if the greatest common divisor of a and n 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.

Preparation work

Since RSA is an asymetric encryption algorithm we need a public key e and a private key d for each Person. This is done by ...

  1. searching big primes p,q
  2. computing n=pq
  3. computing φ(n)=(p-1)(q-1)
  4. choosing a number e which is relatively prime to φ(n)
  5. computing d with ed=1 mod φ(n) (that is when ed=k(p-1)(q-1)+1
  6. forgetting p,q,φ(n) (or keeping this numbers secret!!)
  7. giving d to the person as a private (secret) key
  8. publish e and n

If Alice wants to send a message to Bob...

soon

Digital Signature

soon

How secure is RSA?

soon