CSCI100 Introduction to Computing Privacy Security Part I













- Slides: 13

CSCI-100 Introduction to Computing Privacy & Security Part I

• Simplified Communications Model - Diagram

• Encryption is the coding and scrambling process by which a message is made unreadable except by the intended recipient Encryption is needed for electronic commerce • Encryption Basics A readable message is called plaintext I LOVE YOU An encryption algorithm is a formula used to make plaintext unreadable V YBIR LBH The coded message is called ciphertext

Symmetric key encryption are encryption techniques that use the same key to encrypt and decrypt a message Strong encryption refers to encryption methods that are used by banks and military agencies and are nearly impossible to break

• Basic Terminology plaintext - the original message ciphertext - the coded message cipher - algorithm for transforming plaintext to ciphertext key - info used in cipher known only to sender/receiver encipher (encrypt) - converting plaintext to ciphertext decipher (decrypt) - recovering ciphertext from plaintext cryptography - study of encryption principles/methods cryptanalysis (codebreaking) - the study of principles/ methods of deciphering ciphertext without knowing key cryptology - the field of both cryptography and cryptanalysis

• Symmetric Cipher Model

• Two requirements for secure use of symmetric encryption a strong encryption algorithm a secret key known only to sender / receiver Y = EK(X) X = DK(Y) • Assume encryption algorithm is known • Implies a secure channel to distribute key


• Classical Substitution Ciphers Where letters of plaintext are replaced by other letters or by numbers or symbols • Caesar Cipher Earliest known substitution cipher By Julius Caesar First attested use in military affairs Replaces each letter by k-th letter on Example ( what is k ? ): meet me after the toga party PHHW PH DIWHU WKH WRJD SDUWB

Can define transformation (with k = 3) as: a b c d e f g h i j k l m n o p q r s t u v w x y z D E F G H I J K L M N O P Q R S T U V W X Y Z A B C Mathematically give each letter a number a b c 0 1 2 n o 13 14 d e f 3 4 5 p q 15 16 g h i 6 7 8 r s 17 18 j k l m 9 10 11 12 t u v w x y Z 19 20 21 22 23 24 25 Then have Caesar cipher as: Y = EK(X) = (X + k) mod 26 X = DK(Y) = (Y – k) mod 26 EXAMPLE: Encrypt “howdy” using key k = 5

• Cryptanalysis of Caesar Cipher Only have 26 possible ciphers • A maps to A, B, . . Z Could simply try each in turn A brute force search Given ciphertext, just try all shifts of letters


• Brute Force Search Always possible to simply try every key Most basic attack, proportional to key size