Cryptography (One Day Cryptography Tutorial) By Dr. Mohsen M. Tantawy
Definitions
<ul><li>Plaintext : easy to understand form (original message) </li></ul><ul><li>Ciphertext : difficult to understand form...
Definitions <ul><li>Alice —She is an end user/computer without malicious intentions, one of the main users of cryptography...
Group of individuals <ul><li>Hacker   – is a general term that has historically been used to describe a computer programmi...
Group of individuals <ul><li>Phreaker  – is an individual that manipulates the phone network in order to cause it to perfo...
Group of individuals <ul><li>White hat  – is a term used to describe individuals that use their abilities to find vulnerab...
<ul><li>Key —A random piece of data used with encryption and decryption. Encryption and decryption algorithms require a ke...
Modern Cryptography
Types of Cryptographic Systems <ul><li>Symmetric -key cryptosystems </li></ul><ul><li>Asymmetric- key or Public-key crypto...
Symmetric Encryption <ul><li>Uses conventional / secret -key   / single-key </li></ul><ul><li>Sender and recipient share a...
Symmetric Cipher Model
Requirements <ul><li>Two requirements for secure use of symmetric encryption: </li></ul><ul><ul><li>Strong encryption algo...
Block ciphers and Stream ciphers <ul><li>Each secret-key cryptography algorithm or cipher typically works in two phases:  ...
Block cipher operation
Stream cipher operation
Mode of Operation <ul><li>There are three important block cipher modes: </li></ul><ul><li>Electronic Code Book (ECB) </li>...
Electronic Codebook Book (ECB)
Cipher Block Chaining (CBC)
Cipher FeedBack (CFB)
Output FeedBack (OFB)
Symmetric-key cryptosystems <ul><li>Examples of symmetric key algorithms are as follows: </li></ul><ul><li>Data Encryption...
DES Encryption
Initial Permutation IP <ul><li>first step of the data computation  </li></ul><ul><li>IP reorders the input data bits  </li...
DES Round Structure <ul><li>uses two 32-bit L & R halves </li></ul><ul><li>as for any Feistel cipher can describe as: </li...
DES Round Structure
Substitution Boxes S <ul><li>have eight S-boxes which map 6 to 4 bits  </li></ul><ul><li>each S-box is actually 4 little 4...
Triple DES <ul><li>clear a replacement for DES was needed </li></ul><ul><ul><li>theoretical attacks that can break it </li...
Triple-DES with Two-Keys <ul><li>hence must use 3 encryptions </li></ul><ul><ul><li>would seem to need 3 distinct keys </l...
Triple-DES with Three-Keys <ul><li>although are no practical attacks on two-key Triple-DES have some indications </li></ul...
Triple DES (3DES) <ul><li>The technique used by 3DES is known as EDE (Encrypt-Decrypt-Encrypt).  </li></ul><ul><li>The pla...
Triple DES (3DES )
AES Requirements <ul><li>private key symmetric block cipher  </li></ul><ul><li>128-bit data, 128/192/256-bit keys  </li></...
Rijndael <ul><li>data block of  4 columns of 4 bytes is state </li></ul><ul><li>key is expanded to array of words </li></u...
Rijndael
Byte Substitution
Shift Rows
Mix Columns
Add Round Key
AES Decryption
Asymmetric-key or Public Key Encryption <ul><li>Based on mathematical algorithms </li></ul><ul><li>Asymmetric </li></ul><u...
Public Key Encryption  –  Encryption
Public Key Encryption  – Authentication
Public Key Encryption - Operation <ul><li>One key made public </li></ul><ul><ul><li>Used for encryption </li></ul></ul><ul...
Steps <ul><li>User generates pair of keys </li></ul><ul><li>User places one key in public domain </li></ul><ul><li>To send...
Digital Signature <ul><li>Sender encrypts message with their private key </li></ul><ul><li>Receiver can decrypt using send...
Asymmetric-key or Public-key Cryptosystems <ul><li>There are many examples of commonly used public-key systems including: ...
Diffie-Hellman Key Exchange <ul><li>first public-key type scheme proposed  </li></ul><ul><li>by Diffie & Hellman in 1976 a...
Diffie-Hellman Key Exchange
RSA Algorithm <ul><ul><li>We’re using Big Integers here: </li></ul></ul><ul><ul><li>Choose large secret prime numbers p an...
Public Key Certificate Use
Digital certificates
Digital certificates <ul><li>Digital certificates include: </li></ul><ul><ul><li>A public key </li></ul></ul><ul><ul><li>A...
Message Authentication
Message Authentication Code <ul><li>Generate authentication code based on shared key and message </li></ul><ul><li>Common ...
Hash Functions vs. MAC
<ul><li>Hash Function </li></ul><ul><ul><li>Generate a fixed length “ Fingerprint ” for an arbitrary length message </li><...
<ul><li>MAC </li></ul><ul><ul><li>Generate a fixed length MAC for an arbitrary length message </li></ul></ul><ul><ul><li>A...
Comparison of Hash Function & MAC Hash  function Arbitrary length message Hash  fixed length MAC function Arbitrary length...
Symmetric Authentication (MAC) Secret key algorithm K AB Shared  Secret key  between Alice and Bob Secret key algorithm K ...
Digital Signature Hash function Alice’s  Public key yes no Message Signature transmit Message Signature Alice Bob Public k...
Hashing <ul><li>A hashing algorithm refers to a mathematical function that takes a variable- size string as input and tran...
Using  One  Way  Hash
Secure Hash Functions <ul><li>Hash function must have following properties: </li></ul><ul><ul><li>Can be applied to any si...
SHA-1 <ul><li>Secure Hash Algorithm 1 </li></ul><ul><li>Input message less than 2 64  bits </li></ul><ul><ul><li>Processed...
Message Digest Generation Using SHA-1
Key Management
ISAKMP <ul><li>The Internet Security Association and Key Manage­ment Protocol (ISAKMP) is defined primarily as a very comp...
ISAKMP <ul><li>ISAKMP defines procedures and packet formats to establish, negotiate, modify, and delete SAs. </li></ul><ul...
ISAKMP phases <ul><li>ISAKMP offers two phases of negotiation.  </li></ul><ul><li>In the first phase, the two entities agr...
ISAKMP and TCP/IP
OAKLEY <ul><li>The OAKLEY protocol allows two authenticated entities to exchange and establish secret keying material.  </...
OAKLEY Key Exchange <ul><li>An OAKLEY key exchange is made up of a sequence of message exchanges.  </li></ul><ul><li>The g...
IKE <ul><li>IKE is the protocol that performs mutual authentication and establishes SAs between two parties for IPSec. </l...
Key ISAKMP, OAKLEY, AND SKEME concept in IKE
Digital Certificates Digital Signatures: (Data Origin Authentication, Data Integrity, and Non-repudiation) Digital Signatu...
Digital Signature with Hash Function
Pretty good privacy (PGP) <ul><li>PGP Encryption  ( Pretty Good Privacy ) is a computer program that provides cryptographi...
Pretty Good Privacy PGP encryption
Pretty Good Privacy PGP decryption
Applications of Cryptosystems <ul><li>Automatic Teller Machines </li></ul><ul><li>Phone Cards </li></ul><ul><li>Cellular P...
Upcoming SlideShare
Loading in …5
×

Unit 3: Cryptography

4,720 views

Published on

1 Comment
7 Likes
Statistics
Notes
No Downloads
Views
Total views
4,720
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
504
Comments
1
Likes
7
Embeds 0
No embeds

No notes for slide
  • All traditional schemes are symmetric / single key / private-key encryption algorithms, with a single key , used for both encryption and decryption, since both sender and receiver are equivalent, either can encrypt or decrypt messages using that common key.
  • All traditional schemes are symmetric / single key / private-key encryption algorithms, with a single key , used for both encryption and decryption, since both sender and receiver are equivalent, either can encrypt or decrypt messages using that common key.
  • All traditional schemes are symmetric / single key / private-key encryption algorithms, with a single key , used for both encryption and decryption, since both sender and receiver are equivalent, either can encrypt or decrypt messages using that common key.
  • Stallings Figure 6.3 illustrates the Electronic Codebook (ECB) Mode.
  • Stallings Figure 6.4 illustrates the Cipher Block Chaining (CBC) Mode.
  • Stallings Figure 6.5 illustrates the Cipher FeedBack (CFB) Mode.
  • Stallings Figure 6.6 illustrates the Output FeedBack (OFB) Mode.
  • The basic process in enciphering a 64-bit data block using the DES, shown on the left side, consists of: - an initial permutation (IP) - 16 rounds of a complex key dependent round function involving substitution and permutation functions - a final permutation, being the inverse of IP The right side shows the handling of the 56-bit key and consists of: - an initial permutation of the key (PC1) which selects 56-bits in two 28-bit halves - 16 stages to generate the subkeys using a left circular shift and a permutation
  • The initial permutation and its inverse are defined by tables, as shown in Tables 3.2a and 3.2b, respectively. The tables are to be interpreted as follows. The input to a table consists of 64 bits numbered from 1 to 64. The 64 entries in the permutation table contain a permutation of the numbers from 1 to 64. Each entry in the permutation table indicates the position of a numbered input bit in the output, which also consists of 64 bits. Note that the bit numbering for DES reflects IBM mainframe practice, and is the opposite of what we now mostly use - so be careful! Numbers from Bit 1 (leftmost, most significant) to bit 32/48/64 etc (rightmost, least significant). Note that examples are specified using hexadecimal.
  • Note that the s-boxes provide the “confusion” of data and key values, whilst the permutation P then spreads this as widely as possible, so each S-box output affects as many S-box inputs in the next round as possible, giving “diffusion”.
  • Stallings Fig 3.9
  • The substitution consists of a set of eight S-boxes, each of which accepts 6 bits as input and produces 4 bits as output. These transformations are defined in Table 3.3, which is interpreted as follows: The first and last bits of the input to box S i form a 2-bit binary number to select one of four substitutions defined by the four rows in the table for S i . The middle four bits select one of the sixteen columns. The decimal value in the cell selected by the row and column is then converted to its 4-bit representation to produce the output. For example, in S1, for input 011001, the row is 01 (row 1) and the column is 1100 (column 12). The value in row 1, column 12 is 9, so the output is 1001.
  • Triple-DES with two keys is a popular alternative to single-DES, but suffers from being 3 times slower to run. Although there are no practical attacks, have some indications of attack approaches. Hence some are now adopting Triple-DES with three keys for greater sucurity.
  • The idea of public key schemes, and the first practical scheme, which was for key distribution only, was published in 1977 by Diffie &amp; Hellman. The concept had been previously described in a classified report in 1970 by James Ellis (UK CESG) - and subsequently declassified in 1987. See History of Non-secret Encryption (at CESG) .
  • The idea of public key schemes, and the first practical scheme, which was for key distribution only, was published in 1977 by Diffie &amp; Hellman. The concept had been previously described in a classified report in 1970 by James Ellis (UK CESG) - and subsequently declassified in 1987. See History of Non-secret Encryption (at CESG) .
  • Unit 3: Cryptography

    1. 1. Cryptography (One Day Cryptography Tutorial) By Dr. Mohsen M. Tantawy
    2. 2. Definitions
    3. 3. <ul><li>Plaintext : easy to understand form (original message) </li></ul><ul><li>Ciphertext : difficult to understand form </li></ul><ul><li>Encryption : encoding (plaintext -> ciphertext) </li></ul><ul><li>Decryption : decoding (ciphertext -> plaintext) </li></ul><ul><li>Cryptology : study of encryption </li></ul><ul><li>Cryptography : use of encryption </li></ul><ul><li>Cryptanalysis : breaking encryption </li></ul>Definitions
    4. 4. Definitions <ul><li>Alice —She is an end user/computer without malicious intentions, one of the main users of cryptography. </li></ul><ul><li>Bob —He is Alice’s friend and is also a main user of cryptography, without malicious intentions. </li></ul><ul><li>Cathy —Another user of cryptography; she does not usually have a large roll nor malicious intentions. </li></ul><ul><li>Eve —A malicious user that does not interfere with communications. She simply wants to eavesdrop on the conversation between two other characters, typically Alice and Bob, but does not actively try to attack the communication. </li></ul><ul><li>Mallory —The malicious user. Always trying to thwart attempts by other characters to communicate securely. </li></ul><ul><li>Trent —He is a trusted third party. He only communicates with Alice, Bob, or Cathy when they ask for his help. He can always be trusted to do what he says he will do. </li></ul>Group of individuals
    5. 5. Group of individuals <ul><li>Hacker – is a general term that has historically been used to describe a computer programming expert. More recently, this term is commonly used in a negative way to describe an individual that attempts to gain unauthorized access to network resources with malicious intent. </li></ul><ul><li>Cracker – is the term that is generally regarded as the more accurate word that is used to describe an individual that attempts to gain unauthorized access to network resources with malicious intent. </li></ul>
    6. 6. Group of individuals <ul><li>Phreaker – is an individual that manipulates the phone network in order to cause it to perform a function that is normally not allowed. A common goal of phreaking is breaking into the phone network, usually through a payphone, to make free long distance calls. </li></ul><ul><li>Spammer – is an individual that sends large quantities of unsolicited email messages. Spammers often use viruses to take control of home computers in order to use these computers to send out their bulk messages. </li></ul><ul><li>Fisher – uses email or other means in an attempt to trick others into providing sensitive information, such as credit card numbers or passwords. The Phisher will masquerade as a trusted party that would have a legitimate need for the sensitive information. </li></ul>
    7. 7. Group of individuals <ul><li>White hat – is a term used to describe individuals that use their abilities to find vulnerabilities in systems or networks, and then report these vulnerabilities to the owners of the system so that they can be fixed. </li></ul><ul><li>Black hat – is another term for individuals that use their knowledge of computer systems to break into systems or networks that they are not authorized to use. </li></ul>
    8. 8. <ul><li>Key —A random piece of data used with encryption and decryption. Encryption and decryption algorithms require a key and plain text or cipher text to produce cipher text or plain text, respectively. </li></ul><ul><li>Security Association — A set of information that describes how the communicating entities will utilize security. </li></ul>Definitions
    9. 9. Modern Cryptography
    10. 10. Types of Cryptographic Systems <ul><li>Symmetric -key cryptosystems </li></ul><ul><li>Asymmetric- key or Public-key cryptosystems </li></ul><ul><li>Hybrid (Symmetric-key and Asymmetric-key) cryptosystems </li></ul>
    11. 11. Symmetric Encryption <ul><li>Uses conventional / secret -key / single-key </li></ul><ul><li>Sender and recipient share a common key </li></ul><ul><li>All classical encryption algorithms are private-key </li></ul><ul><li>The only type prior to invention of public-key in 1970’s </li></ul>
    12. 12. Symmetric Cipher Model
    13. 13. Requirements <ul><li>Two requirements for secure use of symmetric encryption: </li></ul><ul><ul><li>Strong encryption algorithm </li></ul></ul><ul><ul><li>Secret key known only to sender / receiver </li></ul></ul><ul><ul><li>Y = E K ( X ) </li></ul></ul><ul><ul><li>X = D K ( Y ) </li></ul></ul><ul><li>Assume encryption algorithm is known </li></ul><ul><li>Implies a secure channel to distribute key </li></ul>
    14. 14. Block ciphers and Stream ciphers <ul><li>Each secret-key cryptography algorithm or cipher typically works in two phases: </li></ul><ul><ul><li>key set-up phase </li></ul></ul><ul><ul><li>ciphering or encrypt and decrypt phase. </li></ul></ul><ul><li>There are two major classes of these algorithms: block ciphers and stream ciphers. </li></ul><ul><li>Block ciphers encrypt plaintext in units of blocks and likewise decrypt cipher text in units of blocks. </li></ul><ul><li>Stream ciphers encrypt plaintext in one stream and decrypt cipher text likewise. </li></ul>
    15. 15. Block cipher operation
    16. 16. Stream cipher operation
    17. 17. Mode of Operation <ul><li>There are three important block cipher modes: </li></ul><ul><li>Electronic Code Book (ECB) </li></ul><ul><li>Cipher Block Chaining (CBC) </li></ul><ul><li>Cipher Feedback Mode (CFB) </li></ul>
    18. 18. Electronic Codebook Book (ECB)
    19. 19. Cipher Block Chaining (CBC)
    20. 20. Cipher FeedBack (CFB)
    21. 21. Output FeedBack (OFB)
    22. 22. Symmetric-key cryptosystems <ul><li>Examples of symmetric key algorithms are as follows: </li></ul><ul><li>Data Encryption Standard ( DES ) (56bits) </li></ul><ul><li>Triple DES ( 3DES ) (168 bits) </li></ul><ul><li>Advanced Encryption Standard ( AES ) </li></ul><ul><li>International Data Encryption Algorithm ( IDEA ) (128 bits) </li></ul><ul><li>Rivets Cipher 4 ( RC4 ) (variable length key) </li></ul>
    23. 23. DES Encryption
    24. 24. Initial Permutation IP <ul><li>first step of the data computation </li></ul><ul><li>IP reorders the input data bits </li></ul><ul><li>even bits to LH half, odd bits to RH half </li></ul><ul><li>quite regular in structure (easy in h/w) </li></ul>
    25. 25. DES Round Structure <ul><li>uses two 32-bit L & R halves </li></ul><ul><li>as for any Feistel cipher can describe as: </li></ul><ul><ul><li>L i = R i –1 </li></ul></ul><ul><ul><li>R i = L i –1 xor F( R i –1 , K i ) </li></ul></ul><ul><li>takes 32-bit R half and 48-bit subkey and: </li></ul><ul><ul><li>expands R to 48-bits using perm E </li></ul></ul><ul><ul><li>adds to subkey </li></ul></ul><ul><ul><li>passes through 8 S-boxes to get 32-bit result </li></ul></ul><ul><ul><li>finally permutes this using 32-bit perm P </li></ul></ul>
    26. 26. DES Round Structure
    27. 27. Substitution Boxes S <ul><li>have eight S-boxes which map 6 to 4 bits </li></ul><ul><li>each S-box is actually 4 little 4 bit boxes </li></ul><ul><ul><li>outer bits 1 & 6 ( row bits) select one rows </li></ul></ul><ul><ul><li>inner bits 2-5 ( col bits) are substituted </li></ul></ul><ul><ul><li>result is 8 lots of 4 bits, or 32 bits </li></ul></ul><ul><li>row selection depends on both data & key </li></ul><ul><ul><li>feature known as autokeying </li></ul></ul>
    28. 28. Triple DES <ul><li>clear a replacement for DES was needed </li></ul><ul><ul><li>theoretical attacks that can break it </li></ul></ul><ul><ul><li>demonstrated exhaustive key search attacks </li></ul></ul><ul><li>AES is a new cipher alternative </li></ul><ul><li>prior to this alternative was to use multiple encryption with DES implementations </li></ul><ul><li>Triple-DES is the chosen form </li></ul>
    29. 29. Triple-DES with Two-Keys <ul><li>hence must use 3 encryptions </li></ul><ul><ul><li>would seem to need 3 distinct keys </li></ul></ul><ul><li>but can use 2 keys with E-D-E sequence </li></ul><ul><ul><li>C = E K1 [D K2 [E K1 [P]]] </li></ul></ul><ul><ul><li>if K1=K2 then can work with single DES </li></ul></ul><ul><li>standardized in ANSI X9.17 & ISO8732 </li></ul><ul><li>no current known practical attacks </li></ul>
    30. 30. Triple-DES with Three-Keys <ul><li>although are no practical attacks on two-key Triple-DES have some indications </li></ul><ul><li>can use Triple-DES with Three-Keys to avoid even these </li></ul><ul><ul><li>C = E K3 [D K2 [E K1 [P]]] </li></ul></ul><ul><li>has been adopted by some Internet applications, eg PGP, S/MIME </li></ul>
    31. 31. Triple DES (3DES) <ul><li>The technique used by 3DES is known as EDE (Encrypt-Decrypt-Encrypt). </li></ul><ul><li>The plaintext message is encrypted using the first 8 bytes of the 3DES. </li></ul><ul><li>Then the message is decrypted using the middle 8 bytes of the key. </li></ul><ul><li>Finally, the message is encrypted using the last 8 bytes of the key to produce an 8-byte block. </li></ul>
    32. 32. Triple DES (3DES )
    33. 33. AES Requirements <ul><li>private key symmetric block cipher </li></ul><ul><li>128-bit data, 128/192/256-bit keys </li></ul><ul><li>stronger & faster than Triple-DES </li></ul><ul><li>active life of 20-30 years (+ archival use) </li></ul><ul><li>provide full specification & design details </li></ul><ul><li>both C & Java implementations </li></ul>
    34. 34. Rijndael <ul><li>data block of 4 columns of 4 bytes is state </li></ul><ul><li>key is expanded to array of words </li></ul><ul><li>has 9/11/13 rounds in which state undergoes: </li></ul><ul><ul><li>byte substitution (1 S-box used on every byte) </li></ul></ul><ul><ul><li>shift rows (permute bytes between groups/columns) </li></ul></ul><ul><ul><li>mix columns (subs using matrix multipy of groups) </li></ul></ul><ul><ul><li>add round key (XOR state with key material) </li></ul></ul><ul><ul><li>view as alternating XOR key & scramble data bytes </li></ul></ul><ul><li>initial XOR key material & incomplete last round </li></ul><ul><li>with fast XOR & table lookup implementation </li></ul>
    35. 35. Rijndael
    36. 36. Byte Substitution
    37. 37. Shift Rows
    38. 38. Mix Columns
    39. 39. Add Round Key
    40. 40. AES Decryption
    41. 41. Asymmetric-key or Public Key Encryption <ul><li>Based on mathematical algorithms </li></ul><ul><li>Asymmetric </li></ul><ul><ul><li>Use two separate keys </li></ul></ul><ul><li>Public Key issues </li></ul><ul><ul><li>Plain text </li></ul></ul><ul><ul><li>Encryption algorithm </li></ul></ul><ul><ul><li>Public and private key </li></ul></ul><ul><ul><li>Cipher text </li></ul></ul><ul><ul><li>Decryption algorithm </li></ul></ul>
    42. 42. Public Key Encryption – Encryption
    43. 43. Public Key Encryption – Authentication
    44. 44. Public Key Encryption - Operation <ul><li>One key made public </li></ul><ul><ul><li>Used for encryption </li></ul></ul><ul><li>Other kept private </li></ul><ul><ul><li>Used for decryption </li></ul></ul><ul><li>Infeasible to determine decryption key given encryption key and algorithm </li></ul><ul><li>Either key can be used for encryption, the other for decryption </li></ul>
    45. 45. Steps <ul><li>User generates pair of keys </li></ul><ul><li>User places one key in public domain </li></ul><ul><li>To send a message to this user, encrypt using public key </li></ul><ul><li>User decrypts using private key </li></ul>
    46. 46. Digital Signature <ul><li>Sender encrypts message with their private key </li></ul><ul><li>Receiver can decrypt using senders public key </li></ul><ul><li>This authenticates sender, who is only person who has the matching key </li></ul><ul><li>Does not give privacy of data </li></ul><ul><ul><li>Decrypt key is public </li></ul></ul>
    47. 47. Asymmetric-key or Public-key Cryptosystems <ul><li>There are many examples of commonly used public-key systems including: </li></ul><ul><li>Diffie-Hellman </li></ul><ul><li>Rivest, Shamir , Adleman (RSA) </li></ul><ul><li>Digital Signature Algorithm (DSA) / </li></ul><ul><li>Al Gamal </li></ul><ul><li>Elliptic Curve Cryptosystem ( ECC ) </li></ul>
    48. 48. Diffie-Hellman Key Exchange <ul><li>first public-key type scheme proposed </li></ul><ul><li>by Diffie & Hellman in 1976 along with the exposition of public key concepts </li></ul><ul><ul><li>note: now know that James Ellis (UK CESG) secretly proposed the concept in 1970 </li></ul></ul><ul><li>is a practical method for public exchange of a secret key </li></ul>
    49. 49. Diffie-Hellman Key Exchange
    50. 50. RSA Algorithm <ul><ul><li>We’re using Big Integers here: </li></ul></ul><ul><ul><li>Choose large secret prime numbers p and q </li></ul></ul><ul><ul><li>Calculate N = p * q </li></ul></ul><ul><ul><li>Choose exponent e such that </li></ul></ul><ul><ul><ul><ul><li>gcd(e, (p-1)(q-1)) = 1 </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Normally choose 3, 17 or 65537 </li></ul></ul></ul></ul><ul><ul><li>Public key is pair N and e </li></ul></ul><ul><ul><li>Choose d so that </li></ul></ul><ul><ul><ul><ul><li>e * d = 1 (mod (p-1)(q-1)) </li></ul></ul></ul></ul><ul><ul><li>Private key is d (for efficiency d, p, q) </li></ul></ul><ul><ul><li>Encryption: c = m e (mod N) </li></ul></ul><ul><ul><li>Decryption: m = c d (mod N) </li></ul></ul><ul><ul><li>Baby example </li></ul></ul><ul><ul><li>p=7, q=11 </li></ul></ul><ul><ul><li>N=77 </li></ul></ul><ul><ul><li>37 </li></ul></ul><ul><ul><li>gcd (37,(7-1)(11-1)) = 1 </li></ul></ul><ul><ul><li>77, 37 </li></ul></ul><ul><ul><li>13 </li></ul></ul><ul><ul><li>37*13=481=1(mod 60) </li></ul></ul><ul><ul><li>13 </li></ul></ul><ul><ul><li>2 37 mod 77 = 51 </li></ul></ul><ul><ul><li>51 13 mod 77 = 2 </li></ul></ul>
    51. 51. Public Key Certificate Use
    52. 52. Digital certificates
    53. 53. Digital certificates <ul><li>Digital certificates include: </li></ul><ul><ul><li>A public key </li></ul></ul><ul><ul><li>An individual or organisation’s details </li></ul></ul><ul><ul><li>A digital signature from a certifying authority (CA) </li></ul></ul><ul><ul><ul><li>This states that the CA has seen proof of identity </li></ul></ul></ul><ul><li>Common certifying authorities: </li></ul><ul><ul><li>VeriSign, Thawte, Equifax Secure, British Telecom </li></ul></ul><ul><ul><li>CAs are themselves certified by other CAs </li></ul></ul><ul><ul><li>A few “root” CAs are usually trusted </li></ul></ul>
    54. 54. Message Authentication
    55. 55. Message Authentication Code <ul><li>Generate authentication code based on shared key and message </li></ul><ul><li>Common key shared between A and B </li></ul><ul><li>If only sender and receiver know key and code matches: </li></ul><ul><ul><li>Receiver assured message has not altered </li></ul></ul><ul><ul><li>Receiver assured message is from alleged sender </li></ul></ul><ul><ul><li>If message has sequence number, receiver assured of proper sequence </li></ul></ul>
    56. 56. Hash Functions vs. MAC
    57. 57. <ul><li>Hash Function </li></ul><ul><ul><li>Generate a fixed length “ Fingerprint ” for an arbitrary length message </li></ul></ul><ul><ul><li>No Key involved </li></ul></ul><ul><ul><li>Must be at least One-way to be useful </li></ul></ul><ul><li>Constructions </li></ul><ul><ul><li>Iterated hash functions (MD4-family hash functions): MD5, SHA1, … </li></ul></ul><ul><ul><li>Hash functions based on block ciphers: MDC(Manipulation Detection Code) </li></ul></ul>Hash Functions H Message M Message Digest D D = H(M)
    58. 58. <ul><li>MAC </li></ul><ul><ul><li>Generate a fixed length MAC for an arbitrary length message </li></ul></ul><ul><ul><li>A keyed hash function </li></ul></ul><ul><ul><li>Message origin authentication </li></ul></ul><ul><ul><li>Message integrity </li></ul></ul><ul><ul><li>Entity authentication </li></ul></ul><ul><ul><li>Transaction authentication </li></ul></ul>Message Authentication Codes (MACs) MAC SEND MAC MAC Shared Secret Key
    59. 59. Comparison of Hash Function & MAC Hash function Arbitrary length message Hash fixed length MAC function Arbitrary length message MAC fixed length Secret key <ul><li>Easy to compute </li></ul><ul><li>Compression: arbitrary length input to fixed length output </li></ul><ul><li>Unkeyed function vs. Keyed function </li></ul>
    60. 60. Symmetric Authentication (MAC) Secret key algorithm K AB Shared Secret key between Alice and Bob Secret key algorithm K AB yes no Message MAC transmit Message MAC MAC  Alice Bob Shared Secret key between Alice and Bob
    61. 61. Digital Signature Hash function Alice’s Public key yes no Message Signature transmit Message Signature Alice Bob Public key algorithm Alice’s Private key Hash value Hash function Hash value 1 Public key algorithm Hash value 2
    62. 62. Hashing <ul><li>A hashing algorithm refers to a mathematical function that takes a variable- size string as input and transforms (hashes) it into a fixed-size string, which is called the hash value. </li></ul><ul><li>One of the most common uses of hashing in network security is to produce condensed representations of messages or “fingerprints,” often known as “message digests,” by applying a hashing algorithm to an arbitrary amount of data — the message. </li></ul><ul><li>The two most commonly used hashing algorithms are MD5 and SHA­1 (part of the secure hash standard [SHS]). </li></ul>
    63. 63. Using One Way Hash
    64. 64. Secure Hash Functions <ul><li>Hash function must have following properties: </li></ul><ul><ul><li>Can be applied to any size data block </li></ul></ul><ul><ul><li>Produce fixed length output </li></ul></ul><ul><ul><li>Easy to compute </li></ul></ul><ul><ul><li>Not feasible to reverse </li></ul></ul><ul><ul><li>Not feasible to find two message that give the same hash </li></ul></ul>
    65. 65. SHA-1 <ul><li>Secure Hash Algorithm 1 </li></ul><ul><li>Input message less than 2 64 bits </li></ul><ul><ul><li>Processed in 512 bit blocks </li></ul></ul><ul><li>Output 160 bit digest </li></ul>
    66. 66. Message Digest Generation Using SHA-1
    67. 67. Key Management
    68. 68. ISAKMP <ul><li>The Internet Security Association and Key Manage­ment Protocol (ISAKMP) is defined primarily as a very comprehensive framework for key management offering maximum flexibility </li></ul><ul><li>OAKLEY is defined based on the Diffie–Hellman key-exchange algorithm. </li></ul><ul><li>IKE, on the other hand, is defined primarily to be the key management for the IPSec Architecture and makes use of parts of the ISAKMP and OAKLEY definitions. </li></ul>
    69. 69. ISAKMP <ul><li>ISAKMP defines procedures and packet formats to establish, negotiate, modify, and delete SAs. </li></ul><ul><li>ISAKMP only describes the procedures, i.e., how something is done. </li></ul><ul><li>ISAKMP is independent of the security protocols, cryptographic algorithms, and key-generation and key-exchange techniques that are actually used. </li></ul>
    70. 70. ISAKMP phases <ul><li>ISAKMP offers two phases of negotiation. </li></ul><ul><li>In the first phase, the two entities agree on how to protect further negotiation traffic between themselves, establishing an ISAKMP SA. </li></ul><ul><li>The second phase of negotiation is used to establish security associations for other security protocols. The security associations established by ISAKMP during this phase can be used by a security protocol to protect many message or data exchanges. </li></ul>
    71. 71. ISAKMP and TCP/IP
    72. 72. OAKLEY <ul><li>The OAKLEY protocol allows two authenticated entities to exchange and establish secret keying material. </li></ul><ul><li>It is designed to be a compatible component of ISAKMP. </li></ul><ul><li>The two communicating entities negotiate methods for encryption, key derivation, and authentication. </li></ul><ul><li>The basic mechanism of OAKLEY is the Diffie–Hellman key-exchange algorithm, which estab­lishes a shared key without transmitting this key. </li></ul>
    73. 73. OAKLEY Key Exchange <ul><li>An OAKLEY key exchange is made up of a sequence of message exchanges. </li></ul><ul><li>The goal of key-exchange processing is the secure establishment of a common keying information state in the two communicating entities. </li></ul><ul><li>This state information consists of a key name, secret keying material, the identities of the two parties, and three algorithms for use during authentication: </li></ul><ul><ul><li>encryption </li></ul></ul><ul><ul><li>hashing, and </li></ul></ul><ul><ul><li>authentication </li></ul></ul>
    74. 74. IKE <ul><li>IKE is the protocol that performs mutual authentication and establishes SAs between two parties for IPSec. </li></ul><ul><li>IKE uses parts of ISAKMP, OAKLEY, and SKEME to provide management of keys and security associations. </li></ul>
    75. 75. Key ISAKMP, OAKLEY, AND SKEME concept in IKE
    76. 76. Digital Certificates Digital Signatures: (Data Origin Authentication, Data Integrity, and Non-repudiation) Digital Signature
    77. 77. Digital Signature with Hash Function
    78. 78. Pretty good privacy (PGP) <ul><li>PGP Encryption ( Pretty Good Privacy ) is a computer program that provides cryptographic privacy and authentication. </li></ul><ul><li>Public key cryptography , also known as asymmetric cryptography , is a form of cryptography in which a user has a pair of cryptographic keys - a public key and a private key </li></ul><ul><li>It was originally created by Philip Zimmermann in 1991. </li></ul>
    79. 79. Pretty Good Privacy PGP encryption
    80. 80. Pretty Good Privacy PGP decryption
    81. 81. Applications of Cryptosystems <ul><li>Automatic Teller Machines </li></ul><ul><li>Phone Cards </li></ul><ul><li>Cellular Phone Networks </li></ul><ul><li>Remote System Access </li></ul><ul><li>Credit Cards </li></ul><ul><li>Electronic Cash </li></ul><ul><li>Medical Records </li></ul>

    ×