Lecture topics 11 29
1 / 21

Lecture Topics: 11/29 - PowerPoint PPT Presentation

  • Uploaded on

Lecture Topics: 11/29. Cryptography symmetric key (secret key) public/private key digital signatures. Announcements. Next Monday, Mike Swift will talk about operating system security Next Wednesday, I will give a wrap up of the class and hand out class evaluations

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about ' Lecture Topics: 11/29' - anitra

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Lecture topics 11 29
Lecture Topics: 11/29

  • Cryptography

    • symmetric key (secret key)

    • public/private key

    • digital signatures


  • Next Monday, Mike Swift will talk about operating system security

  • Next Wednesday, I will give a wrap up of the class and hand out class evaluations

    • your web servers are also due

  • Final is on Wednesday December 13th

  • Review session

    • Sunday December 10th OR

    • Monday December 11th


  • Cryptography transforms data so that it is useless to your opponent

  • Your opponent could be

    • the Roman Empire

    • the CIA

    • someone eavesdropping on your network

  • Your data could be

    • battle plans

    • credit card number

  • Cryptography has been around for a long time, but since WWII it has really become a science

Encrypt decrypt

  • Cryptography has two stages

  • Encrypting converts plaintext data into an unusable form (known as ciphertext)

  • Decrypting converts ciphertext back to plaintext





Attack at Dawn!


Attack at Dawn!




Encryption works when
Encryption Works When…

  • Encryption function cannot be easily inverted

    • "!nwaD ta kcattA" is no good

  • Encryption and decryption can be done safely

    • no one is looking over your shoulder or tapping your network

  • The keys are protected

    • it doesn't work if your login password is written on the monitor

    • you shouldn't write your PIN # on your ATM card

Bad encryption schemes
Bad Encryption Schemes

  • Add 1 to every letter

    • e.g. attack at dawn -> buubdl bu euxo

    • can figure out actual letters based on their frequency (E, T, A, …)

  • Any scheme that reassigns or swaps letters is weak

  • Generally any encryption scheme that requires the algorithm to remain secret is bad

    • German's Enigma machine in WWII

Symmetric key encryption
Symmetric Key Encryption

  • A good encryption scheme uses a random key (128 bit string) and a bunch of math operations to encrypt data

    • practically impossible to decrypt without the key

  • The same key and the same algorithm can be used to decrypt the data

  • This is known as symmetric key encryption because the same key is used for encryption and decryption

  • It is also known as secret key encryption

  • Example: DES, AES, blowfish, RC2

Attack at Dawn!


Attack at Dawn!



same key

same algorithm

Symmetric key evaluation
Symmetric Key Evaluation

  • Symmetric key encryption can be used whenever the key can be safely given to everyone who needs it

    • how would I safely send my credit card number to Amazon?

  • Advantage: it's very fast

    • 1 Gbit/sec in hardware

    • 100 Mbit/sec in software

  • Good for encrypting large pieces of data

    • files

    • network traffic


  • Communication between persons or computers is inherently insecure

    • Your little sister might listen in on phone conversations

    • Someone on your Ethernet sees all of your network traffic (known as eavesdropping)

  • Secure communication over an insecure channel requires encryption

  • An even more severe attack occurs when communication goes through an attacker. The attacker can

    • see every message

    • discard any message

    • modify messages from either party

    • replay old messages

    • this is known as a man-in-the-middle attack

Public key encryption

Public Key


Private Key



Private Key

Public Key

[email protected]



Public Key Encryption

  • Public/private key encryption uses two different keys to encrypt and decrypt

  • Data encrypted with the public key can only be decrypted with the private key

  • Data encrypted with the private key can only be decrypted with the public key

  • Public key is known by everyone, private key is known only to you

Public private key examples
Public/Private Key Examples

  • I want to send you a secret message

    • I encrypt it with your public key

    • Only you have the private key, so only you can decrypt it

  • I want you to know that I sent the message

    • I first encrypt it with my private key

    • Then I encrypt it with your public key

[X]KEY is notation for X being encrypted with KEY

Insecure channel





[Message] MyPriv

[Message] MyPriv

[[Message] MyPriv ] YourPub

[[Message] MyPriv ] YourPub

Public private key evaluation
Public/Private Key Evaluation

  • Don’t have to share a secret to communicate securely

    • still need some way to get someone's public key (usually trusted third party, e.g. Verisign)

  • Disadvantage: it's very very slow

    • more than 1000 times slower than secret key encryption

  • Too slow to be used to encrypt large amounts of data

    • so how can network communication be secure?

Negotiating a secret key
Negotiating a Secret Key

  • Frequently public/private keys are used to negotiate a shared secret key

  • Messages used to find a secret key must be small

  • Messages encrypted with the secret key can be any size


[What secret key to use?] AmazonPub

[Use SymmetricKeyXYZ] YourPub

[Order form w/ credit card #] SecretKeyXYZ

[Receipt w/ credit card #] SecretKeyXYZ

Digital signatures
Digital Signatures

  • Need a way to "sign" messages to verify who they came from

  • If send the message "Reminder: The final is at 8:30", I don't want someone to change it to "The final has been cancelled, everyone gets an A"

  • I could encrypt the whole message with my private key

    • only I can encrypt messages with my private key so you know I sent the message

    • problem: too slow for large messages

  • Solution: message digests

One way hashes
One-way Hashes

  • A one-way hash function hashes data to a value, and it’s impossible to guess the original value from the hash

  • It's almost impossible to find collisions

    • it's very very unlikely that two messages could produce the same hash value

  • Example: MD5 hashes data to a 128-bit value

    • no MD5 collisions have ever been found

  • Can be used to store passwords

    • store MD5 hash of a password in a password file

    • when checking a password, first hash it and then compare it to what is in the file

    • no way to get the password from the stored hash value

One way hash continued

“Impossible” to modified Data w/ Identical Hash value

Modified Data w/ Identical Chksum

Orig. Data w/ One-way Hash

Orig. Data w/ Chksum









One-way Hash Continued

  • A one-way hash is similar to a checksum, but much safer

  • It's easy to modify a message that preserves the original checksum

  • It's impossible to modify a message that preserves the original one-way hash value

Message digest

We the people of the United States, in order to form a more perfect union


until an election of Representatives shall have intervened.

AFD4 17E9 C039 BAD3

1C84 F832 7326 836C

275D CA86 5ED0 0345

9831 8376 CD72 C98C

Message Digest

  • A message digest is a one-way hash of a message

    • much smaller than the original message

    • “impossible” to find another message that generates the same digest

Constitution of the United States

Digest of the Constitution. Cannot find another document that generates the same digest.

Digital signatures1
Digital Signatures perfect union

  • I can digitally sign a message by

    • computing a digest of the message

    • encrypting the digest with my private key

  • You can verify I wrote the message by

    • decrypting the digest using my public key

    • computing the digest of the message

    • comparing this digest with the decrypted digest

  • Much faster than encrypting the entire message

  • Problem: replay attacks

    • what if I sent the message “Class is cancelled today” and signed it

    • what prevents someone from retransmitting this message everyday?

    • Solution: don’t write ambiguous messages (i.e. use timestamps) or use challenge response

Challenge response
Challenge/Response perfect union

  • To verify the server’s identity, the client challenges the server

  • The challenge is usually to encrypt a random string (known as a nonce) with the server’s private key

  • Only the true server can encrypt the nonce with its private key

  • If server responds with the correct encrypted nonce, the client trusts his identity

  • The nonce is a different random string each time so replay attacks are impossible

Simplified ssl

Nonce perfect union


[Amazon.com, AmazonPubKey]VerisignPubKey




Establishing a secure connection with SSL


[Credit Card Number]SecretSessionKey



Simplified SSL

  • Some additional information is transferred with each message, but this simplified version contains all of the necessary details


Explanation of simplified ssl
Explanation of Simplified SSL perfect union

  • The client sends the server a nonce to prevent a replay attack, and the server stores this nonce

  • The server sends the client a certificate, which contains it’s name and public key. This certificate has been digitally signed by Verisign (a trusted third party)

  • The client chooses a secret (symmetric) session key to use for this connection. It encrypts this key with the server’s public key and sends it to the server.

  • The server decrypts the session key using it’s private key. It sends the original nonce back to the client encrypted with the session key. The client now has verified that it is actually talking with the correct server, because only the correct server can decrypt the session key sent in step 3.

  • Any remaining secret communication between the client and server can use the session key.

  • There is much more to SSL than what is presented here. There are a vast number of options and features.