Full Transcript

Information System Security Chapter 4: Cryptography Section 1 2022 Cryptography 1 / 21 Cryptography  Encryption or cryptography: means secret writing, is probably the strongest defence in computer security protection....

Information System Security Chapter 4: Cryptography Section 1 2022 Cryptography 1 / 21 Cryptography  Encryption or cryptography: means secret writing, is probably the strongest defence in computer security protection.  Cryptography conceals data against unauthorized access. Cryptography 2 Problems Addressed by Encryption Consider the steps involved in sending messages from a sender, S, to a recipient, R via medium T, who then delivers it to R. If an outsider, O, wants to access the message (to read, change, or even destroy it), we call O an interceptor or intruder. O might try to access it in any of the following ways: block it, by preventing its reaching R, thereby affecting the availability of the message intercept it, by reading or listening to the message, thereby affecting the confidentiality of the message modify it, by seizing the message and changing it in some way, affecting the message’s integrity fabricate an authentic-looking message, arranging for it to be delivered as if it came from S, thereby also affecting the integrity of the message. Cryptography 3 Terminologies  Encryption is the process of encoding a message so that its meaning is not obvious;  Decryption is the reverse process, transforming an encrypted message back into its original form.  Alternatively, the terms encode and decode or encipher and decipher are used instead of encrypt and decrypt. That is, we say we encode, encrypt, or encipher the original message to hide its meaning. Then, we decode, decrypt, or decipher it to reveal the original message  A system for encryption and decryption is called a cryptosystem.  The original form of a message is known as plaintext, and the encrypted form is called ciphertext.  A cryptanalyst studies encryption and encrypted messages, hoping to find the hidden meanings. 2018 Cryptography 4 Formal Notation For example, we write: C = E(P) and P= D(C), where C represents the ciphertext, E is the encryption rule, P is the plaintext, and D is the decryption rule. P =D(E(P)) Cryptography Cryptography 5 Encryption Keys A cryptosystem involves a set of rules for how to encrypt the plain-text and decrypt the cipher-text. The encryption and decryption rules, called algorithms, often use a device called a key, denoted by K. So that the resulting cipher-text depends on: 1. The original plaintext message. 2. The algorithm. 3. The key value. We write this dependence as C= E(K, P). Cryptography 6 Symmetric vs Asymmetric Symmetric encryption (secret key encryption): one key encrypts and decrypts. C = E(K, P) P = D(K,E(K,P)) Asymmetric encryption (public key encryption): one key encrypts, a different key decrypts. C= E(KE, P ) P = D(KD , C) P = D(KD, E(KE,P)) Cryptography 7 Secret Key A key gives us flexibility in using an encryption scheme. We can create different encryptions of one plaintext message just by changing the key. Moreover, using a key provides additional security. If the encryption algorithm should fall into the interceptor’s hands, future messages can till be kept secret because the interceptor will not know the key value. Cryptography 8 Key Management in Symmetric Encryption In symmetric encryption, authenticity is ensured because only the legitimate sender can produce a message that will decrypt properly with the shared key. Symmetric encryption systems require a means of key distribution. How to safely share a secret key between pairs of users, and how the secret or private key is kept secret. Cryptography 9 Key Management in Asymmetric Encryption (Public Key) Asymmetric or public key systems, on the other hand, typically have precisely matched pairs of keys. The keys are produced together or one is derived mathematically from the other. In asymmetric systems, you can send a public key in an email message or post it in a public directory. Only the corresponding private key, which presumably is not disclosed, can decrypt what has been encrypted with the public key. Cryptography 10 Stream and Block Ciphers  A stream cipher encrypts each bit / byte, of the data stream separately. A block cipher encrypts a group of plaintext symbols as a single block. Cryptography 11 Stream Cipher Cryptographic Primitives  Substitution: one set of bits is exchanged for another.  Transposition: involves rearranging the order of the cipher-text. Cryptography 12 Substitution Encryption  Mono-alphabetic substitutions Assume: 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 Example 1: Caesar Ciphers - encryption by the rule ci = pi +3 Plain-text : POSIBLE WAY Cipher-text: srvvleoh zdb Cryptography 13 1 FLANK EAST The clear text message would be encoded ATTACK AT DAWN using a key of 3. Clear text Shift the top scroll 2 over by three 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 characters (key of 3), an A becomes D, B becomes E, and so 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 A B C on. 3 IODQN HDVW The clear text message would be DWWDFN DW GDZQ encrypted as follows using a key of 3. Cipherered text Cryptography 14 Example 2: Vernam Cipher ci=(pi + random number) mod 26: Plain-text : V E R N A M C I P H E R 21 4 17 13 0 12 2 8 15 7 4 17 Random #(ri): 76 48 16 82 44 3 58 11 60 5 48 88 Sum = pi +ri : 97 52 33 95 44 15 60 19 75 12 52 105 Sum mod 26: 19 0 7 17 18 15 8 19 23 12 0 1 % 26 Cipher-text : t a h r s p i t x m a b Cryptography 15 Example 3: Vigenѐre Cipher Encrypt the message with keyword: JULIET JU L IET J U L I E TJULI ETJ U LI E TJU LIE TJU L I E TJ U LI BUT SOFT WHAT LIGHT THROUGH YONDER WINDOW BREAK KOE OEAS YCQS I …… …… Cryptography 16 Vigenѐre Table 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 A 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 B 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 a C c 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 D 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 E 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 d F f g h i j k l m n o p q r s t u v w x y z a b c d e G g h i j k l m n o p q r s t u v w x y z a b c d e f H h i j k l m n o p q r s t u v w x y z a b c d e f g I i j k l m n o p q r s t u v w x y z a b c d e f g h J j k l m n o p q r s t u v w x y z a b c d e f g h i K k l m n o p q r s t u v w x y z a b c d e f g h i j L l m n o p q r s t u v w x y z a b c d e f g h i j k M m n o p q r s t u v w x y z a b c d e f g h i j k l N n o p q r s t u v w x y z a b c d e f g h i j k l m O o p q r s t u v w x y z a b c d e f g h i j k l m n P p q r s t u v w x y z a b c d e f g h i j k l m n o Q q r s t u v w x y z a b c d e f g h i j k l m n o p R r s t u v w x y z a b c d e f g h i j k l m n o p q S s t u v w x y z a b c d e f g h i j k l m n o p q r T t u v w x y z a b c d e f g h i j k l m n o p q r s U u v w x y z a b c d e f g h i j k l m n o p q r s t V v w x y z a b c d e f g h i j k l m n o p q r s t u W w x y z a b c d e f g h i j k l m n o p q r s t u v X x y z a b c d e f g h i j k l m n o p q r s t u v w Y y z a b c d e f g h i j k l m n o p q r s t u v w x Z z 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 Cryptography 17  Transposition (Permutation) Example 1 1 FLANK EAST ATTACK AT DAWN Clear Text 2 F...K...T...T...A...W..L.N.E.S.A.T.A.K.T.A.N Use a rail fence cipher and a key..A...A...T...C...D... of 3. 3 FKTTAW The clear text message would LNESATAKTAN AATCD appear as follows. Ciphered Text Cryptography 18 Example 2: Separate plain-text into 5 blocks and arrange them after each other: c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 ets. Cryptography 19 Plain-text: “welcome to class information security” w e l c o m e t o c l a s s I n f o r m a t I o n s e c u r i t y --------------------------------------------- Cipher-text: wmlna sieea ftetl tsolc ycosr ouocl mnr Cryptography 20 Example 3: Cryptography 21 Example Encrypt the message “HELLO MY DEAR,” using the key. Solution We first remove the spaces in the message. We then divide the text into blocks of four characters. We add a bogus character Z at the end of the third block. The result is HELL OMYD EARZ. We create a three-block ciphertext ELHLMDOYAZER. Cryptography 22 Example Using previous example , decrypt the message “ELHLMDOYAZER”. Solution The result is HELL OMYD EARZ. After removing the bogus character and combining the characters, we get the original message “HELLO MY DEAR.” Cryptography 23 Example Transposition cipher Cryptography 24 Confusion and Diffusion ‫خلط و انتشار‬ Confusion: The interceptor should not be able to predict what changing one character in the plain text will do in the cipher text. Diffusion: Changes in plain text should affect many parts of the cipher text. Cryptography 25

Use Quizgecko on...
Browser
Browser