Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cryptography Introduction

Similar presentations


Presentation on theme: "Cryptography Introduction"— Presentation transcript:

1 Cryptography Introduction
CS 465 Cryptography Introduction Last Updated: Sep 7, 2017

2 Cryptography Literal definition means “hidden writing”
Until modern times, cryptography was synonymous with encryption, but the field has expanded This lecture reviews a high-level description of four cryptographic primitives we will learn about this semester Symmetric Encryption (AES) Public-Key Cryptography (RSA) Secure One-Way Hash (SHA-256) Message Authentication Code (MAC)

3 What is Encryption? Transforming information so that its true meaning is hidden Requires “special knowledge” to retrieve Modern encryption algorithms use transposition and substitution in complex ways that are hard to reverse Examples from history that are easy to break ROT-13 (aka Caesar Cipher) is easy to break, simple substitution cipher Vigenere cipher – polyalphabetic substitution cipher Examples of strong encryption AES 3DES RC4 RSA

4 Types of Encryption Schemes
Cipher Classical Substitution Steganography Transposition Rotor Machines Modern Public Key Secret Key GOOD DOG PLLX XLP PLSX TWF GOOD DOG DGOGDOO Hierarchy & Examples based on:

5 Perfect Encryption Scheme?
One-Time Pad (XOR message with key) Example*: Message: ONETIMEPAD Key: TBFRGFARFM Ciphertext: IPKLPSFHGQ The key TBFRGFARFM decrypts the message to ONETIMEPAD The key POYYAEAAZX decrypts the message to SALMONEGGS The key BXFGBMTMXM decrypts the message to GREENFLUID The Russians used pen and pencil one time pad systems, and they were broken because they broke the rule and re-used the pad. Be suspicious of companies that claim they have an encryption system that is a one time pad. *From Applied Cryptography (Schneier)

6 Symmetric Encryption Also known as Conventional encryption
Secret-key encryption Single-key encryption

7 Symmetric Encryption Model
Alice Bob Key Key Plaintext Ciphertext Plaintext Encryption Algorithm Decryption Algorithm

8 Use Cases Web browsing using HTTPS
Encrypted chat (WhatsApp and Signal) Encrypted (PGP)

9 Cryptographic Hash Function
Source:

10 Hashing Use Cases Digital signature
File integrity verification (TripWire) Password hashing Rootkit detection

11 Message Authentication Code (MAC)
This is usually the primitive that students are least familiar with, and they struggle with this the most on exams. Source: Network Security Essentials (Stallings)

12 HMAC Use Cases Web browser message integrity (HTTPS)
Integrity of messages in authentication protocols Cookie integrity Web application remote procedure calls

13 Model for Encryption with Public Key Cryptography
Alice Bob Bob’s Public Key Bob’s Private Key Plaintext Ciphertext Plaintext Encryption Algorithm Decryption Algorithm

14 Model for Digital Signature with Public Key Cryptography
Alice Bob Alice’s Private Key Alice’s Public Key Signing Algorithm Verification Algorithm I encourage students to learn and understand the high-level diagrams. They are an oversimplification, and we will go deeper into the actual algorithms later in the course. ? Plaintext Plaintext

15 Symmetric Encryption

16 Requirements Strong algorithm (cipher) Attacker is unable to decrypt ciphertext or discover the key even if attacker has samples of ciphertext/plaintext created using the secret key Fast Assumption: Sender and receiver must securely obtain and store the secret key

17 Kerckhoffs’ Principle
The security of the symmetric encryption depends on the secrecy of the key, not the secrecy of the algorithm You should be very suspicious of a company that advertises a super secure new algorithm and they don’t tell you what the algorithm is Dr. Auguste Kerckhoffs ( ) Dutch linguist and cryptographer

18 Types of Ciphers Block cipher (3DES, AES) Stream cipher (RC4)
Plaintext is broken up into fixed-size blocks Typical block size (64, 128 bits) Stream cipher (RC4) Process plaintext continuously Usually one byte at a time

19 What can go wrong? Algorithm Key
Relying on the secrecy of the algorithm Example: Substitution ciphers Using an algorithm incorrectly Example: WEP used RC4 incorrectly Key Too big Slow Storage Too small Vulnerable to brute force attack – try all possible keys

20 123 Big Numbers Cryptography uses REALLY big numbers
1 in 261 odds of winning the lotto and being hit by lightning on the same day 292 atoms in the average human body 2128 possible keys in a 128-bit key 2170 atoms in the planet 2190 atoms in the sun 2233 atoms in the galaxy 2256 possible keys in a 256-bit key

21 Thermodynamic Limitations*
123 Physics: To set or clear a bit requires no less than kT k is the Boltzman constant (1.38*10-16 erg/ºK) T is the absolute temperature of the system Assuming T = 3.2ºK (ambient temperature of universe) kT = 4.4*10-16 ergs Annual energy output of the sun 1.21*1041 ergs Enough to cycle through a 187-bit counter Build a Dyson sphere around the sun and collect all energy for 32 years Enough energy to cycle through a 192-bit counter. Supernova produces in the neighborhood of 1051 ergs Enough to cycle through a 219-bit counter Cover this slide briefly. The point is to realize that key sizes are chosen to be impossible to brute force in practice. *From Applied Cryptography (Schneier)

22 Public Key Cryptography
Terminology Public Key Private Key Digital Signature Confidentiality You encrypt with a public key, and you decrypt with a private key Integrity/Authentication You sign with a private key, and you verify the signature with the corresponding public key Examples Diffie-Hellman RSA Elliptic Curve Cryptography (ECC) Identity-based Encryption (IBE) For integrity and authentication, I always avoid saying encrypt with the private key and decrypt with the public key to avoid confusion with the confidentiality case.

23 Assignment Review this slide deck regularly to learn the high level abstractions for these primitives. I’ll expect you to describe them to me on an exam without any notes. You don’t really know something until you can teach it to someone else Study the AES NIST spec and watch the flash demo


Download ppt "Cryptography Introduction"

Similar presentations


Ads by Google