Top Banner
Intro to Modern Cryptography Zahid Mian Part of the Brown-bag Series
23

Intro to modern cryptography

Aug 17, 2015

Download

Software

zahid-mian
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: Intro to modern cryptography

Intro to Modern Cryptography

Zahid MianPart of the Brown-bag Series

Page 2: Intro to modern cryptography

What We’ll Cover Today

History and Terms Why We Need Encryption How is Encryption Used In Systems Difference in Ciphers Various Implementations Hash Values Digital Signatures Why Attacks Are Successful

Page 3: Intro to modern cryptography

Early Cryptography

Hieroglyphs 4000 years ago Use pictures to represent

words/messages Caesar Shift Cipher

Replace characters by an offset (or shifting)

Offset = 2, then “hello” -> “jgnnq” Improvements over time

Steganography, Vigenere Coding

Page 4: Intro to modern cryptography

Modern Cryptography

Modern really means digital Much more mathematically oriented Operating on bit values Use of public key and secret key Even though algorithm are public,

it’s nearly impossible to obtain original information

Page 5: Intro to modern cryptography

Terms

Plaintext – The original information Cipher – A secret way of writing (an algorithm) Encryption Key – A value that is used to encrypt

plaintext (aka, public key) Decryption Key – A value that is used to decrypt

Ciphertext (aka, private key) Ciphertext - The encrypted information Algorithm – (Often) Public algorithm that uses keys to

encrypt or decrypt information Interceptor/Attacker – unauthorized entity that tries to

determine the cipher text (aka, hacker) Symmetric – single key used for encryption and

decryption Asymmetric – uses public key and private key

Page 6: Intro to modern cryptography

The Ecosytem

http://www.infosectoday.com/Articles/Intro_to_Cryptography/CryptoFig05a.jpg

This is how things generally work today, but there are a lot of pieces that make this happen.

Page 7: Intro to modern cryptography

Common Attacks

Passive – Simply gaining unauthorized access to information. Most common password is 123456

Active – A hacker attempts to make changes to data on the target or data en route Masquerading: hacker pretends to be someone Denial of Service (DoS): deny access to legitimate

users by overwhelming the system (common) Using technical information to steal user id (e.g.,

using session id)

Page 8: Intro to modern cryptography

Some Methods of Active Attacks Known Plaintext Attack (KPA)

Attacker knows plaintext of some part of the ciphertext; attempts to decrypt the rest

Chosen Plaintext Attack (CPA) Attacker has ciphertext and plaintext; attempts to determine key

Brute Force Attack (BFA) Attacker tries to determine key by attempting all possible values

Man in the Middle (MIM) Simple, but technically challenging method of duping both the

sender and the receiver into thinking keys came from correct source

Side Channel Attacks (SCA) Data Remanence (reading data that should have been deleted) Row Hammer (low-level memory hack) Fault Analysis (forcing errors and reading outputs for clues)

Page 9: Intro to modern cryptography

Towards Modern Ciphers

Traditionally Ciphers were single character Caesar Cipher: shift a single character

Two-character Cipher (Playfair) Use two characters as key

String Cipher (Vigenere) Use a string (word) as key

One-Time Pad Key length equals length of plaintext

Block/Stream (DES, AES) Plaintext is processed in blocks/streams of bits

at a time

Page 10: Intro to modern cryptography

Block Ciphers

Simple

Feedback

Page 11: Intro to modern cryptography

Feistel Block Cipher

Underlying model for many block ciphers Same algorithm for encryption/decryption Steps

Input is split into two halves RHS input is transformed by function f which

receives a subkey LHS combined with transformed input from RHS

using XOR operation RHS and LHS are switched to obtain the input

for next round Repeat

Page 12: Intro to modern cryptography

Feistel Structure

32 bit 32 bit

f

32 bit 32 bit

32 bit 32 bit

Ki

LHSi-1 RHSi-1

LHSi-1 = RHSi-1

RHSi-1 = LHSi-1

Page 13: Intro to modern cryptography

Data Encryption Standard (DES) Block size is 64 bits Key length is 64 bits (though only 56 are

used) Round-key generator creates 48-bit Key

• Very Strong Cipher• Fallen out of favor

because small key value• Can be hacked with

exhaustive search

Page 14: Intro to modern cryptography

Triple DES

Don’t abandon original DES; change usage Effectively use 3 Keys (3X56 = 168)

Problem of short key solved Kind of slow

Process Encrypt plaintext using K1

Decrypt output of Step1 using K2

Encrypt output of Step2 using K3

Output of Step3 is ciphertext Decrypt in reverse order

Page 15: Intro to modern cryptography

Advanced Encryption Standard (AES)

The more popular algorithm today Much faster than Triple DES 128-bit data; 128/192/256-bit keys

Key size depends on the number of rounds A “bit” more complex algorithm (pun

intended) For details see online resources

To-Date no attacks against AES have been successful

Page 16: Intro to modern cryptography

Public Key Encryption

Asymmetric Cipher (diff keys)

Necessary due to growth of Internet

Used for smaller pieces of data

Three Types RSA (widely used) ElGamal Elliptic Curve Cryptography

(ECC)

Page 17: Intro to modern cryptography

How RSA Works

http://etutorials.org/Programming/Programming+.net+security/Part+III+.NET+Cryptography/Chapter+15.+Asymmetric+Encryption/15.1+Asymmetric+Encryption+Explained/

Encryptio

n

Page 18: Intro to modern cryptography

Hash Functions

Function that converts arbitrarily long numeric input into a fixed numeric output called a hash

Very Efficient Hard to reverse value Hard to produce same hash for diff inputs Some well known Hash Functions

Message Digest (MD), Secure Hash Function (SHA), RIPEMD

Most Common Use: Password Storage Secure Apps will not save your password in

plaintext

Page 19: Intro to modern cryptography

Digital Signatures

How can we be sure a message is authentic? In the old days, a signature on a letter proved

authenticity Digital Signatures do the same thing-they

ensure that the message is from the original sender with the original message

Adds trust when exchanging data Using Encryption with Digital Signatures is

important Certifying Authority (CA) responsible for

management of certificates Generating, issuing, publishing, verifying, revoking

Page 20: Intro to modern cryptography

Sending a Secure Email Message

Encryption of Email

Decryption of Email

Page 21: Intro to modern cryptography

Why Are Hackers Successful?

User Carelessness / Stolen Credentials

Stolen equipment (laptops, phones, etc.)

Incorrect Implementation / Backdoor Broken Processes / Insider Threats Phishing Attacks Sending sensitive data over plaintext Zero-day threats / Maintenance Application vulnerabilities

Page 22: Intro to modern cryptography

Obligatory Dilbert

Page 23: Intro to modern cryptography

Thank You