Download presentation
Presentation is loading. Please wait.
1
CS1001 Lecture 24
2
Overview Encryption Encryption Artificial Intelligence Artificial Intelligence Homework 4 Homework 4
3
Reading Brookshear, 11.6 Brookshear, 11.6 Brookshear, 10 Brookshear, 10
4
Homework 4 Check Courseworks Check Courseworks Problems based on Problems based on –Handout (Smullyan, Natural Deduction) –Question from Ch. 10 –Question from Ch. 11
5
Some Trivial Schemes Caesar cipher: substitution cipher: Caesar cipher: substitution cipher: –A D, B E Captain Midnight Secret Decoder rings: Captain Midnight Secret Decoder rings: –shift variable by n: IBM HAL, or : (letter + offset) mod 26 (letter + offset) mod 26 – only 26 possible ways of secret coding. Monoalphabetic cipher: Monoalphabetic cipher: –generalization, arbitrary mapping of one letter to another –26!, approximately 4 10 26 –statistical analysis of letter frequencies One-time pad One-time pad –A random sequence of 0’s and 1’s XORed to plaintext
6
Definitions Process data into unintelligible form, reversible, without data loss Process data into unintelligible form, reversible, without data loss Usually one-to-one (not compression) Usually one-to-one (not compression) Other services: Other services: –Integrity checking: no tampering –Authentication: not an imposter Plaintext encryption ciphertext decryption plaintext Plaintext encryption ciphertext decryption plaintext
7
Computational Difficulty Algorithm needs to be efficient. Algorithm needs to be efficient. –Otherwise only short keys can be used. Most schemes can be broken: depends on $$$. Most schemes can be broken: depends on $$$. –E.G. Try all possible keys. Longer key is often more secure: Longer key is often more secure: –Encryption O(N+1). –Brute-force cryptanalysis: O( 2N+1 ), twice as hard with each additional bit. Cryptanalysis tools: Cryptanalysis tools: –Special-purpose hardware. –Parallel machines. –Internet coarse-grain parallelism.
8
Secret Key vs. Secret Algorithm Secret algorithm: additional hurdle Secret algorithm: additional hurdle Hard to keep secret if used widely: Hard to keep secret if used widely: –Reverse engineering, social engineering Commercial: published Commercial: published –Wide review, trust Military: avoid giving enemy good ideas Military: avoid giving enemy good ideas
9
Cryptanalysis: Breaking an Encryption Scheme Ciphertext only: Ciphertext only: –Exhaustive search until “recognizable plaintext” –Need enough ciphertext Known plaintext: Known plaintext: –Secret may be revealed (by spy, time), thus pair is obtained –Great for monoalphabetic ciphers Chosen plaintext: Chosen plaintext: –Choose text, get encrypted –Useful if limited set of messages
10
Models for Evaluating Security Unconditional security (perfect secrecy) Unconditional security (perfect secrecy) –Observation of ciphertext provides no information –Uncertainty/entropy H(p)=H(p|c) Complexity-theoretic security Complexity-theoretic security Provable security Provable security –As difficult to break as solving well-known and supposedly difficult problem Computational security Computational security Ad hoc security Ad hoc security
11
Brute Force Attacks Number of encryption/sec: 1 million to 1 billion/sec Number of encryption/sec: 1 million to 1 billion/sec 56-bit key broken in 1 week with 120,000 processors ($6.7m) 56-bit key broken in 1 week with 120,000 processors ($6.7m) 56-bit key broken in 1 month with 28,000 processors ($1.6m) 56-bit key broken in 1 month with 28,000 processors ($1.6m) 64-bit key broken in 1 week with 3.1 10 7 processors ($1.7b) 64-bit key broken in 1 week with 3.1 10 7 processors ($1.7b) 128-bit key broken in 1 week with 5.6 10 26 processors 128-bit key broken in 1 week with 5.6 10 26 processors
12
Types of Cryptography Hash functions: no key Hash functions: no key Secret key cryptography: one key Secret key cryptography: one key Public key cryptography: two keys - public, private Public key cryptography: two keys - public, private
13
Secret Key Cryptography Same key is used for encryption and decryption Same key is used for encryption and decryption –Symmetric cryptography Ciphertext approximately the same length as plaintext Ciphertext approximately the same length as plaintext Substitution codes, DES, IDEA Substitution codes, DES, IDEA Message transmission: Message transmission: –Agree on key (but how?) –Communicate over insecure channel Secure storage: crypt Secure storage: crypt
14
Secret Key Cryptography (Cont’d) Strong authentication: prove knowledge of key without revealing it: Strong authentication: prove knowledge of key without revealing it: –Send challenge r, verify the returned encrypted {r} –Fred can obtain chosen plaintext, cihpertext pairs Challenge should chosen from a large pool Challenge should chosen from a large pool Integrity check: fixed-length checksum for message Integrity check: fixed-length checksum for message –Send MIC along with the message
15
Public Key Cryptography Asymmetric cryptography Asymmetric cryptography Invented/published in 1975 Invented/published in 1975 Two keys: private (d), public (e) Two keys: private (d), public (e) –Encryption: public key; Decryption: private key –Signing: private key; Verification: public key Much slower than secret key cryptography Much slower than secret key cryptography
16
Public Key Cryptography (Cont’d) Data transmission: Data transmission: –Alice encrypts m a using e B, Bob decrypts to m a using d b. Storage: Storage: –Can create a safety copy: using public key of trusted person. Authentication: Authentication: –No need to store secrets, only need public keys. –Secret key cryptography: need to share secret key for every person to communicate with.
17
Public Key Cryptography (Cont’d) Digital signatures Digital signatures –Encrypt hash h(m) with private key Authorship Authorship Integrity Integrity Non-repudiation: can’t do with secret key cryptography Non-repudiation: can’t do with secret key cryptography
18
Hash Algorithms Message digests, one-way transformations Message digests, one-way transformations Length of h(m) much shorter then length of m Length of h(m) much shorter then length of m Usually fixed lengths: 48-128 bits Usually fixed lengths: 48-128 bits Easy to compute h(m) Easy to compute h(m) Given h(m), no easy way to find m Given h(m), no easy way to find m Computationally infeasible to find m 1, m 2 s.t. h(m 1 ) = h(m 2 ) Computationally infeasible to find m 1, m 2 s.t. h(m 1 ) = h(m 2 ) Example: (m+c) 2, take middle n digits Example: (m+c) 2, take middle n digits
19
Hash Algorithms (Cont’d) Password hashing Password hashing –Doesn’t need to know password to verify it –Store h(p+s), s (salt), and compare it with the user-entered p –Salt makes dictionary attack less convenient Message integrity Message integrity –Agree on a password p –Compute h(p|m) and send with m –Doesn’t require encryption algorithm, so the technology is exportable
20
Public Key Crypto’s Trick Consider the Knapsack problem (p482) Consider the Knapsack problem (p482) We have a knapsack filled with numbers We have a knapsack filled with numbers The goal is to select out a series of numbers that adds to some desired number The goal is to select out a series of numbers that adds to some desired number How do we do this efficiently? How do we do this efficiently?
21
The Trick The trick is factoring The trick is factoring You know ahead of time what certain properties of the number will be. This allows you to reduce the problem to a computable one You know ahead of time what certain properties of the number will be. This allows you to reduce the problem to a computable one Otherwise, you are dealing with a non- polynomial problem Otherwise, you are dealing with a non- polynomial problem
22
Artificial Intelligence Reasoning (Production Systems Reasoning (Production Systems –Goal is to derive a solution given facts and rules Searching Searching –You are given facts and rules and search all possible combinations to find some desired solution (usually minimum/max) Heuristics Heuristics –Operate based on guidelines you know to be true about a problem
23
A Production System
24
Artificial Intelligence Neural Networks Neural Networks Genetic Algorithms Genetic Algorithms Machine Learning Machine Learning
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.