1 / 47

Network Security

Network Security. Chapter 1. Security and Cryptography. Objectives. Describe 5 security services. Understand Block ciphers and designing factors. Understand Modes of Block ciphers. Understand Stream ciphers OTP (One Time Password) DOS Attack and firewall. A Secure Communication Network.

Download Presentation

Network Security

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Network Security Chapter 1. Security and Cryptography

  2. Objectives • Describe 5 security services. • Understand Block ciphers and designing factors. • Understand Modes of Block ciphers. • Understand Stream ciphers • OTP (One Time Password) • DOS Attack and firewall.

  3. A Secure Communication Network • Provides security services … • Confidentiality • Integrity • Authentication • Nonrepudiation • Service Reliability

  4. Confidentiality • Encryption Algorithm • Encryption : E(M) = C • Decryption : D(C) = M • Symmetric Key Encryption • A and B : agree on a cryptosystem(Cipher to be used) • A and B : agree on the key to be used. • A : encrypts messages and send to B • B : decrypts the ciphertext .

  5. Confidentiality • Asymmetric(Public) Key Cryptography • depends on trapdoor one way function (ex) product of two large prime number • PKC is very slow. • does not need to agree on the key • A and B : agree on a cryptosystem(Cipher to be used) • B : sends its public key to A. • A : encrypts M using B’s Public Key. • B : decrypts the cipher text using it private key.

  6. Confidentiality • Hybrid Cryptography • Exploit the speed of SKC and use PKC to solve the Key distribution of SKC. • A and B : agree on a cryptosystem • B : sends its public key to A. • 4. : session key transmission using PKC. • 5. Use session key to communicate securely

  7. Integrity • Use message authentication code(MAC) • use hash function to calculate MAC. message Hash Hash MAC MAC MAC ?

  8. Authentication • Scenario - Eve plans to rob bank customers by masquerading as them. - No provision of authentication. • Digital Signatures • Challenge-response schemes.

  9. Authentication • Digital Signature – Message & Entity Authentication message Hash Hash MAC MAC ? MAC Sign value verifying algorithm Signing algorithm Signer’s private key Signer’s public key http://www-cse.ucsd.edu/users/mihir/cse207/w-mac.pdf

  10. Authentication • Challenge-response schemes. – Entity Authentication • A and B : agree on a cryptosystem • A : sends its public key to B. • B : sends random number(RN) to A. • A : encrypt RN with its private key • B : B decrypt A’s message and check if two RNs are same.

  11. Replay protection and Nonrepudation • Replayprotection : • Protection against reuse of an entity(digital check) or protocol message for one time use. • Timestamp • Norepudiation : requires the involvement of a trusted third party

  12. Block ciphers • DES(Data Encryption Standard) • K : 56 bit, M : 64 bits, 16 round, Feistal Network. • AES(Advanced Encryption Standard) • n = 128, k = 128, 192, or 256 http://www-cse.ucsd.edu/users/mihir/cse207/w-bc.pdf [AES] http://en.wikipedia.org/wiki/Advanced_Encryption_Standard [DES] http://en.wikipedia.org/wiki/Data_Encryption_Standard http://www.forum2.org/eran/SKC2004/des.pdf

  13. Block ciphers • Basic techniques : diffusion and confusion to avoid statistical analysis. [Claude Shannon] • Diffusion : • For a single bit change in the plaintext, how many bits change in the cipher text. • Dissipates the redundancy of the plaintext by spreading it over the ciphertext. • By permutation • Confusion : • make the relationship between the statistics of the ciphertext and the value of the encryption key as complex as possible, • to thwart attempt to discover the key. • by substitution

  14. Block ciphers Substitution Permutation

  15. Block ciphers • AES main operations Confusion diffusion diffusion confusion

  16. Using the Cipher : The Modes • ECB : Electronic-Codebook mode (Block ciphers) • Advantage : Simple, no error Propagation, can be parallelized • Disadvantage : one-to-one mapping repeat-in-plaintext  repeat-in-ciphertext re-ordering and replay attack to modify the message.

  17. Using the Cipher : The Modes • CBC : Cipher block Chaining Mode (Block Ciphers) • Advantage : self recovering from errors error in the Ci effects only Pi and Pi+1 • Disadvantage : flipping a bit in Ci will flip the correspond bit in Pi+1 IV

  18. Using the Cipher : The Modes • OFB : Output Feedback Mode(Stream Cipher) • Advantage : key-stream can be pre-computed, no error propagation • Disadvantage • Is not self synchronizing (in case of cipher text lost) • Susceptible to known plain-text attack. [J. Franklin]http://pages.cs.wisc.edu/~detmer/SurveyAsynchExt.pdf

  19. Using the Cipher : The Modes • CTR : Counter-mode • Advantages : preprocessing, Random access, software and hardware efficiency, parallel processing. • Disadvantages : Sensitive to usage errors (counter value reuse) http://www.cs.ucdavis.edu/~rogaway/papers/ctr.pdf

  20. Synchronous Stream Ciphers • Synchronous : Key stream is generated without use of the plaintext and of ciphertext • Advantage : no error propagation • Disadvantage : bit insertion or deletion in ciphertext - lose sync and corrupt rest of plaintext. • Insertion attack – the weakness of key reuse

  21. Self-Synchronizing Stream Ciphers • Self-synchronizing( or Asynchronous) : the key stream is generated as a function of the key and a fixed number of previous ciphertext units. • Advantage : more secure then synchronous stream cipher. • Disadvantage : - error propagation. - slow – no pre-computation of key stream.

  22. Cryptographic Hash function • A hash function takes a long string (or 'message') of any length as input and produces a fixed length string as output, sometimes termed a message digest or a digital fingerprint. • The desirable • Preimage resistant : given h it should be hard to find any m such that h = hash(m). (one-way function) • Second preimage resistant: given an input m1, it should be hard to find another input, m2 (not equal to m1) such that hash(m1) = hash(m2). This property is implied by collision-resistance. • Typical hash length : 128, 160, 192, 256 • Standards : MD5, RIPEMD, SHA, Whirlpool

  23. What’s inside a cryptographic hash? < general message block processing> • One MD5 operation • MD5 consists of 64 of these operations, grouped in four rounds of 16 operations. • F is a nonlinear function; one function is used in each round. • Mi denotes a 32-bit block of the message input, and Ki denotes a 32-bit constant, different for each operation.

  24. MD5 execution example. • Many Unix and Linux systems provide the md5sum

  25. Applications of Hash function • Saving hash of a password instead of password itself. digitally signing a document

  26. Keyed-Hash Message Authentication Code, or HMAC • used to simultaneously verify both the data integrity and the authenticity of a message. [RFC2104] http://tools.ietf.org/html/rfc2104 [fips198] http://csrc.nist.gov/publications/fips/fips198/fips-198a.pdf

  27. OTP (One Time Password) User and Server share sequences of one time password or a OTP generation algorithm so that they can generate same passwords in synchronized manner.

  28. OTP (One Time Password) - Deployment OTP generator cyworld Portal Login

  29. OTP (One Time Password) - Deployment OTP 금융통합인증 서비스

  30. Hard Problems in Public key Cryptography • Integer factorization problem Giver integer n, find its prime factorization; that is write where the are pair-wise distinct primes and each • Application RSA problem : Given a positive integer n that is a product of two distinct odd primes p and q, a positive integer esuch that gcd(e, (p-1)(q-1))=1 and an integer c, find an integer m such that

  31. Hard Problems in Public key Cryptography • DefinitionLet G be a finite cyclic group of order n. Let be generator of G and LetThe discrete logarithm of to the base , denote is the unique integer x, , such that . • The Discrete Logarithm Problem(DLP) Given a prime p, a generator of , and an element , find the integer such that . The order of is p-1, that is , so

  32. Hard Problems in Public key Cryptography • Application of DLP - ElGamal public key encryption. - Diffie-Hellmam Problem(DHP) Given a prime p, a generator g of , and elements mod p, and mod p, find mod p.

  33. Decision Deffie-Hellman(DDH) Assumption • DDH is the problem of distinguishing triplets of the form (gr, gs, grs) from triplets of the form (gr, gs, gt), where r, s and t are random exponents., • More formally suppose r, s and t are randomly chosen and h is chosen dependent on random bit b with • We often call (gr, gs, grs) a Diffie-Hellman triplet. • DDH Assumption: There is no efficient algorithm which can solve with non-negligible advantage.

  34. Elliptic curve cryptography • Elliptic curves may be used to form elliptic curve groups. • A group is a set of elements with custom-defined arithmetic operations on those elements. • For elliptic curve groups, these specific operations are defined geometrically. • Elliptic curves groups are examined with the underlying fields of Fp (where p is a prime) and F2m (a binary representation with 2m elements). • ECC related Math : refer this linkhttp://www.certicom.com/index.php?action=ecc,math

  35. Elliptic Curve Groups over Real Numbers • Elliptic Curve equation : • y2 = x3 + ax + b, where x, y, a and b are real numbers. 4a3 + 27b2 ≠ 0, EC point (x, y) form a group. • EC group : { points over a EC curve, O (point at infinity) }

  36. Elliptic Curve Addition: A Geometric Approach • Adding : P + Q = R • if P=(x1,y1), -P = (x1, -y1) P + (-P) = O

  37. Elliptic Curve Addition: A Geometric Approach • Doubling the point P if yP = 0 3P = P, 4p=O, 5P=P

  38. Elliptic Curve Addition: An Algebraic Approach • Adding distinct points P and Q- P(xP, yP) + Q(xQ, yQ) = R(xR, yR) s = (yP - yQ) / (xP - yQ) xR = s2 - xP - xQ and yR = -yP + s(xP – xR) • Doubling the point P- When yP is not 0, 2P = R where s = (3xP2 + a) / (2yP ) xR = s2 - 2xP and yR = -yP + s(xP - xR) • Experiment & Quiz: http://www.certicom.com/index.php?action=ecc_tutorial,ecc_tut_2_3

  39. Elliptic Curve Groups over Fp • The field Fp : • uses the numbers from 0 to p – 1. • any operation within this field also result in this field. • For example, F23 = {0,1,…,22} • An EC over Fp : y2 (mod p) = x3 + ax + b (mod p), • Example : http://www.certicom.com/index.php?action=ecc_tutorial,ecc_tut_3_1 • Experiment & Quiz : http://www.certicom.com/index.php?action=ecc_tutorial,ecc_tut_3_3

  40. Elliptic Curve Groups over F2m • The F2m are m-bit strings. ={000, 001,010,011,100,101,110,111} • The rules for arithmetic (addition, subtraction, multiplication, inversion) in F2mpolynomial representationoptimal normal basis representation. • An EC : y2 + xy = x3 + ax2 + b, • Example, Experiment, Quiz : http://www.certicom.com/index.php?action=ecc_tutorial,ecc_tut_4_1

  41. Elliptic Curve Discrete Logarithm Problem (ECDLP)- Hard Problem • Scalar Multiplication : for give m and P, calculate mP • Given points P and Q in the group, find a number k such that Pk = Q. • Example : http://www.certicom.com/index.php?action=ecc_tutorial,ecc_tut_5_3_1

  42. Elliptic Curve Security and Efficiency

  43. Elliptic Curve Pairings • Triple of Group G1,G2,GT • A mapping e : G1 x G2 GT which is bilinear: • e(P+Q, R) = e(P, R)▪e(Q, R) • e(P, R+S) = e(P, R)▪e(P, S) • Hence e(aP, bP) = e(P, R)ab = e(bP, aR) • Non-degeneracy: e(P, R) ≠ 1 for some P G1, R G2. • Computability : e(P, R) can be efficiently computed.

  44. Elliptic Curve Pairings • G1 and G2 are subgroups of the group of points on an elliptic curve E defined over a field Fq. Hence additive notation for G1 , G2 . • Typically all groups G1, G2 , GT are of prime order r. • GT is a subgroup of . • Hence multiplicative notation for GT . • If G1 = G2 then we call the pairing symmetric. For now consider only symmetric pairings. • If e is a non-degenerate system pairing and P generates G1then e(P, P) generates GT.

  45. Beyond of Cryptography. • Firewalls :

  46. Beyond of Cryptography. • Denial of service attacks

  47. Resources • Message Authenticationhttp://www-cse.ucsd.edu/users/mihir/cse207/w-mac.pdf • Block Cipherhttp://www-cse.ucsd.edu/users/mihir/cse207/w-bc.pdf • AEShttp://en.wikipedia.org/wiki/Advanced_Encryption_Standard • DEShttp://en.wikipedia.org/wiki/Data_Encryption_Standardhttp://www.forum2.org/eran/SKC2004/des.pdf • Blockcipher based stream cipher attack :http://pages.cs.wisc.edu/~detmer/SurveyAsynchExt.pdf • Security analysis of CTR Modehttp://www.cs.ucdavis.edu/~rogaway/papers/ctr.pdf

More Related