Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Security and Cryptography: basic aspects Ortal Arazi College of Engineering Dept. of Electrical & Computer Engineering The University of Tennessee.

Similar presentations


Presentation on theme: "1 Security and Cryptography: basic aspects Ortal Arazi College of Engineering Dept. of Electrical & Computer Engineering The University of Tennessee."— Presentation transcript:

1 1 Security and Cryptography: basic aspects Ortal Arazi College of Engineering Dept. of Electrical & Computer Engineering The University of Tennessee

2 2 Outline What is network security? Principles of Cryptography AuthenticationIntegrity

3 3 What is network security? Confidentiality: only sender, intended receiver should “understand” message contents sender encrypts message sender encrypts message receiver decrypts message receiver decrypts message Authentication: sender, receiver want to confirm identity of each other Message Integrity and non-repudiation: sender, receiver want to ensure message not altered (in transit, or afterwards) Access Control and Availability: services must be accessible and available to legitimate users (no DoS attacks)

4 4 Friends and foes: Alice, Bob, Trudy Well-known fixtures in network security world Bob, Alice want to communicate “securely” Trudy (intruder) may intercept, delete, add messages secure sender secure receiver channel data, control messages data Alice Bob Trudy

5 5 What can the “enemy” do ? Q: What can a “bad guy” do? A: a lot! Eavesdrop: intercept messages Eavesdrop: intercept messages actively insert messages into connection actively insert messages into connection Impersonation: can fake (spoof) source address in packet (or any field in packet) Impersonation: can fake (spoof) source address in packet (or any field in packet) Hijacking: “take over” ongoing connection by removing sender or receiver, inserting himself in place Hijacking: “take over” ongoing connection by removing sender or receiver, inserting himself in place Denial of service: prevent service from being used by others (e.g., by overloading resources) Denial of service: prevent service from being used by others (e.g., by overloading resources) more on this later ……

6 6 The language of cryptography Symmetric key crypto: sender, receiver keys identical Public-key crypto: encryption key public, decryption key secret (private) plaintext ciphertext K A encryption algorithm decryption algorithm Alice’s encryption key Bob’s decryption key K B

7 7 Symmetric key cryptography Symmetric key crypto: Bob and Alice share know same (symmetric) key: K e.g., key is knowing substitution pattern in mono alphabetic substitution cipher Substitution cipher: substituting one thing for another monoalphabetic cipher: substitute one letter for another monoalphabetic cipher: substitute one letter for another plaintext: abcdefghijklmnopqrstuvwxyz ciphertext: mnbvcxzasdfghjklpoiuytrewq Question: How hard is it to break this simple cipher?: - brute force (how hard?) - other?

8 8 Symmetric key crypto: DES DES: Data Encryption Standard US encryption standard [NIST 1993- National Institute of Standard and Technology ] 56-bit symmetric key, 64-bit plaintext input How secure is DES? DES Challenge: 56-bit-key-encrypted phrase (“Strong cryptography makes the world a safer place”) decrypted (brute force) in 4 months DES Challenge: 56-bit-key-encrypted phrase (“Strong cryptography makes the world a safer place”) decrypted (brute force) in 4 months no known “backdoor” decryption approach no known “backdoor” decryption approach making DES more secure: use three keys sequentially (3-DES) on each datum use three keys sequentially (3-DES) on each datum AES (Advanced Encryption Standard) – Next generation standard (NIST 2001) AES (Advanced Encryption Standard) – Next generation standard (NIST 2001)

9 9 Symmetric key crypto: DES Initial permutation 16 identical “rounds” of function application, each using different 48 bits of key Final permutation DES operation – Substitution and Permutation

10 10 Public Key Cryptography Symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if never “met”)? Public key cryptography radically different approach [Diffie-Hellman76, RSA78] Sender, receiver do not share secret key public encryption key known to all private decryption key known only to receiver

11 11 Diffie-Hellman Key Generation Uncovered an entire new approach to cryptography W. Diffie and M.E. Hellman's New Directions in Cryptography from IEEE transactions on Information Theory, IT 22:644- 654, 1976. A B (X - private key) (Y - private key) a,p: known numbers (p - prime number) a X mod p a y mod p [a y mod p] x mod p = a XY mod p = [a x mod p] y mod p x,y,a,p  typically 1024 bits long x,y,a,p  typically 1024 bits long The Discreet Log problem: by knowing a x mod p, a and p, one can not obtain x The Discreet Log problem: by knowing a x mod p, a and p, one can not obtain x

12 12 Diffie-Hellman Key Generation- using ECC Why use ECC? We use 160 bits (instead of1024) and still get the same complexity We use multiplications instead of exponentiation All mathematical calculations are without carry Calculations take less time, less memory and less hardware A B X- private key (scalar) y- private key (scalar) P- a known point on the elliptic curve X x P (Y x P) x X= XY x P = (X x P) x Y Y x P The discreet Log problem: by knowing X x P and P, one can not know x

13 13 What is an Elliptic Curve? In GF(2 m ) an ordinary elliptic curve E suitable for elliptic curve cryptography is defined by the set of points (x; y) that satisfy the equation : Example:

14 14 Public Key Cryptography plaintext message, m ciphertext encryption algorithm decryption algorithm Bob’s public key plaintext message K (m) B + K B + Bob’s private key K B - m = K ( K (m) ) B + B - Given a public key it should be impossible to compute the private key Requirements : 1 2 K (K (m)) = m B B - +

15 15 Public Key Cryptography - RSA plaintext message, m ciphertext RSA f (x) RSA f -1 (x) Bob’s public key plaintext message K B + Bob’s private key K B - f (m) m=f -1 (f (m) ) Algorithm using a public key Algorithm using a private key

16 16 RSA (Rivest-Shamir-Adelman): Choosing Keys 1. Choose two large prime numbers p, q. (e.g., 1024 bits each) 2. Compute n = pq, z = (p-1)(q-1) 3. Choose e (with e<n) that has no common factors with z. (e, z are “relatively prime”). 4. Choose d such that ed-1 is exactly divisible by z. (in other words: ed mod z = 1 ). 5. Public key is (n,e). Private key is (n,d). K B + K B -

17 17 RSA: Encryption, decryption Given (n,e) and (n,d) as computed above: 1. To encrypt bit pattern, m (m<n), compute c = m mod n e (i.e., remainder when m is divided by n) e 2. To decrypt received bit pattern, c, compute m = c mod n d (i.e., remainder when c is divided by n) d m = (m mod n) e mod n d Magic happens! c

18 18 RSA: Why is that ? m = (m mod n) e mod n d (m mod n) e mod n = m mod n d ed Useful number theory result: If p,q prime and n = pq, then: x mod n = x mod n (Fermat's Small Equation) yy mod (p-1)(q-1) = m mod n ed mod (p-1)(q-1) = m mod n 1 C – the encrypted message (using number theory result above) (since we chose ed to be divisible by (p-1)(q-1) with remainder 1 ) = m (since m<n)

19 19 Outline What is network security? Principles of Cryptography AuthenticationIntegrity

20 20 Authentication There is a clear need to “prove” the identity of a sender Insufficient options: ID by IP # ? ID by IP # ? Send secret password along with message ? Send secret password along with message ? Choose a random number, R … Choose a random number, R … “I am Alice” R Bob computes K (R) A - “send me your public key” K A + (K (R)) = R A - K A + and knows only Alice could have the private key, that encrypted R such that (K (R)) = R A - K A +

21 21 Man-in-the-middle Attack Man (woman) in the middle attack: Trudy poses as Alice (to Bob) and as Bob (to Alice) I am Alice R T K (R) - Send me your public key T K + A K (R) - Send me your public key A K + T K (m) + T m = K (K (m)) + T - Trudy gets sends m to Alice encrypted with Alice’s public key A K (m) + A m = K (K (m)) + A - R

22 22 Certification Authorities Question: How do you “prove” that a key is really your key ? Solutions: Certification authority (CA) - binds public key to particular entity (for example: Bob). Bob registers its public key with CA. Bob provides “proof of identity” to CA. Bob provides “proof of identity” to CA. CA creates certificate binding Bob to its public key. CA creates certificate binding Bob to its public key. certificate containing Bob’s public key digitally signed by CA – CA says “this is Bob’s public key” certificate containing Bob’s public key digitally signed by CA – CA says “this is Bob’s public key” Bob’s public key K B + Bob’s identifying information digital signature (encrypt) CA private key K CA - K B + certificate for Bob’s public key, signed by CA

23 23 Certification Authorities (cont.) When Alice wants Bob’s public key: gets Bob’s certificate (Bob or elsewhere). gets Bob’s certificate (Bob or elsewhere). apply CA’s public key to Bob’s certificate, get Bob’s public key apply CA’s public key to Bob’s certificate, get Bob’s public key Bob’s public key K B + digital signature (decrypt) CA public key K CA + K B +

24 24 Questions?


Download ppt "1 Security and Cryptography: basic aspects Ortal Arazi College of Engineering Dept. of Electrical & Computer Engineering The University of Tennessee."

Similar presentations


Ads by Google