# CS 6262 Spring 02 - Lecture #7 (Tuesday, 1/29/2002) Introduction to Cryptography.

## Presentation on theme: "CS 6262 Spring 02 - Lecture #7 (Tuesday, 1/29/2002) Introduction to Cryptography."— Presentation transcript:

CS 6262 Spring 02 - Lecture #7 (Tuesday, 1/29/2002) Introduction to Cryptography

Definitions n Process data into unintelligible form, reversible, without data loss n Usually one-to-one (not compression) n Analog cryptography example: voice changers n Other services: u Integrity checking: no tampering u Authentication: not an imposter n Plaintext encryption  ciphertext decryption  plaintext

Computational Difficulty n Algorithm needs to be efficient. u Otherwise only short keys can be used. n Most schemes can be broken: depends on \$\$\$. u E.G. Try all possible keys. n Longer key is often more secure: u Encryption O(N+1). u Brute-force cryptanalysis: O( 2N+1 ), twice as hard with each additional bit. n Cryptanalysis tools: u Special-purpose hardware. u Parallel machines. u Internet coarse-grain parallelism.

Secret Key Vs. Secret Algorithm n Secret algorithm: additional hurdle n Hard to keep secret if used widely: u Reverse engineering, social engineering n Commercial: published u Wide review, trust n Military: avoid giving enemy good ideas

Some Trivial Schemes n Caesar cipher: substitution cipher: u A  D, B  E n Captain Midnight Secret Decoder rings: u shift variable by n: IBM  HAL, or : F (letter + offset) mod 26 u only 26 possible ways of secret coding. n Monoalphabetic cipher: u generalization, arbitrary mapping of one letter to another u 26!, approximately 4  10 26 u statistical analysis of letter frequencies n One-time pad u A random sequence of 0’s and 1’s XORed to plaintext

Cryptanalysis: Breaking an Encryption Scheme n Ciphertext only: u Exhaustive search until “recognizable plaintext” u Need enough ciphertext n Known plaintext: u Secret may be revealed (by spy, time), thus pair is obtained u Great for monoalphabetic ciphers n Chosen plaintext: u Choose text, get encrypted u Useful if limited set of messages

Models for Evaluating Security n Unconditional security (perfect secrecy) n Complexity-theoretic security n Provable security n Computational security n Ad hoc security

Brute Force Attacks n Number of encryption/sec: 1 million to 1 billion/sec n 56-bit key broken in 1 week with 120,000 processors (\$6.7m) n 56-bit key broken in 1 month with 28,000 processors (\$1.6m) n 64-bit key broken in 1 week with 3.1  10 7 processors (\$1.7b) n 128-bit key broken in 1 week with 5.6  10 26 processors

Types of Cryptography n Hash functions: no key n Secret key cryptography: one key n Public key cryptography: two keys - public, private

Secret Key Cryptography n Same key is used for encryption and decryption u Symmetric cryptography n Ciphertext approximately the same length as plaintext n Substitution codes, DES, IDEA n Message transmission: u Agree on key (but how?) u Communicate over insecure channel n Secure storage: crypt

Secret Key Cryptography (Cont’d) n Strong authentication: prove knowledge of key without revealing it: u Send challenge r, verify the returned encrypted {r} u Fred can obtain chosen plaintext, cihpertext pairs F Challenge should chosen from a large pool n Integrity check: fixed-length checksum for message u Send MIC along with the message

Public Key Cryptography n Asymmetric cryptography n Invented/published in 1975 n Two keys: private (d), public (e) u Encryption: public key; Decryption: private key u Signing: private key; Verification: public key n Much slower than secret key cryptography

Public Key Cryptography (Cont’d) n Data transmission: u Alice encrypts m a using e B, Bob decrypts to m a using d b. n Storage: u Can create a safety copy: using public key of trusted person. n Authentication: u No need to store secrets, only need public keys. u Secret key cryptography: need to share secret key for every person to communicate with.

Public Key Cryptography (Cont’d) n Digital signatures u Encrypt hash h(m) with private key F Authorship F Integrity F Non-repudiation: can’t do with secret key cryptography

Hash Algorithms n Message digests, one-way transformations n Length of h(m) much shorter then length of m n Usually fixed lengths: 48-128 bits n Easy to compute h(m) n Given h(m), no easy way to find m n Computationally infeasible to find m 1, m 2 s.t. h(m 1 ) = h(m 2 ) n Example: (m+c) 2, take middle n digits

Hash Algorithms (Cont’d) n Password hashing u Doesn’t need to know password to verify it u Store h(p+s), s (salt), and compare it with the user-entered p u Salt makes dictionary attack less convenient n Message integrity u Agree on a password u Compute h(m|p) and send with m u Doesn’t require encryption algorithm, so the technology is exportable

Download ppt "CS 6262 Spring 02 - Lecture #7 (Tuesday, 1/29/2002) Introduction to Cryptography."

Similar presentations