Cryptographic Security

Cryptographic methods

Private-key encryption

"Standard" encryption. A key is used to encrypt the message, and the same key is used to decrypt it.
                key                                  key
                 |                                    |
                 v           Ciphertext               v
Message  ---> encrypt ---------------------------> decrypt -->  Message
The ciphertext is only readable by someone who has a copy of the key.

Examples:

Problem: how do you distribute keys securely? If users choose their own keys, they may be easy to guess.

One-way encryption ("secure hashing")

Examples:
    md5("My name is Brian\n") = 0134b6e9397f36c7c9f78fe17d2d7d8e
    md5("Test123\n")          = 36a03a8a4c00e81f03d62d8b04bbbf4d
Applications:

Public key encryption

A two-way encryption system which uses one key to encrypt and a different one to decrypt ("public" key and "private" key). The keys are related, but designed so that the private key cannot be derived from the public key.

Use for message encryption:

               public                              private
                key                                  key
                 |                                    |
                 v           Ciphertext               v
Message  ---> encrypt ---------------------------> decrypt -->  Message
Key distribution is very simple - the public key can be sent by any insecure means. Only the person with the private key can decipher the message.

Use for authentication - here the roles of the private and public keys are reversed:

              private                               public
                key                                  key
                 |                                    |
                 v           Ciphertext               v
Message  ---> encrypt ---------------------------> decrypt -->  Message
If you are able to decipher the text with the public key, this proves that it was generated by the person who has the private key.

Problems:


Last updated 8 October 1996