1 / 161

Week 2 Cryptography

Week 2 Cryptography. Cryptography Concepts. Every night in my dream I see you I feel you that Is how I know you Go on far away a Cross the distance. in night Every dream I you see my I you that feel know you Is how I Go away a on far distance Cross the. Cryptography. Latin.

louie
Download Presentation

Week 2 Cryptography

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. Week 2 Cryptography

  2. Cryptography Concepts

  3. Every night in my dream I see you I feel you that Is how I know you Go on far away a Cross the distance in night Every dream I you see my I you that feel know you Is how I Go away a on far distance Cross the Cryptography Latin Crypt secret Cryptography Graphia writing • Concerned with developing algorithms: • Conceal the context of some message from all • except the sender and recipient (privacy or secrecy), • and/or

  4. Cryptography • Concerned with developing algorithms: • Verify the correctness of a message to the recipient • (authentication) • Form the basis of many technological solution to computer • and communications security problems cryptography - study of encryption principles/methods

  5. Sender Receiver Goals & Setting • To ensure security of communication across • an insecure channel. • The ideal channel: Dedicated, untappable, impenetrable Pipe/tube

  6. Secure Channel ISP/Office

  7. Secure Channel

  8. Secure Channel

  9. Secure Channel

  10. Secure Channel

  11. Secure Channel

  12. Secure Channel Authenticated

  13. Secure Channel

  14. Secure Channel Connected

  15. Secure Channel Connection Established ISP/Office

  16. Sender Receiver Goal & Setting Adversary (Attacker) The source of all possible threats Not all aspect of an ideal channel can be emulated

  17. Basic Terminology • plaintext - the original message • ciphertext - the coded message • cipher - algorithm for transforming plaintext to ciphertext • key - info used in cipher known only to sender/receiver • encipher (encrypt) - converting plaintext to ciphertext • decipher (decrypt) - recovering ciphertext to plaintext

  18. Simple Process Receiver Sender Plaintext Plaintext The secret message is: You can get A-/A+ in SKR5200; (however depend on you) The secret message is: You can get A-/A+ in SKR5200; (however depend on you) Encryption Decryption ciphertext hjfjghkf@#@#$%^&jklll 098GHJFD!@#$#$#$%

  19. Categories of cryptography

  20. Comparison between two categories of cryptography

  21. Encryption Method Cryptography Symmetric Encryption Asymmetric Encryption • uses two keys – a public & a private key • asymmetric since parties are not equal • uses clever application of number • theoretic concepts to function • complements rather than replaces • private key crypto • conventional / private-key / single-key • sender and recipient share a common key • all classical encryption algorithms are • private-key

  22. Symmetric Encryption

  23. Symmetric Encryption Technique Symmetric Encryption Classical Modern Stream cipher Block cipher

  24. Symmetric Encryption • conventional / private-key / single-key • sender and recipient share a common key • 2 Techniques: Classical & Modern • Classical Techniques: • Substitution: • Caesar Cipher • Monalphabatic Cipher • Playfair Cipher • Hill Cipher • Polyalphabetic Cipher • One-Time Pad • Transposition • Rotor Machines • Steganography • Modern Techniques: • DES, 3DES, AES

  25. Basic of Symmetric Cryptography Classical Substitution Cipher Classical Transpositions Cipher Summary

  26. Symmetric Encryption • or conventional / private-key / single-key • sender and recipient share a common key • all classical encryption algorithms are private-key • was only type prior to invention of public-key in 1970’s

  27. Basic Terminology • plaintext - the original message • ciphertext - the coded message • cipher - algorithm for transforming plaintext to ciphertext • key - info used in cipher known only to sender/receiver • encipher (encrypt) - converting plaintext to ciphertext • decipher (decrypt) - recovering ciphertext from plaintext • cryptography - study of encryption principles/methods • cryptanalysis (codebreaking) - the study of principles/ methods of deciphering ciphertext without knowing key • cryptology - the field of both cryptography and cryptanalysis

  28. Symmetric Cipher Model

  29. Requirements • two requirements for secure use of symmetric encryption: • a strong encryption algorithm • a secret key known only to sender / receiver, have: • plaintext X • ciphertext Y • key K • encryption algorithm Ek • decryption algorithm Dk Ciphertext Y = EK(X) Plaintext X = DK(Y) • assume encryption algorithm is known • implies a secure channel to distribute key

  30. Cryptography • can characterize by: • type of encryption operations used • substitution / transposition / product • number of keys used • single-key or private / two-key or public • way in which plaintext is processed • block / stream

  31. Types of Cryptanalytic Attacks • ciphertext only • only know algorithm / ciphertext, statistical, can identify plaintext • known plaintext • know/suspect plaintext & ciphertext to attack cipher • chosen plaintext • select plaintext and obtain ciphertext to attack cipher • chosen ciphertext • select ciphertext and obtain plaintext to attack cipher • chosen text • select either plaintext or ciphertext to en/decrypt to attack cipher

  32. Simple Question • What are the essential ingredients of a symmetric cipher? • How many keys are required for two people to communicate via a cipher?

  33. Simple Question • What are the essential ingredients of a symmetric cipher? Plaintext, encryption algorithm, secret key, ciphertext, decryption algorithm. • How many keys are required for two people to communicate via a cipher? One secret key.

  34. Basic of Symmetric Cryptography Classical Substitution Cipher Classical Transpositions Cipher Summary

  35. Classical Substitution Ciphers • where letters of plaintext are replaced by other letters or by numbers or symbols • or if plaintext is viewed as a sequence of bits, then substitution involves replacing plaintext bit patterns with ciphertext bit patterns

  36. Caesar Cipher • earliest known substitution cipher • by Julius Caesar • first attested use in military affairs • replaces each letter by 3rd letter on • example: meet me after the toga party PHHW PH DIWHU WKH WRJD SDUWB

  37. Caesar Cipher • can define transformation as: Plain: a b c d e f g h i j k l m n o p q r s t u v w x y z Cipher:D E F G H I J K L M N O P Q R S T U V W X Y Z A B C • mathematically give each letter a number a b c d e f g h i j k l m 0 1 2 3 4 5 6 7 8 9 10 11 12 n o p q r s t u v w x y Z 13 14 15 16 17 18 19 20 21 22 23 24 25 • then have Caesar cipher as: C = E(p) = (p + k) mod (26) p = D(C) = (C – k) mod (26)

  38. Example 1 • Caesar used a shift of 3 • Using this encryption, the message: • treaty impossible • Would be encoded as : • t r e a t y i m p o s s i b l e • WUHDWB LP S RVVLEOH

  39. Example 2 • Caesar used a shift of 5 • Using this encryption, the message: • treaty impossible • Would be encoded as : • t r e a t y i m p o s s i b l e

  40. To test your understanding Ceasar wants to arrange a secret meeting with Marc Anthony, either at the Tiber (the river) or at the Colisuem (the arena). He sends the ciphertext EVIRE. However, Anthony doest not know the key, so he tries all possibilities. Where will he meet Caesar?

  41. To test your understanding Ceasar wants to arrange a secret meeting with Marc Anthony, either at the Tiber (the river) or at the Colisuem (the arena). He sends the ciphertext EVIRE. However, Anthony doest not know the key, so he tries all possibilities. Where will he meet Caesar? Among the shifts of EVIRE, there are two words: arena and river. Therefore, Anthony cannot determine where to meet Caesar.

  42. Cryptanalysis of Caesar Cipher • only have 26 possible ciphers • A maps to A,B,..Z • could simply try each in turn • a brute force search • given ciphertext, just try all shifts of letters • do need to recognize when have plaintext • eg. break ciphertext "GCUA VQ DTGCM"

  43. Summary of Substitutions Substitutions are effective cryptographic devices. In fact, they were the basis of many cryptographic algorithms used for diplomatic communication through the first half of the century. But substitution is not only kind of encryption technique. The goal of substitution is confusion; the encryption method is an attempt to make it difficult for cryptanalyst or intruder to determine how a message and key were transformed into ciphertext.

  44. Basic of Symmetric Cryptography Classical Substitution Cipher Classical Transpositions Cipher Summary

  45. Transpositions (permutations) A transposition is an encryption in which the letters of the message are re arranged. With transposition is an encryption in which the letters of the message are rearranged. With transposition, the cryptography aims for diffusion, widely spreading the information from the message or key across the ciphertext. Transpositions try to break established patterns. Because a transposition is re arranged of the symbols of a message, it also known as a permutation.

  46. Transposition Ciphers • now consider classical transposition or permutation ciphers • these hide the message by rearranging the letter order • without altering the actual letters used • can recognise these since have the same frequency distribution as the original text

  47. m e m a t r h t g p r y e t e f e t e o a a t Rail Fence cipher • write message letters out diagonally over a number of rows • then read off cipher row by row • eg. write message out as: “meet me after the toga party” • giving ciphertext MEMATRHTGPRYETEFETEOAAT

  48. Row Transposition Ciphers • a more complex scheme is to write the message in a rectangle, row by row, and read the message off, column by column, but permute the order of the columns. The order of the columns then becomes the key of the algorithm. • write letters of message out in rows over a specified number of columns • then reorder the columns according to some key before reading off the rows Key: 4 3 1 2 5 6 7 Plaintext: a t t a c k p o s t p o n e d u n t i l t w o a m x y z Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ

  49. Product Ciphers • ciphers using substitutions or transpositions are not secure because of language characteristics • hence consider using several ciphers in succession to make harder, but: • two substitutions make a more complex substitution • two transpositions make more complex transposition • but a substitution followed by a transposition makes a new much harder cipher • this is bridge from classical to modern ciphers

  50. Basic of Symmetric Cryptography Classical Substitution Cipher Classical Transpositions Cipher Summary

More Related