You are on page 1of 4

Cryptographic Algorithms

Symmetric Key

Symmetric or single-key cryptosystems are most common. They have been in use for centuries and are
significantly used by the military. Consider the following picture.

P = D ( K, E( K, P ) )

Symmetric key algorithms are the workhorses of modern cryptographic systems. They are generally much
faster than public key algorithms. There are three problems that limit their use in the real world:

1. For two parties to securely exchange information using a symmetric key algorithm, those parties must
first exchange an encryption key. Exchanging an encryption key in a secure fashion can be quite
difficult.

2. As long as they wish to send or receive encrypted messages, both parties must keep a copy of the
symmetric key. If one party’s copy is compromised and the second party doesn’t know this fact, then
the second party might send a message to the first party and that message could then be subverted
using the compromised key. This is called a man-in-the-middle attack.

3. If each pair of parties wishes to communicate in private, then they need a unique key. This requires (n2
– n)/2 keys for n different users. For the 30 users in this class, that is 435 unique keys. This may not
seem like much but consider the fact that Clemson University has 20,768 students. If you wanted to
communicate with each of them, you would need to store 20,767 keys on your system in advance. If
everyone wanted to communicate privately with everyone else at Clemson, that would require
215,644,528 symmetric keys.

Public Key Cryptosystems

In 1976 a new approach to cryptosystem was proposed where there was one key to encrypt the plaintext
and a different key used to decrypt the ciphertext. The key used to encode the message is public, i.e. it is
known to the world. The key that is used to decode the encoded message is private, i.e. this key is only
known to the individual. Pictorially we have
P = D ( KD, E ( KE, P ) )

3 Characteristics

1. It must be computationally easy to encipher and decipher a message given the appropriate key.

2. It must be computationally infeasible to derive the private key from the public key

3. It must be computationally infeasible to determine the private key from a chosen plaintext attack.

The above depiction of encoding and decoding a message using public and private keys can be expressed
as

P = D ( KPub, E(KPri, P))

where KPri is the private key and KPub is the public key.

Note: The Public & Private key can be applied in either order.

Public Key cryptography can also be used for creating a digital signature. Similar to a real signature, a
digital signature is used to denote authenticity or intention. With public key technology you use the private
key to create the digital signature where others can then use your matching public key to verify the
signature.

e.g.
Suppose that Alice wants to send a secret message to Bob and Alice wants Bob to know that the
message can from her. She encrypts the message with her private key and then Bob’s public key

Alice encrypts with her private key and again with Bob’s public key

C = (KBPub, ( KAPri, P))

Bob decrypts with his private key and Alice’s public key.

P = (KAPub, (KBPri, C))


Public key encryption has a significant problem of its own. They are computationally expensive. Public key
encryption and decryption require as much as 1,000 times more computer power than an equivalent
symmetric key encryption algorithm.

To get both the benefits of public key technology and the speed of symmetric encryption systems, most
modern encryption systems use a combination of techniques. Slower public key cryptography is used to
exchange a random session key which is then used as the basis of a symmetric key algorithm. The session
key is only used for a single encryption session and is then discarded. Nearly all practical public key
cryptography implementations are these so called hybrid systems. ssh implements this type of hybrid
system.

There is also a special class of functions that are almost always used in conjunction with public key
cryptography: message digest functions. These algorithms are not encryption algorithms. They are used to
create a fingerprint of a file. A message digest function generates a seemingly random pattern of bits for a
given input. The digest value is computed in such a way that finding a different input that will exactly
generate the given digest is computationally infeasible. The SANS executive summaries implement such a
message digest function.

Good Cipher Characteristics

In 1949 Shannon proposed the following characteristics for a good cipher:

1. The amount of secrecy needed should determine the amount of labor appropriate for the encryption
and decryption
This is just common sense in that why spend tons of money on protecting something that has
little value?

2. The set of keys and the enciphering algorithm should be free from complexity
This implies that we should restrict neither the choice of keys nor the types of plaintext on
which the algorithms can work. If the process is too complex, it will not be used.
Furthermore, the key must be transmitted, stored, and remembered, so it must be short.

3. The implementation of the process should be as simple as possible.


This principle reflects the date when the characteristics were proposed. It references a hand
implementation of an encryption algorithm. Today with the computational power that we
have, we have very complex encryption algorithms. Still keeping it as simple as possible is a
good idea.

4. Errors in ciphering should not propagate and cause corruption of further information in the message.
Principle 4 acknowledges that there are errors in the enciphering process, errors in
computing, transmission, or human entry. One early error in the process should not throw off
the entire remaining cipher.

5. The size of the enciphered text should be no larger than the text of the original message.
A ciphertext that expands dramatically in size cannot possibly carry more information than
the plaintext, yet it gives the cryptanalyst more data from which to infer a pattern. Also a
longer ciphertext implies more space for storage and more time to communicate.
Properties of Trustworthy Encryption Systems

1. It is based on sound mathematics


Good cryptographic algorithms are not just invented. They are derived from solid principles.

2. It has been analyzed by competent experts and found to be sound


Even the best cryptographic experts can think of only so many possible attacks. The
developers may become too convinced of the strength of their own algorithm. A review by
critical outside experts is essential.

3. It has stood the “test of time”.


As a new algorithm gains popularity, people continue to review both its mathematical
foundations and the way that it builds upon those foundations. Although a long period of
successful use and analysis is not a guarantee of a good algorithm, the flaws in many
algorithms are discovered relative soon after their release.

We will be talking about several commercial grade data encryption algorithms later. Three algorithms are
popular in the commercial world, namely DES (data encryption standard), RSA (Rivest-Shamir-Adelman),
and AES (advanced encryption standard).

The table below compares the symmetric and public key approaches to encryption.

Symmetric Key Public (Asymmetric) Key

Number of Keys 1 2

Protection of Key Must be kept secret One key must be kept


secret; the other can be
freely exposed

Best Uses Cryptographic workhorse; secrecy Key exchange,


and integrity of data – single authentication
characters to blocks of data,
messages, files

Key Distribution Must be out-of-band Public key can be used to


distribute other keys

Speed Fast Slow; typically, 10,000


times slower than
symmetric key

You might also like