CSCE 313 Lecture 25
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
- start with 64-bit plaintext
- permute order of plaintext (IP) using known permutation scheme
- Perform 16 rounds of XOR substitution
- 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
- Choose
- and
- Select that is relatively prime to (and less than) 72, such as 5
- Finally, we calculate such that , yielding 29
- Public key = (5, 91), private key = (29, 91)
- Encrypting the message 69 with public key is 62:
- 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