1 / 49

Plain Text

Plain Text. Also called as clear text Language that we normally use Easily understood by everybody. Plain text in other forms. Digitalized form (ASCII or BIG-5 coded) 0100 0001 A 0110 0001 a 00110000 0 0100 0010 B 0110 0010 b 00110001 1 Telegram form (Morse Code)

Download Presentation

Plain Text

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. Plain Text • Also called as clear text • Language that we normally use • Easily understood by everybody

  2. Plain text in other forms • Digitalized form (ASCII or BIG-5 coded) • 0100 0001 A 0110 0001 a 00110000 0 • 0100 0010 B 0110 0010 b 00110001 1 • Telegram form (Morse Code) •  — A  — — — — 1 • —   B   — — — 2 • SOS    — — —   

  3. Example of Plain Text Message Hi Amit, Hope you are doing fine. How about meeting at the train station this Friday at 5 pm? Please let me know if it is ok with you. Regards. Atul Fig 2.1

  4. Transforming a plain text message into cipher text Substitution techniques Transposition techniques Techniques for Plain Text to Cipher Text Conversion Fig 2.5

  5. Caesar Cipher • Invented by Julius Caesar (Gallic Wars), 46 BC • Replaces each alphabet with the one three places down (shift by 3) • Example: Replace each A with D, B with E, etc.

  6. Caesar Cipher 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 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 Fig 2.2

  7. Plain Text and Cipher Text • Plain Text: Language that can be easily understood • Cipher Text: Language that cannot be understood (Encrypted message) • To achieve security, plain text is transformed into cipher text

  8. Algorithm to Encrypt Caesar Cipher(加密) 1. Read each alphabet in the plain text, and plus the alphabet order by k=3 2. Repeat the process for all alphabets in the plain text message. And print out. E.g., Plain text: Hope you are doing fine Cipher text: Krsh brx duh grlqj ilqh

  9. Hi Amit, Hope you are doing fine. How about meeting at the train station this Friday at 5 pm? Please let me know if it is ok with you. Regards. Atul Kl Dplw, Krsh brx duh grlqj ilqh. Krz derxw phhwlqj dw wkh wudlq vwdwlrq wklv Iulgdb dw 5 sp? Sohdvh ohw ph nqrz li lw lv rn zlwk brx. Uhjdugv. Dwxo Corresponding cipher text message Plain text message Plain Text and Cipher Text Fig 2.4

  10. Algorithm to Decrypt Caesar Cipher(解密) • . Read each alphabet in the cipher text message, and minus the alphabet order by k=3 2. Repeat the process for all alphabets in the cipher text message. Fig 2.6

  11. Modified Version of Caesar Cipher • In stead of A replaced by D, they can be replaced by other number of shifting. • Assume a shift number K is known by encrypter and decrypter, Both use K value as the Key to encrypt/decrypt the message. • However, if attacker find the cipher text, KWUM PMZN, what can he do to break the cipher.

  12. Mono-alphabetic Cipher • Characters Order among the substitution in the Caesar Cipher is broken. Each character can be replaced by any other alphabet. E.g., A can be replaced by (A through Z),… • Brute-force need (26 x 25x24…x2, i.e., 4x1026) times

  13. One example Homework : Algorithms to encrypt/encrypt the message 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 D VA G H I J K L M N O P Q R S T U E W X Y Z FB C

  14. How to break Mono-alphabetic Cipher • Brute-force: need (26 x 25x24…x2, i.e., 4x1026) times • Others:….

  15. Polygram Substitution Cipher • Block of plain text transformed into block of cipher text • Similar text patterns can yield completely different cipher text patterns • Block-by-block replacement (Word by word)

  16. Polygram Substitution HELLO YUQQW Polygram Substitution HELL TEUI Polygram Substitution Cipher Fig 2.10

  17. Poly_alphabetic substitution cipher • Vigenere Cipher is one of this type. • Vigenere Cipher assume a Table called Vigenere Table • Encryption: first define a key , read the plain text character one by one, mapping the read_in character and the corresponding key character by using the Vigenere Table,

  18. Encryption: Key: CRYTOGRAPHY Plaintext: STRIKEWHILETHEIRONISHOT

  19. The Vigenere Table

  20. Rail Fence Technique • An example of transposition cipher • Method: • Write plain text as sequence of diagonals • Read text as sequence of columns

  21. Rail Fence Technique • . Write down the plain text message as a sequence of diagonals. • . Read the plain text written in step 1 as a sequence of rows. Fig 2.11

  22. Simple Columnar Transposition • Concept: write text as row by row and then read the text column by column • The read out Result is cipher text

  23. Simple Columnar Transposition Technique • . Write the plain text message row-by-row in a rectangle of a pre-defined size. • . Read the message column-by-column. However, it need not be in the order of columns 1, 2, 3 etc. It can be any random order such as 2, 3, 1, etc. • . The message thus obtained is the cipher text message.

  24. Example

  25. Simple Columnar Transposition Technique with Multiple Rounds • . Write the plain text message row-by-row in a rectangle of a pre-defined size. • . Read the message column-by-column. However, it need not be in the order of columns 1, 2, 3 etc. It can be any random order such as 2, 3, 1, etc. • . The message thus obtained is the cipher text message of round 1. • . Repeat steps 1 to 3 as many times as desired.

  26. Fig 2.15

  27. Vernam Cipher • Widely used Cipher: (mainly used on substitution) • In usage: key length is longer than the message length. And the key is used one day and one time. So the key is called One Time Pad • Basically is a modification to the Vigenere Cipher • A piece of the Key is a number instead of character in Vigenere. And Modular operation is used on to number instead of table lookup in the vigenere table.

  28. Vernam Cipher • . Treat each plain text alphabet as a number in an increasing sequence, i.e. A = 0, B = 1, … Z = 25. • . Do the same for each character of the input cipher text. • . Add each number corresponding to the plain text alphabet to the corresponding input cipher text alphabet number. • . If the sum thus produced is greater than 26, subtract 26 from it. • . Translate each number of the sum back to the corresponding alphabet. This gives the output cipher text. Fig 2.17

  29. example

  30. Encryption and Decryption • Encryption • Conversion of Plain Text to Cipher Text • Decryption • Conversion of Cipher Text to Plain Text

  31. Hello John Ifmmp Kpio Plain text Encrypt Cipher text Hello John Ifmmp Kpio Cipher text Decrypt Plain text Encryption and Decryption Fig 2.19, 2.20

  32. Real world communication

  33. Encryption and Decryption • Two aspects related to this process: • Algorithm • Key

  34. Inputs to encryption and decryption processes Algorithm Key Aspects of Encryption and Decryption Fig 2.22

  35. Cryptography techniques Symmetric key cryptography Asymmetric key cryptography Types of Cryptography Fig 2.23

  36. Sender(Alice) receiver(Bob) encryption decryption Internet C M M C key key Symmetric key: sender’s key = receiver’s key Asymmetric key: sender’s key receiver’s key (two keys are related) Concept: One key system Two key system

  37. Problems with symmetric key system • Four main security functions? • Confidential, authentication, integrity, non-replication • Keys among group users • Key distribution • Key distribution center (KDC) • Diffie-Hellman key exchange

  38. Keys among group users

  39. Key distribution center (KDC) • One centerized KDC which in charge of key distribution among group of users. • Each user has one unique key between KDC and HE. • If user Alice want to talk to user Bob, Alice send a request to KDC encrypted with KeyAlice-KDC and KDC send back to both Alice and Bob the KeyAlice-Bob encrypted with KeyAlice-KDC and KeyBob-KDC. .

  40. Bob Alice 1. (request)Alice-KDC 3. (Alice ask you.//KeyAlice-Bob)Bob-KDC 2. (O.K.//KeyAlice-Bob)Alice-KDC KDC

  41. Diffie-Hellman Key Exchange • Solves the problem of Key Exchange • Alice and Bob can decide upon a key without meeting • No secrets are exchanged, and yet a secret key can be agreed upon

  42. Diffie-Hellman Key Exchange 1. Firstly, Alice and Bob agree on two large prime numbers, n and g. These two integers need not be kept secret. Alice and Bob can use an insecure channel to agree on them. 2. Alice chooses another large random number x, and calculates A such that: A = gx mod n 3. Alice sends the number A to Bob. 4. Bob independently chooses another large random integer y and calculates B such that: B = gy mod n 5. Bob sends the number B to Alice. 6. A now computes the secret key K1 as follows: K1 = Bx mod n 7. B now computes the secret key K2 as follows: K2 = Ay mod n Fig 2.27

  43. Example of DH key exchange • Alice and Bob agree on two numbers n=11 and g=7 • Alice chooses x=3, • calculates A=gx mod 11 • send A to Bob • Bob chooses y=6, • calculates B=gx mod 11 • send B to Alice • Alice get B from Bob • Calculate Bx mod 11

  44. Brute Force Attack • Attacker tries all possible keys one by one • Can be successful if key length is small • Start with Key = 0, then Key = 1, etc.

  45. Try with key = 0 Plain text Cipher text V^510->o2 R$9O0-=-P;. Decrypt Try with key = 1 Plain text Cipher text 7/5vc_=;a1 R$9O0-=-P;. Decrypt    Try with key = 90,171,451,191 Plain text Cipher text To: Payroll R$9O0-=-P;. Decrypt Brute Force Attack Fig 2.37

  46. Key Range • Specifies the number of possible keys • Bigger the key range, more difficult is the attack • In practice, at least 64, 128, 256 bit keys are used

  47. Key Range A 2-bit binary number has four possible states: 00 01 10 11 If we have one more bit to make it a 3-bit binary number, the number of possible states also doubles to eight, as follows: 000 001 010 011 100 101 110 111 In general, if an n bit binary number has k possible states, an n+1 bit binary number will have 2k possible states. Fig 2.38

  48. Key size = 40 bits 00 00 00 00 00 00 00 00 00 01 … FF FF FF FF FF Key size = 64 bits 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 … FF FF FF FF FF FF FF FF Key size = 128 bits 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 … FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF Key Sizes and Range Fig 2.40

More Related