This slide helps you to find the idea of Symmetric and asymmetric key cryptography.
Size: 442.21 KB
Language: en
Added: Oct 12, 2020
Slides: 24 pages
Slide Content
NORTH WESTERN UNIVERSITY Computer Science & Engineering Course Titel : Computer Networks Course Code : CSE-3205 Presentation on : Symmetric and Asymmetric key cryptography. Submitted by: Name : MD. MONIRUL ISLAM ID: 20151116010 Submitted to: Name : Romana Rahman Senior Lecturer Computer Science & Engineering North Western University , Khulna
INDEX : * General Introduction of C ryptography. * Objectives * Types of Cryptography. * Symmetric Cryptosystems . * Limitations of Symmetric Cryptography * Asymmetric Cryptosystems. * Limitations of Asymmetric Cryptography. * References.
General Introduction of Cryptography Cryptography is a method of protecting information and communications through the use of codes, so that only those for whom the information is intended can read and process it. It has two main Components: Encryption Practice of hiding messages so that they can not be read by anyone other than the intended recipient Authentication Ensuring that users of data/resources are the persons they claim to be and that a message has not been surreptitiously altered
How does it work? Two functions are needed: Fig 01: Encoder & Decoder
Example encoder function is next letter in the alphabet. decoder function is … Fig 02: Encoder & Decoder
Encryption and Decryption - Plain text - Cipher text Encoding :- The contents of the message ( the plain text ) in such a way that hides its contents from outsiders is called encryption . The process of retrieving the plaintext from the cipher-text is called decryption . Encryption and decryption usually make use of a key , and the coding method is such that decryption. Can be performed only by knowing the proper key.
Objectives Cryptography has four main objectives: Confidentiality of the message : Only the authorized recipient should be able to extract the content of the cypher. In addition, obtaining information about the content of the message (such as a statistical distribution of certain characters) should not be possible, once the cryptographic analysis becomes easier . Message integrity : The recipient must be able to determine if the message was altered during transmission . Authentication of the sender : The recipient should be able to identify the sender and verify if it was him who sent the message . Irrevocability of the sender : It should not be possible to deny the authorship of the message.
Types of Cryptography Two kinds of Cryptography: Symmetric Alice and Bob agree on a cryptosystem Alice and Bob agree on a key. Alice takes her plaintext message and encrypts it using the encryption algorithm and the key. This creates a cipher text message. Alice sends the cipher text message to Bob. Bob decrypts the cipher text message with the same algorithm and key and reads it. Asymmetric Alice and Bob agree on a public-key cryptosystem. Bob sends Alice his public key. Alice encrypts her message using Bob’s public key and sends it to Bob. Bob decrypts Alice’s message using his private key.
Symmetric Cryptosystem Both the sender and receiver share a single key. The sender uses this key to encrypt plaintext and send the cipher text to the receiver. On the other side the receiver applies the same key to decrypt the message and recover the plain text. Material to keep secret: Text Data Audio Video Graphics Material to keep secret: Text Data Audio Video Graphics Lock Encryption Algorithm Decryption Algorithm Shared Key Sender and recipient Must both know the key. This is a weakness! Fig 03: Symmetric Cryptosystem
Traditional ciphers Traditional cipher are two types Simple substitution Cipher. Transposition Cipher. Fig 04: Traditional Ciphers
Simple Substitution Ciphers It is an improvement to the Caesar Cipher. Instead of shifting the alphabets by some number, this scheme uses some permutation of the letters in alphabet . For example, A.B…..Y.Z and Z.Y……B.A are two obvious permutation of all the letters in alphabet. Permutation is nothing but a jumbled up set of alphabets . With 26 letters in alphabet, the possible permutations are 26! (Factorial of 26) which is equal to 4x10 26 . The sender and the receiver may choose any one of these possible permutation as a cipher text alphabet. This permutation is the secret key of the scheme.
Process of Simple Substitution Cipher 1.Write the alphabets A, B, C,...,Z in the natural order . 2. The sender and the receiver decide on a randomly selected permutation of the letters of the alphabet . 3. Underneath the natural order alphabets, write out the chosen permutation of the letters of the alphabet. For encryption, sender replaces each plaintext letters by substituting the permutation letter that is directly beneath it in the table. This process is shown in the following illustration. In this example, the chosen permutation is K,D, G, ..., O. The plaintext ‘point’ is encrypted to ‘MJBXZ’. Here is a jumbled Cipher text alphabet, where the order of the cipher text letters is a key. On receiving the cipher text , the receiver, who also knows the randomly chosen permutation, replaces each cipher text letter on the bottom row with the corresponding plaintext letter in the top row. The cipher text ‘MJBXZ’ is decrypted to ‘point’.
Mono alphabetic Cipher Mono alphabetic cipher is a substitution cipher in which for a given key, the cipher alphabet for each plain alphabet is fixed throughout the encryption process. A simple example is where each letter is encrypted as the next letter in the alphabet: "a simple message" becomes "B TJNQMF NFTTBHF". In general, when performing a simple substitution manually, it is easiest to generate the cipher text alphabet first, and encrypt by comparing this to the plaintext alphabet. The table below shows how one might choose to, and we will, lay them out for this example.
Polyalphabetic Cipher In a polyalphabetic cipher, each occurrence of a character can have a different substitute. The relationship between a character in the plaintext to a character in the cipher text is a one-to-many relationship . As an example we shall encrypt the plaintext "Leon Battista albert". To keep with the convention of writing cipher text in uppercase , we shall invert Alberta's own rule, and use lowercase letters to signify the change. We start by referencing the starting position of the cipher disc, which in this case is "a" is encrypted as "V", so we start the Cipher text with a lowercase "v". We then encrypt the first few letters as a Caesar Shift , using the cipher text alphabet given below. The 1 st shift used, as the disk in shown Plaintext: leonbat ... Cipher text: vGZJIWVOg...
The uppercase letters above encrypt the plaintext letters given. The "v" indicates the starting position of the disc, and the "g" indicates that we need to change the position so that "G" is beneath "a". We then get the new cipher text Alphabet as shown below . Plaintext : ...tistaa ... Cipher text: ...gZOYZGGm ... This time the plaintext letters are encrypted to the cipher text letters using the cipher text alphabet above, and the " m“ indicates that we are changing alphabet again to get the final cipher text alphabet below . Plaintext : ... lberti Cipher text: ... mXNQDFU So we get the final cipher text "vGZJIWVOgZOYZGGmXNQDFU".
Transposition Cipher Transposition Ciphers are a bit different to Substitution Ciphers. Whereas Substitution ciphers replace each letter with a different letter or symbol to produce the cipher text, in a Transposition cipher, the letters are just moved around. The letters or words of the plaintext are reordered in some way, fixed by a given rule (the key ). One example of a transposition cipher, is to reverse the order of the letters in a plaintext. So "a simple example " becomes "ELPMAXE ELPMIS A". Another, similar, way to encrypt a message would be to reverse the letters of each word, but not the order in which the words are written. In this case "a simple example“ becomes "A ELPMIS ELPMAXE". Both of these are available in the activity at the bottom of the page.
Limitations of Symmetric Cryptography Many people need to communicate with a server ( many-to-one communications). cannot keep server key secret for long. Once the secret key is compromised, the security of all subsequent. messages is suspect and a new key has to be generated. Authentication service must know private key. privacy implications---someone else knows your key. two possible points of attack. changing authentication service requires a new key. Digital signatures are difficult. Crossrealm authentication. accessing services outside the domain or realm of your authentication server is problematic. requires agreement and trust between authentication services. introduces another potential point of attack.
Asymmetric Cryptosystems In asymmetric-key cryptography, users do not need to know a symmetric shared key; everyone • shields a private key and • advertises a public ke y Material to keep secret: Text Data Audio Video Graphics Material to keep secret: Text Data Audio Video Graphics Lock Encryption Algorithm Decryption Algorithm Decryption key Encryption Key Sender knows public key Recipient knows private key. Fig 05: Asymmetric Cryptosystem
RSA Cryptography RSA algorithm is a public key encryption technique and is considered as the most secure way of encryption . It was invented by Rivest, Shamir and Adleman in year 1978 and hence name RSA algorithm . Process of RSA Choose two large prime numbers p & q Compute n = p q and z=(p-1)(q-1) Choose number e, less than n, which has no common factor (other than 1) with z Find number d, such that e d – 1 is exactly divisible by z Keys are generated using n, d, e -Public key is ( n, e) -Private key is (n, d) Encryption: c = m e mod n -m is plain text -c is cipher text Decryption: m = c d mod n Public key is shared and the private key is hidden
P=5 & q=7 n=5*7=35 and z=(4)*(6) = 24 e = 5 d = 29 , (29x5 –1) is exactly divisible by 24 Keys generated are -Public key: (35,5) -Private key is (35, 29) Encrypt the word love using (c = me mod n) -Assume that the alphabets are between 1 & 26
Decrypt the word love using (m = c d mod n) -n = 35, c=29
Limitations of Asymmetric Cryptography It is a slow process . Its public keys are not authenticated. It risks loss of private key, which may be irreparable . It risks widespread security compromise.
References [1] Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms . MIT Press and McGraw-Hill, 2001. ISBN 0-262-03293-7. Section 31.7: The RSA public-key cryptosystem, pp.881–887 [ 2] Bruce Schneier. Applied Cryptography . John Wiley & Sons, Inc. 1996. (ISBN: 0471128457 ) [3] Bob Thibadeau http ://dollar.ecom.cmu.edu/sec/lec02.ppt . [4] [2]Data Communications and Networking By Behrouz A.Forouzan .