Presentation is loading. Please wait.

Presentation is loading. Please wait.

TMAT 103 Supplemental Chapter Cryptography. Sending messages that cannot be read if stolen –Been in use for centuries (wars) –Used to transmit data securely.

Similar presentations


Presentation on theme: "TMAT 103 Supplemental Chapter Cryptography. Sending messages that cannot be read if stolen –Been in use for centuries (wars) –Used to transmit data securely."— Presentation transcript:

1 TMAT 103 Supplemental Chapter Cryptography

2 Sending messages that cannot be read if stolen –Been in use for centuries (wars) –Used to transmit data securely over a network –Hundreds of techniques Utilizes mathematical functions and operations Requires a key Encode – uses corresponding function and key Decode – uses inverse of the function and key

3 TMAT 103 Method 1 Sir Francis Bacon’s Code

4 Algorithm to encrypt a message using Bacon’s code 1.For each letter, find the corresponding binary code 1.Determine the corresponding decimal number (a = 0, b = 1, c = 2, …, z = 25) 2.Convert the decimal number to binary 2.Concatenate the binary codes for all letters 3.Create the encoded message 1.The message must have the same number of characters as 0s and 1s in the concatenated binary codes 2.Key: Choose how to distinguish 1s from 0s Example: Use uppercase for 1s and lowercase for 0s

5 Sir Francis Bacon’s Code Encode ‘DISCRETE’ using Bacon’s code 00011 01000 10010 00010 10001 00100 10011 00100 OREGO NISAS TATEI NTHEU NITED STATE SOFAM ERICA Message sent: oreGOn Is a sTatE in thE uNiteD stAteS of AMerIca Example: Encode ‘TECHNOLOGY’

6 Sir Francis Bacon’s Code Reverse the process to decode Example – decode the following WilLiAm iS A FaMous auTHOR from tHE SixteeNth cEntuRY Key: Lowercase stands for 0, uppercase stands for 1

7 TMAT 103 Method 2 Substitution Code

8 Algorithm to encrypt a message using the Substitution code 1.Choose a key (a word with no repeated letters) Example: DESTINY 2.Correlate alphabet characters according to the key 3.Create the encoded message by substituting the corresponding letters

9 Substitution Code Example: Encode ‘DISCRETE’ using a substitution code with the key ‘DESTINY’ Message sent: TBPSOIQI Example: Encode ‘TECHNOLOGY’ using this scheme

10 Substitution Code Reverse the process to decode Example: The following message was sent using a substitution code Decode the message: D M W I M L C U L R F I R D E W E E H E L K Key: BASKET

11 TMAT 103 Method 3 Transposition Code

12 Permutation Function Can also be written as a cycle

13 Transposition Code Algorithm to encrypt a message using the Transposition code 1.Choose a key (a permutation function) 2.Change the order of the characters in the message according to the key

14 Transposition Code Example: Encode ‘DISCRETE’ using a Transposition code with the key (1, 3, 7, 8, 2, 6) Message sent: EEDCRIST Example: Encode ‘TECHNOLOGY’

15 Transposition Code Reverse the process to decode Example – decode the following OICLPCYIGULSOYRRVTTEA Key: ( 16, 15, 6, 1, 3, 7, 11, 2)  (8, 13, 4, 5, 19)  (14, 10)  (21, 20, 17)

16 TMAT 103 Method 4 Keyword Columnar Transposition

17 Algorithm to encrypt a message using the keyword columnar transposition 1.Create a matrix (rows and columns) using the letters in the key as the column labels 2.Fit the message into the matrix (left to right, top to bottom) – pad with Xs if necessary 3.Form the new message by taking the columns in alphabetical order by the column labels

18 Keyword Columnar Transposition Example: Use a k eyword columnar transposition with the key ‘ JONES’ to encrypt: THE FIFTH GOBLET CONTAINS THE GOLD Result: FGTAHDTFBONGEHETTLHTLNSOIOCIEX

19 Keyword Columnar Transposition Example: Use a k eyword columnar transposition with the key ‘ JONES’ to encrypt: ALL DIFFICULT MATHEMATICAL PROBLEMS ARE CHARACTER BUILDING

20 Keyword Columnar Transposition Decoding a keyword columnar transposition – reverse the process –Algorithm to decrypt a message using the keyword columnar transposition 1.Create a matrix (rows and columns) using the letters in the key as the column labels 2.Count the characters in the message, and divide that number by the number of characters in the key 3.Starting from the beginning of the encrypted message, group the letters according to the calculation in step 2 4.Fit the message into the matrix 5.Read the message from the matrix (left to right, top to bottom)

21 Keyword Columnar Transposition Reverse the process to decode Example – decode the following AAK7ENWHRSOER9SAETOELNNWIDYELXBO1DXKTI3R Key: BASEBALL


Download ppt "TMAT 103 Supplemental Chapter Cryptography. Sending messages that cannot be read if stolen –Been in use for centuries (wars) –Used to transmit data securely."

Similar presentations


Ads by Google