Cryptography, Digital Signatures, and Public Key Certificates

CS4244 - WWW: The Underlying Technology - Prof. Abrams

Reference:



Overview

Example

So Alice and Bob use cryptography to achieve confidentiality of their message.

In addition to confidentiality, cryptography can be used for:


Algorithms We'll Look At:

Encryption Algorithms

Key-Exchange Algorithms

One-Way Hashing Algorithms


Secret-Key Encryption

The communicating partners (Alice and Bob) share a secret (the key) used to encrypt and decrypt messages.

Simple Example -- the XOR algorithm

This simple-XOR algorithm is a polyalphabetic substitution cipher.

Analysis of XOR algorithm:

Real examples:

DES (Digital Encryption Standard)
RC2, RC4
IDEA (International Data Encryption Algorithm)
AES (Advanced Encryption Standard)


Key-Exchange Protocols

How can Bob and Alice use plaintext over the Internet itself to agree on a secret key to ues in the encryption algorithm?

Example Protocol -- Diffie-Hellman Key Exchange Protocol:

Algorithm ensures that Kx =Ky, so they can be used as secret key.

A third party (Eve) cannot determine value of secret key by eavesdropping. The reason is that it is difficult to determine K_x (= K_y) given the values X and Y.


Public-Key Encryption Algorithms

It turns out that Bob and Alice haven't yet studied exponentials in school, so they don't believe that secret key encryption works.  Do they have an alternative?

Yes!  Use public keys!

It uses two different keys, one for encryption and one for decryption.

Bob has two keys:

Anyone that wants to send secure message to Bob must know the public key, and uses it to encrypt the message. Bob receives the message and decrypts it with private key.

Even the parents can know the public key!  But Alice never needs to know the secret key!
 
 

Example:

If Alice wants to send a secure message to Bob: The parents (and even Alice) cannot decode Alice's message, since only Bob has the secret private key.  The private key's sort of like a secret decoder ring!

 
Advantage of public key encryption:

Alice and Bob don't have to share a secret or use a secure channel (e.g., the telephone) to exchange a key.
 

Disadvantage:

1) Bob must distribute his public key to Alice, so Alice can send encrypted messages.

(But how does Alice know the public key came from Bob, and not from the parents?  Alice could wind up encrypting messages that only the parents can decrypt!  More on this problem later...)

2) Alice must wait longer to get her messages encrypted with a public key algorithm compared to a secret key algorithm.

3) Alice could get the best of both worlds by using a hybrid protocol:


Example Algorithm -- RSA (Ron Rivest, Adi Shamir, Leonard Adleman):

The "de facto" standard in public key encryption.

Algorithm has two phases.

See http://www.rsa.com/rsalabs/newfaq/q8.html for the actual algorithm.

Comments:

"If one could factor n into p and q, however, then one could obtain the private key d. Thus the security of RSA is related to the assumption that factoring is difficult." [From RSA FAQ.]
  • Patent until 20 Sept. 2000 held by RSA Data Security, Inc. (but most non-US countries don't recognize patent, and use public key encryption anyway)
  • Licensed to many companies

  • One-Way Hash Functions

    The algorithms presented so far are used to prevent a 3rd party from viewing a message.

    But that won't stop someone from corrupting or otherwise changing a message.

    So how can we guard against someone changing a message? Use a One-Way Hash Function!

    The purpose is to generate a digest of a message that has the following properties:

    Example Algorithm: SHA (Secure Hash Algorithm):

    Designed by the U.S. National Institute of Science and Technology (NIST) and NSA and proposed as a standard.

    "The algorithm takes a message of less than 264 bits in length and produces a 160-bit message digest. [From RSA FAQ]"

    1. Alice computes digest of the message and encrypts digest with her private key. Encrypted digest is called digital signature of message.
    2. Alice sends message and digital signature to Bob.
    3. Bob receives message and digital signature. He decrypts digital signature using Alice's public key. After that, he computes digest and compares it with value decrypted. If the two digests are the same, Bob is sure that message was not altered during transmission.

    Other Algorithms:


    How Can Bob Be Sure Who Sent a Message and When it Was Sent?

    If Alice sends a message to Bob on 2/21/97:


    Public Key Certificates

    Problem:
    How does Alice know Bob's public key?
    Solutions:
    A certificate binds a public key to an individual:
    [Certificates] allow verification of the claim that a specific public key does in fact belong to a specific individual.

    Certificates help prevent someone from using a phony key to impersonate someone else. [from RSA FAQ]


    Bob's X.509 certificate consists of the following fields:
     

    How does Alice verify the certificate?

    When Alice wants to send a message, she asks Bob for his certificate. Bob sends the certificate. Alice verifies the validity of the certificate (see below) and extracts the public key.

    How does Alice know the public key of the issuer?


    Examples of Security Settings in Web Browsers

    Image of the Security Info menu item in Netscape Navigator 4.7



    Conclusions

    Cryptography is controversial because: U.S. export controls on cryptography are also controversial:
  • Due to international terrorism, U.S. government in the past forbid export of strong crypographic algorithms (classified as a type of munitions), even though similar software is available abroad.
  • Cryptograpic-enabled Web software is available free on non-U.S. servers, but U.S. citizens cannot download it without violating patent law!
  • However, export regulations are changing.  As of November 1999 the Clinton administration issued this draft rule:
  • "You may export and re-export to any end-user retail encryption commodities, software and components... Encryption products exported under this paragraph can be used to provide products and services to any end-user."
    However, the meaning of "retail" is ambiguous.
  • Things are improving: In spring '96 National Science Foundation recommended loosening U.S. export regulations, and RSA has begun licensing for free to noncommercial organizations.

  • Last modified on 30 Nov 99 by abrams@vt.edu.