Top Banner
CS110: Computers and the Internet Encryption and Certificates
20
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CS110: Computers and the Internet Encryption and Certificates.

CS110: Computers and the Internet

Encryption and Certificates

Page 2: CS110: Computers and the Internet Encryption and Certificates.

Encryption and security

Page 3: CS110: Computers and the Internet Encryption and Certificates.

Ciphers• Encryption terminology:

– plaintext: message to be sent, in readable form– ciphertext: message in coded form, unreadable without a key– encrypt: turn plaintext into ciphertext– decrypt: turn ciphertext back into plaintext– cryptanalysis: cracking a code without the required special information– cryptography: study of codes and code-breaking

Page 4: CS110: Computers and the Internet Encryption and Certificates.

Caesar Codes

• The idea behind Caesar Codes is letter substitution.

• One strategy uses rotation.

Page 5: CS110: Computers and the Internet Encryption and Certificates.

Substitution codes are easy to break

• XLI UYMGO FVSAR JSB NYQTW SZIV XLI PEDC HSK

• TLE UYMGO FVSAR JSB NYQTW SZIV TLE PEDC HSK

• T=X R=4• Method: frequency analysis

Page 6: CS110: Computers and the Internet Encryption and Certificates.

Implementing Caesar Ciphers using the ASCII table

• encoded_char = (plaintext_char + rotation_amount) % 128;

Plaintext: By sea

Ciphertext: F} wie

Page 7: CS110: Computers and the Internet Encryption and Certificates.

Vigenere Cipher: multiple Caesar ciphers.

• A Vigenere Cipher use multiple Caesar ciphers. • Using a Vigenere Cipher to encrypt a message:– Select a keyword (e.g. CAT)– Convert the letters of the keyword to a sequence of

rotations, each in the range from 0 to 25 (e.g. "CAT" is converted to the rotation sequence 2-0-19)

– Use the sequence of rotations to encode successive letters of the message, repeatedly cycling through the rotations (e.g. 2-0-19-2-0-19-2-0-19...)

Page 8: CS110: Computers and the Internet Encryption and Certificates.

Ecoding using the Vigenere Cipher

Page 9: CS110: Computers and the Internet Encryption and Certificates.

Try it yourself

• Key word: CODECODECODECO• Plaintext: ATTACK AT DAWN• Ciphertext:CHWEEY EV GEYB

• Because a Vigenere cipher uses more than one substitution alphabet, it's one of a bunch of ciphers known as polyalphabetic. It was unbreakable for 300 years!

Page 11: CS110: Computers and the Internet Encryption and Certificates.

Private Key Encryption

Key distribution problem: finding a secure way of sending a private key in order to have a secure way for communicating

Page 12: CS110: Computers and the Internet Encryption and Certificates.

Public Key Encryption

• 1976, Diffie-Hellman key exchange: deriving a shared private key over an insecure channel.

• 1977, RSA method (Ron Rivest, Adi Shamir and Leonard Adleman): the first practical implementation of public key encryption.

• Main ideas of public key encryption:– Instead of one key, you have two: one to encrypt and a different one to

decrypt– The encryption key can be public– Knowing the encryption key doesn't help you figure out the decryption

key

Page 13: CS110: Computers and the Internet Encryption and Certificates.

Public Key Encryption

Page 14: CS110: Computers and the Internet Encryption and Certificates.

Secure Communication

Page 15: CS110: Computers and the Internet Encryption and Certificates.

Is your information secure?

• Someone can hack into the server

• The server may not be trustworthy

• Someone can pretend to be you

• Someone may look over your shoulder when you type

Page 16: CS110: Computers and the Internet Encryption and Certificates.

Using public key for digital signatures

• – Call of the attack, it’s a trap! Signed Alice

– Go on with the attack, it’s all clear! Signed Alice

• Problem: How does Bob know what is the identity of the sender?

• Solution: Alice will encrypt the message with her private key . – Anyone could decrypt using Alice’s public key but she is the only

one that could encrypt.

Page 17: CS110: Computers and the Internet Encryption and Certificates.

Spoofing

Page 18: CS110: Computers and the Internet Encryption and Certificates.

Spoofing (2)

Page 19: CS110: Computers and the Internet Encryption and Certificates.

Certificates and Signing Authorities

Page 20: CS110: Computers and the Internet Encryption and Certificates.

Whom do you trust?

• Verified website: https://firstclass.wellesley.edu/

• Unknown signer: https://cs.wellesley.edu/