Elementry Cryptography


Published on

Basic of Elementry Cryptography. Types of cryptography & broad categorization of Encryption algorithm

Published in: Technology, Education

Elementry Cryptography

  1. 1. School of Computer Science & Information Technology Presentation On Elementary Cryptography Presented by: Anshul Jain (NM) Sumit Lole (CS) M.Tech. II sem Guided by: Dr. D.S. Bhilare
  2. 2. Agenda <ul><li>Introduction </li></ul><ul><ul><li>Basic Terminologies </li></ul></ul><ul><li>Techniques of Cryptography </li></ul><ul><li>Need of Cryptography </li></ul><ul><li>Encryption Algorithm </li></ul><ul><ul><li>Symmetric </li></ul></ul><ul><ul><li>Asymmetric </li></ul></ul><ul><li>Uses of Encryption </li></ul><ul><ul><li>Digital Signature </li></ul></ul>
  3. 3. <ul><li>What is Elementary Cryptography? </li></ul><ul><ul><li>“ Hidden Writing” </li></ul></ul><ul><ul><li>Increasingly used to protect Information. </li></ul></ul><ul><li>Goal of Cryptography </li></ul><ul><ul><li>Ensure security of communication over insecure medium </li></ul></ul><ul><ul><ul><li>Privacy (secrecy, confidentiality) </li></ul></ul></ul><ul><ul><ul><li>Integrity </li></ul></ul></ul><ul><ul><li>Communicate even with possibility of adversaries </li></ul></ul>Introduction
  4. 4. Basic Terminologies <ul><li>Encryption </li></ul><ul><ul><li>Encryption is the process of encoding a message so that its meaning is not obvious </li></ul></ul><ul><li>Decryption </li></ul><ul><ul><li>Decryption is the reverse process, transforming an encrypted message back into its normal, original form </li></ul></ul><ul><li>Cryptosystem </li></ul><ul><ul><li>A system for encryption and decryption is called a cryptosystem. </li></ul></ul>
  5. 5. Cont… <ul><li>Plaintext </li></ul><ul><li>Ciphertext </li></ul><ul><li>Key – </li></ul><ul><ul><li>key refers to a sequence of symbols or a numerical value used by an algorithm to alter information & making that information secure </li></ul></ul><ul><li>Encryption algorithm </li></ul><ul><ul><li>The cryptosystem involves a set of rules for how to encrypt the plaintext and how to decrypt the ciphertext. </li></ul></ul><ul><li>Cryptanalysis </li></ul><ul><ul><li>Cryptanalysis is an attempt to break the ciphertext. </li></ul></ul>
  6. 6. <ul><li>Substitution Technique </li></ul><ul><ul><li>Caesar Cipher </li></ul></ul><ul><ul><li>Monoalphabetic Cipher </li></ul></ul><ul><ul><li>Homophonic Cipher </li></ul></ul><ul><ul><li>Polygram substitution cipher </li></ul></ul><ul><ul><li>Polyalphabetic Cipher </li></ul></ul><ul><ul><ul><li>Vigenère </li></ul></ul></ul><ul><li>Transposition Technique </li></ul><ul><ul><li>Rail Fence Technique. </li></ul></ul><ul><ul><li>Vernam Cipher(One -time Pads) </li></ul></ul><ul><ul><ul><li>Randomly generated Pad </li></ul></ul></ul><ul><ul><li>Running Key Cipher. </li></ul></ul><ul><ul><li>Playfair Cipher. </li></ul></ul><ul><ul><li>Hill Cipher. </li></ul></ul>Techniques of Cryptography
  7. 7. Cont… <ul><li>Stream-based Ciphers </li></ul><ul><ul><li>One at a time, please </li></ul></ul><ul><ul><li>Mixes plaintext with key stream </li></ul></ul><ul><ul><li>Good for real-time services </li></ul></ul><ul><li>Block Ciphers </li></ul><ul><ul><li>Amusement Park Ride </li></ul></ul><ul><ul><li>Substitution and transposition </li></ul></ul><ul><li>Confusion </li></ul><ul><ul><li>Ciphertext has no clue about Plaintext </li></ul></ul><ul><li>Diffusion </li></ul><ul><ul><li>Spreading plain text across rows and columns </li></ul></ul><ul><li>http://www.simonsingh.net/The_Black_Chamber </li></ul>
  8. 8. Need of Encryption <ul><li>Confidentiality </li></ul><ul><li>Integrity </li></ul><ul><li>Authenticity </li></ul><ul><li>Nonrepudiation </li></ul><ul><li>Access Control </li></ul>
  9. 9. Encryption Algorithm <ul><li>Symmetric </li></ul><ul><ul><li>Same key for encryption and decryption </li></ul></ul><ul><ul><li>Key distribution problem </li></ul></ul><ul><li>Asymmetric </li></ul><ul><ul><li>Mathematically related key pairs for encryption and decryption </li></ul></ul><ul><ul><li>Public and private keys </li></ul></ul><ul><li>Hybrid </li></ul><ul><ul><li>Combines strengths of both methods </li></ul></ul><ul><ul><li>Asymmetric distributes symmetric key </li></ul></ul><ul><ul><ul><li>Also known as a session key </li></ul></ul></ul><ul><ul><li>Symmetric provides bulk encryption </li></ul></ul>
  10. 10. Symmetric Algorithm <ul><li>It is also called as Secret Key Cryptography </li></ul><ul><ul><li>Single key used for both encrypt & decrypt </li></ul></ul><ul><ul><li>Key must be known to both the parties </li></ul></ul>Encryption Decryption Key Plaintext Ciphertext Original Plaintext Symmetric Cryptosystem
  11. 11. Asymmetric Algorithm <ul><li>Private keys are used for decrypting. </li></ul><ul><li>Public keys are used for encrypting </li></ul><ul><li>encryption </li></ul><ul><li>plaintext ciphertext </li></ul><ul><li>public key </li></ul><ul><li>decryption </li></ul><ul><li>ciphertext plaintext </li></ul><ul><li>private key </li></ul>
  12. 12. Cont… <ul><li>It is also called as public key cryptography </li></ul>Encryption Decryption Plaintext Ciphertext Original Plaintext Asymmetric Cryptosystem Decryption Key Kd Encryption Key Ke
  13. 13. Comparison Secret Key (Symmetric) Public Key (Asymmetric) Number of Key 1 2 Protection of Key Must be kept secret One key must be kept secret 7 other can be freely exposed Best Uses Cryptographic workhorse; secrecy and integrity of data, single characters to blocks of data, messages, files Key exchange, authentication Key Distribution Must be out-of-band Public key can be used to distribute other keys Speed Fast Slow; typically, 10,000 times slower than secret key
  14. 14. Symmetric Algorithm <ul><li>Data Encryption Standard (DES) </li></ul><ul><ul><li>Double DES </li></ul></ul><ul><ul><li>Triple DES </li></ul></ul><ul><li>Advance Encryption Standard (AES) </li></ul><ul><li>Blowfish </li></ul><ul><li>IDEA </li></ul>
  15. 15. Data Encryption Standard <ul><li>The data encryption algorithm developed by IBM was based on Lucifer, and it is known as the Data Encryption Standard </li></ul><ul><li>It is also known as Data Encryption Algorithm </li></ul><ul><li>The DES algorithm is a careful and complex combination of two fundamental building blocks of encryption: </li></ul><ul><ul><li>Substitution and </li></ul></ul><ul><ul><li>Transposition </li></ul></ul><ul><li>DES uses only standard arithmetic and logical operations on numbers up to 64 bits long </li></ul>
  16. 16. Cont… <ul><li>1 st 64 bit plain text is handed over to initial permutation function. </li></ul><ul><li>IP is performed over the plain text. </li></ul><ul><li>IP produces two halves of the permuted blocks left plain text (LPT) & right plain text (RPT). </li></ul><ul><li>Now LPT & RPT goes 16 rounds of encryption process, each with its own key. </li></ul><ul><li>Now LPT & RPT are rejoined and FINAL PERMUTATION (FP) is performed on the combined block. </li></ul><ul><li>The result is 64 bit cipher text. </li></ul>
  17. 17. Advance Encryption Standard <ul><li>Developed by NIST in January1997 </li></ul><ul><li>Algorithm had several restriction: </li></ul><ul><ul><li>unclassified </li></ul></ul><ul><ul><li>publicly disclosed </li></ul></ul><ul><ul><li>available royalty-free for use worldwide </li></ul></ul><ul><ul><li>symmetric block cipher algorithms, for blocks of 128 bits </li></ul></ul><ul><ul><li>usable with key sizes of 128, 192, and 256 bits </li></ul></ul><ul><li>It was adopted by US government in December 2001 </li></ul>
  18. 18. Cont… <ul><li>AES primarily uses: </li></ul><ul><ul><li>Substitution </li></ul></ul><ul><ul><li>Transposition </li></ul></ul><ul><ul><li>Shift </li></ul></ul><ul><ul><li>Exclusive OR </li></ul></ul><ul><ul><li>Addition </li></ul></ul><ul><ul><li>Each cycle consist of four step </li></ul></ul><ul><ul><li>Byte substitution </li></ul></ul><ul><ul><li>Shift row </li></ul></ul><ul><ul><li>Mix column </li></ul></ul><ul><ul><li>Add sub key </li></ul></ul>
  19. 19. Comparison between DES & AES DES AES Date 1976 1997 Block Size 64 bits 128 bits Key Length 56 bits(effective length) 128, 192, 256 ( possibly more) bits Encryption Primitive Substitution, permutation Substitution, shift, bit mixing Cryptographic Primitive Open Open Design Close Open Selection Process Secret Secret, but accepted open public comment
  20. 20. Asymmetric Algorithm <ul><li>Rivest Shamir Adleman (RSA) Encryption </li></ul><ul><li>Diffie-Hellman </li></ul><ul><li>Elliptic Curve Cryptography (ECC) </li></ul>
  21. 21. RSA <ul><li>It is named after its three inventors R ivest S hamir and A dleman </li></ul><ul><li>This algorithm was introduced in 1978 and to date remains secure. </li></ul><ul><li>RSA has been the subject of extensive cryptanalysis, and no serious flaws have yet been found. </li></ul><ul><li>The encryption algorithm is based on the underlying problem of factoring large numbers. </li></ul>
  22. 22. Cont… <ul><li>The two keys used in RSA, d and e, are used for decryption and encryption </li></ul><ul><li>Keys are actually interchangeable: Either can be chosen as the public </li></ul><ul><li>Let encryption key e and the decryption key d. </li></ul><ul><ul><li>P = E(D(P)) = D(E(P)) </li></ul></ul><ul><ul><li>Any plaintext block P is encrypted as P e mod n. </li></ul></ul><ul><ul><li>The decrypting key d is carefully chosen so that (P e ) d mod n = P </li></ul></ul>
  23. 23. Cont… <ul><li>Choose any two prime numbers p=17 & q=11 </li></ul><ul><li>Calculate n = p x q n = 187 </li></ul><ul><li>Calculate n’ = (p-1) x (q-1 ) n’ = 160 </li></ul><ul><li>Select e as relative prime to n’ and less than n’ e=7 </li></ul><ul><li>Calculate d such that d x e = 1 mod n’ d = 23 </li></ul><ul><li>Public {7,187} </li></ul><ul><li>Private {23,187} </li></ul>
  24. 24. Diffie- Hellman <ul><li>It is a cryptographic protocol that allows two parties that have no prior knowledge of each other to jointly establish a shared secret key over an insecure communications channel. This key can then be used to encrypt subsequent communications using a symmetric key cipher. </li></ul>
  25. 25. Cont…
  26. 26. Uses of Encryption <ul><li>Cryptographic Hash Function </li></ul><ul><li>Key Exchange </li></ul><ul><li>Digital Signature </li></ul><ul><li>Public Key Protocol </li></ul><ul><li>Certificate </li></ul>
  27. 27. Cryptographic Hash Function <ul><li>Cryptography can be used to seal a file, encasing it so that any change becomes apparent. One technique for providing the seal is to compute a cryptographic function, sometimes called a hash or checksum or message digest of the file. </li></ul>
  28. 28. Digital Signature A digital signature is a protocol that produces the same effect as a real signature: It is a mark that only the sender can make, but other people can easily recognize as belonging to the sender. Just like a real signature, a digital signature is used to confirm agreement to a message.
  29. 29. Properties of Digital Signature <ul><li>A digital signature must meet two primary conditions: </li></ul><ul><li>It must be unforgeable. If person P signs message M with signature S(P,M), it is impossible for anyone else to produce the pair [M, S(P,M)]. </li></ul><ul><li>It must be authentic. If a person R receives the pair [M, S(P,M)] purportedly from P, R can check that the signature is really from P. Only P could have created this signature, and the signature is firmly attached to M. </li></ul><ul><li>It is not alterable. After being transmitted, M cannot be changed by S, R, or an interceptor. </li></ul><ul><li>It is not reusable. A previous message presented again will be instantly detected by R. </li></ul>
  30. 30. Thank You