CSCE 313 Lecture 25

From Notes
Jump to navigation Jump to search

« previous | Tuesday, April 24, 2012 | next »


Hash Algorithms

  • Message digests, one-way transformation.
  • Length of hashed value of message (usually fixed) is much shorter than length of message
  • Easy to compute hash value
  • Given the hash value, it is very difficult to find the original message
  • Computationally infeasible to find two messages with the same hash value (collision)

Password Hashing

  • Don't need to know password to verify it
  • Store where is the "salt" and compare it with the user-entered password
  • Salt makes dictionary attack less convenient.

Message Integrity

  • Agree on password
  • Compute for a message

Symmetric Encryption

The same key can be used to encrypt and decrypt: can be derived from and vice versa

EX: DES, AES, shift (caesar) cipher

Caeser Cipher

Select an alphabet , a number , and for each letter , compute

DES

  1. start with 64-bit plaintext
  2. permute order of plaintext (IP) using known permutation scheme
  3. Perform 16 rounds of XOR substitution
  4. permute order again (FP) to produce ciphertext


Asymmetric Encryption

Two different keys used to encrypt and decrypt message

RSA

is public key is private key is product of two large, randomly chosen prime numbers and .

Example

  1. Choose
  2. and
  3. Select that is relatively prime to (and less than) 72, such as 5
  4. Finally, we calculate such that , yielding 29
  5. Public key = (5, 91), private key = (29, 91)
  6. Encrypting the message 69 with public key is 62:
  7. Ciphertext is decoded with private key

Public key is transmitted in plain text to the world.

If someone wants to encrypt a message (or verify signature of message), then they use the public key.

The owner can decrypt (and sign) messages with his or her private key.

Comparison

Symmetric
based on simple transformation
Asymmetric
based on complex, computation-intensive math problems