Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Network security


Published on


Published in: Education, Technology
  • Be the first to comment

  • Be the first to like this

Network security

  1. 1. Network Security Bijendra Jain (
  2. 2. Lecture 1: Introduction
  3. 3. Top-level issues <ul><li>Safety, security and privacy </li></ul><ul><li>Security policy </li></ul><ul><ul><li>threats, both external and internal </li></ul></ul><ul><ul><li>economic gains </li></ul></ul><ul><ul><li>cost of securing resources </li></ul></ul><ul><ul><li>cryptographic methods vs. physical security </li></ul></ul><ul><li>Information security: </li></ul><ul><ul><li>nature of resources (HW, SW, information) </li></ul></ul><ul><ul><li>during storage, access and communication </li></ul></ul><ul><ul><li>limited to a single computer vs. network security </li></ul></ul><ul><ul><li>various layers (physical through application layers) </li></ul></ul>
  4. 4. Security threats <ul><li>Intentional vs. accidental </li></ul><ul><li>Various forms of violations: </li></ul><ul><ul><li>Non-destructive </li></ul></ul><ul><ul><li>Destructive </li></ul></ul><ul><ul><li>Repudiation </li></ul></ul><ul><ul><li>Denial of service </li></ul></ul><ul><li>Threat techniques: </li></ul><ul><ul><li>crypt-analysis </li></ul></ul><ul><ul><li>snooping </li></ul></ul><ul><ul><li>masquerading </li></ul></ul><ul><ul><li>replay attacks </li></ul></ul><ul><ul><li>virus, worms </li></ul></ul><ul><ul><li>etc. </li></ul></ul>
  5. 5. Security services <ul><li>Services (or functions) vs. mechanisms </li></ul><ul><li>Security functions: </li></ul><ul><ul><li>confidentiality </li></ul></ul><ul><ul><li>authentication </li></ul></ul><ul><ul><li>integrity </li></ul></ul><ul><ul><li>non-repudiation </li></ul></ul><ul><ul><li>access control </li></ul></ul><ul><ul><li>availability </li></ul></ul>
  6. 6. Security mechanisms <ul><li>Physical controls </li></ul><ul><li>Audit trails </li></ul><ul><li>Fraud detection (data mining) </li></ul><ul><li>Steganography </li></ul><ul><li>Encryption: </li></ul><ul><ul><li>private-key vs. public-key encryption </li></ul></ul><ul><ul><li>key generation, exchange, and management </li></ul></ul><ul><ul><li>certification </li></ul></ul><ul><li>Firewalls </li></ul><ul><li>etc. </li></ul>
  7. 7. Lecture 2: Symmetric-key encryption
  8. 8. Cryptographic systems <ul><li>Symmetric vs. asymmetric encryption </li></ul><ul><li>Number of keys used </li></ul><ul><li>Key lengths </li></ul><ul><li>Block vs. stream cipher </li></ul><ul><li>Crypt-analysis (assume algorithm is known) </li></ul><ul><ul><li>ciphertext (only) </li></ul></ul><ul><ul><li>plaintext + ciphertext </li></ul></ul><ul><ul><li>chosen plaintext + ciphertext </li></ul></ul><ul><ul><li>chosen ciphertext + plaintext </li></ul></ul>
  9. 9. Symmetric cryptographic system <ul><li>Symmetric encryption </li></ul><ul><ul><li>Plaintext, X </li></ul></ul><ul><ul><li>Ciphertext, Y </li></ul></ul><ul><ul><li>Secret keys for encryption, decryption, K </li></ul></ul>Secret key, K Encrypt E K (X) Decrypt D K (X) Crypt-analysis X Y X K K Secure channel Insecure channel
  10. 10. Asymmetric cryptographic system <ul><li>Asymmetric encryption </li></ul><ul><ul><li>Plaintext, X </li></ul></ul><ul><ul><li>Ciphertext, Y </li></ul></ul><ul><ul><li>Two keys K 1 , and K 2. One is secret, other is public </li></ul></ul><ul><ul><li>One of them (secret or public) is used to encrypt, the other for decryption </li></ul></ul><ul><ul><li>Helps with confidentiality, digital signatures </li></ul></ul>Key generation, management Encrypt E K (X) Decrypt D K (X) Crypt-analysis X Y X K 1 K 2 Insecure channel
  11. 11. Symmetric encryption <ul><li>Substitution cipher </li></ul><ul><li>Transposition cipher </li></ul><ul><li>DES </li></ul><ul><li>Triple DES </li></ul><ul><li>Blowfish, RC5, RC4, etc. </li></ul>
  12. 12. Substitution cipher <ul><li>Ceasar cipher </li></ul><ul><ul><li>encrypt C  (p+k) mod n </li></ul></ul><ul><ul><li>decrypt p  (C-k) mod n </li></ul></ul><ul><ul><li>assumes set of n characters </li></ul></ul><ul><ul><li>easily breakable in n-1 steps </li></ul></ul><ul><li>Substitute using n x n table </li></ul><ul><ul><li>encrypt C i  lookup_encrypt(p i ) </li></ul></ul><ul><ul><li>decrypt p j  lookup_decrypt(C j ) </li></ul></ul><ul><ul><li>26! Different keys </li></ul></ul><ul><ul><li>may be broken using known “relative frequency” of each character </li></ul></ul><ul><ul><li>To counter: </li></ul></ul><ul><ul><ul><li>use multiple symbols to substitute </li></ul></ul></ul><ul><ul><ul><li>substitute multiple symbols at a time </li></ul></ul></ul><ul><ul><ul><ul><li>e.g. two letter strings at a time </li></ul></ul></ul></ul>
  13. 13. Transposition cipher <ul><li>Transposition example: </li></ul><ul><li>To make it more secure: </li></ul><ul><ul><li>transposition it multiple times </li></ul></ul><ul><ul><li>combine it with substitution ciphers </li></ul></ul>
  14. 14. DES <ul><li>Combination of several substitution and transposition ops </li></ul><ul><ul><li>Applied to each block of size 64 bits </li></ul></ul><ul><ul><li>Key is 56 bits </li></ul></ul><ul><ul><li>Uses portions of key at different steps </li></ul></ul><ul><ul><li>Uses techniques referred to by “diffusion and confusion” </li></ul></ul><ul><li>Developed by IBM 1971-73, accepted by NBS (USA) as a standard in 1977 </li></ul><ul><li>Primarily a block cipher </li></ul>Decrypt D K (X) P1 K C1 Encypt E K (X) C1 K P1
  15. 15. DES encryption algorithm Initial permutation Round 1 Round 2 Round 16 32-bit swap Inverse permute K1 K2 K16 Permuted key Permuted key Permuted key Left circular shift Left circular shift Left circular shift Permuted key 64-bit plaintext 64-bit ciphertext 56-bit key
  16. 16. Cipher Block Chaining <ul><li>Primarily a block cipher </li></ul><ul><ul><li>May be used in “block chaining mode” </li></ul></ul>Encrypt E K (X) C1 IV K + P1 Encrypt E K (X) C2 + P2 K Decrypt D K (X) P1 IV K + C1 P2 C2 Decrypt D K (X) K +
  17. 17. Strength of DES <ul><li>Key size of 56 bits appears to be too small </li></ul><ul><ul><li>In 1993 Weiner developed HW device for $100K with 5760 search engines to break it in 35 hours </li></ul></ul><ul><ul><li>In 1997, 70,000 systems on Internet discovered the key in less than 96 days (part of plaintext is given) </li></ul></ul><ul><ul><li>Automating the process is difficult, unless plaintext is known </li></ul></ul><ul><li>Perhaps breakable by studying and exploiting weakness </li></ul><ul><ul><li>Differential cryptanalysis </li></ul></ul><ul><ul><li>Linear cryptanalysis </li></ul></ul><ul><li>Trapdoor </li></ul><ul><ul><li>US Govt changed the original design </li></ul></ul><ul><li>Continues to enjoy wide acceptibility </li></ul><ul><ul><li>Particularly with triple-DES (used in PGP) </li></ul></ul>
  18. 18. Double-DES <ul><li>Two stages of encryption, using two different keys </li></ul>Decrypt E K2 (X) X K2 Encypt E K1 (X) C P K1
  19. 19. Double-DES <ul><li>“ two stages cannot be reduced to one stage”: </li></ul><ul><ul><li>for given K1, K2, there is no K s.t. E K2 (E K1 (P)) = E K (P) </li></ul></ul><ul><li>Meet-in-the-middle attack </li></ul><ul><ul><li>Let C = E K2 (E K1 (P)), and X = E K1 (P) = D K2 (C) </li></ul></ul><ul><ul><li>Let known P and C </li></ul></ul><ul><ul><li>Search for K1 and K2 such that X = E K1 (P) = D K2 (C) </li></ul></ul><ul><ul><li>Complexity is O(2 56 + 2 56 ), not O(2 128 ) </li></ul></ul>
  20. 20. Triple-DES <ul><li>Three stages of encryption, using two different keys </li></ul>Decrypt E K2 (X) X1 K2 Encypt E K1 (X) C P K1 X2 Decrypt E K3 (X) K3
  21. 21. IDEA <ul><li>International data encryption algorithm (IDEA) </li></ul><ul><li>developed in 1991, gaining ground </li></ul><ul><li>block cipher </li></ul><ul><li>better understood </li></ul><ul><li>US government has had no role in its design </li></ul><ul><li>design principle: </li></ul><ul><ul><li>block size 64 bits </li></ul></ul><ul><ul><li>key length 128 bits </li></ul></ul><ul><ul><li>more emphasis on “diffusion” and “confusion” </li></ul></ul><ul><ul><ul><li>uses three operations: </li></ul></ul></ul><ul><ul><ul><ul><li>“ exclusive-OR”, “addition”, “multiplication” </li></ul></ul></ul></ul><ul><ul><li>some effort to make HW implementation easier </li></ul></ul>
  22. 22. RC5 <ul><li>developed by Rivest, in 1994 </li></ul><ul><li>suitable for HW or SW implementation on microprocessors </li></ul><ul><ul><li>simple </li></ul></ul><ul><ul><li>different word length </li></ul></ul><ul><ul><li>low memory </li></ul></ul><ul><li>high level of security </li></ul><ul><ul><li>simpler determination of strength </li></ul></ul><ul><ul><li>variable no. of “rounds”, key length </li></ul></ul>
  23. 23. Blowfish <ul><li>Developed in 1993 </li></ul><ul><li>block cipher </li></ul><ul><li>up to 448 bit keys </li></ul><ul><li>no known attacks </li></ul><ul><li>simple, fast and compact </li></ul>
  24. 24. Summary: symmetric key encryption <ul><li>Since the same key is used to encrypt and decrypt, the system is also know as private-key encryption </li></ul><ul><li>Symmetric key encryption </li></ul><ul><ul><li>uses shared secret keys </li></ul></ul><ul><ul><li>also known as “private-key” encryption </li></ul></ul><ul><li>Primarily used for purpose of confidentiality </li></ul><ul><ul><li>but may be used to authenticate as well, but may be “repudiated” </li></ul></ul><ul><li>Key sharing or management is an issue </li></ul><ul><ul><li>particularly when the no. of clients sharing the key is “large” </li></ul></ul>
  25. 25. Application to confidentiality <ul><li>Private-key encryption may be used to provide confidentiality of messages during transfer over LANs and/or WANs </li></ul><ul><li>At issue: </li></ul><ul><ul><li>what information: </li></ul></ul><ul><ul><ul><li>User data vs. headers </li></ul></ul></ul><ul><ul><ul><li>Identity of correspondents vs. node/route identity </li></ul></ul></ul><ul><ul><li>in what layer, and between what points </li></ul></ul><ul><ul><ul><li>Link-layer vs. end-to-end vs. application level </li></ul></ul></ul><ul><li>Assumption: data over physical network is accessible </li></ul><ul><ul><li>Wireless links </li></ul></ul><ul><ul><li>Employee of the network service provider </li></ul></ul><ul><ul><li>Your own colleagues </li></ul></ul>
  26. 26. Link-level vs. end-to-end confidentiality Host A Host B R R R Link-level enrypt/ decrypt End-to-end enrypt/ decrypt
  27. 27. Link-level vs. end-to-end confidentiality Link-level encryption End-to-end encryption Security within nodes, hosts Exposed in intermediate nodes Exposed in end hosts Encrypted in intermediate nodes Encrypted/Decrypted by end hosts Role of end devices, intermediate nodes Intermediate nodes require encryption One key for each link Done in hardware Only end hosts need encryption One key per session/connection Perhaps done in software
  28. 28. Traffic confidentiality <ul><li>Issues: </li></ul><ul><ul><li>Identity of communicating entities </li></ul></ul><ul><ul><li>Identity of hosts, routers </li></ul></ul><ul><ul><li>Traffic volumes, patterns </li></ul></ul><ul><li>Link-level encryption offers better confidentiality </li></ul><ul><li>Padding may be used to “hide” patterns and volumes </li></ul>
  29. 29. Key distribution <ul><li>Secret key must be distributed between the communicating entities, say A and B </li></ul><ul><li>Link level encryption requires L number of keys to be distributed, one for each device at the end of a link </li></ul><ul><li>Host-to-host encryption requires N*(N-1)/2 keys to be distributed </li></ul><ul><li>Two techniques: </li></ul><ul><ul><li>Physical delivery (works only in a very limited environs) </li></ul></ul><ul><ul><ul><li>A delivers it to B </li></ul></ul></ul><ul><ul><ul><li>A trusted third party C delivers the key to A and to B </li></ul></ul></ul><ul><ul><li>Electronic delivery using an established secure connection or session </li></ul></ul><ul><ul><ul><li>A delivers it to B after suitably encrypting it </li></ul></ul></ul><ul><ul><ul><li>A trusted third party C delivers the key to A and to B using secure channels to A and to B. </li></ul></ul></ul>
  30. 30. Key distribution <ul><li>Electronic distribution by B to A, though process initiated by A </li></ul><ul><li>Above: </li></ul><ul><ul><li>N 1 and N 2 are “nonce”, </li></ul></ul><ul><ul><li>MK m is the “master key” used by A and B </li></ul></ul><ul><ul><li>K S is the new “session key” </li></ul></ul><ul><ul><li>F is a well-known function, such as ADD 1 </li></ul></ul>
  31. 31. Key distribution <ul><li>Electronic distribution by trusted third party C to A and to B </li></ul>
  32. 32. Key distribution <ul><li>Above: </li></ul><ul><ul><li>K A and K B are keys used by A and B, respectively, to communicate with C </li></ul></ul><ul><ul><li>ID A identifies entity A </li></ul></ul>
  33. 33. Key distribution <ul><li>Secure operation of these schemes, against: </li></ul><ul><ul><li>Masquerade </li></ul></ul><ul><ul><li>replay attacks </li></ul></ul><ul><li>Other issues: </li></ul><ul><ul><li>Hierarchy of keys </li></ul></ul><ul><ul><li>Lifetime of a session key </li></ul></ul><ul><ul><li>Generation of Nonce or Random numbers </li></ul></ul>
  34. 34. Thanks