Chap2 Cryptography
-
Upload
haslina-mahmood -
Category
Documents
-
view
74 -
download
2
Transcript of Chap2 Cryptography
![Page 1: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/1.jpg)
Chapter 2
Cryptography
![Page 2: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/2.jpg)
Authentication
What is authentication? Verification of identity of someone who
generated some data Relates to identity verification classifications of identity verification:
by something known e.g. password by something possessed e.g. smart card,
passport by physical characteristics (biometrics) e.g.
finger prints, palm prints, retina, voice by a result of involuntary action : signature
![Page 3: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/3.jpg)
Authentication Requirements – must be able to verify
that: Message came from apparent source or
author Contents have not been altered Sometimes, it was sent at a certain time
or sequence Protection against active attack
(falsification of data and transactions)
![Page 4: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/4.jpg)
Password Protection of passwords
Don’t inform your password to anybody Don’t write or login your password at everywhere Etc.
Choosing a good password Criteria:
Hard to guess and easy to remember Characteristics of a good password
Not shorter than six characters Not patterns from the keyboard Etc.
Calculations on password Password population, N =rs
Probability of guessing a password = 1/N Probability of success, P=nt/N
![Page 5: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/5.jpg)
Techniques for guessing passwords
• Try default passwords.• Try all short words, 1 to 3 characters
long.• Try all the words in an electronic
dictionary(60,000).• Collect information about the user’s
hobbies, family names, birthday, etc.• Try user’s phone number, social security
number, street address, etc.• Try all license plate numbers (MUP103).• Use a Trojan horse• Tap the line between a remote user and
the host system.
![Page 6: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/6.jpg)
Password Selecting Strategies
User education Computer-generated
passwords Reactive password checking Proactive password checking
![Page 7: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/7.jpg)
Example 1
Based on the passwords given below, determine which passwords are good or bad, include one reason for each password : iswara01 9kelisa01 pskjwM opps queen anita
![Page 8: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/8.jpg)
Example 2
Assume you choose character from a-z and 0-9 and the number of characters required are 5. Determine how much time will be needed to get the right password if your capability of your computer is 400 MIPS. Give your opinion/conclusion from this problem.
![Page 9: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/9.jpg)
Solutionr = 26 (a-z) + 10 (0-9) = 36 , P = 1 , s = 5N = rs = 365 = 6.05 x 107 P = nt/Nn = 400 x 107 /secTherefore: t = PN/n = 1 x ( 6.05 x 107 ) / (400 x 106) /sec = o.0151 = 1.51 x 10-2
Conclusion: the password can be broke only least than one second, means this password is not secured and not a good password.
![Page 10: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/10.jpg)
Cryptography Classified along three independent
dimensions: The type of operations used for
transforming plaintext to ciphertext The number of keys used
symmetric (single key, or private-key encryption)
asymmetric (two-keys, or public-key encryption)
The way in which the plaintext is processed
![Page 11: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/11.jpg)
Cryptography Algorithms Symmetric algorithms P=D(K,E(K,P))
Asymmetric algorithms P=D(Kd, E(Ke, P))
![Page 12: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/12.jpg)
Symmetric Cryptography Principles
An encryption scheme has five ingredients: Plaintext Encryption algorithm Secret Key Ciphertext Decryption algorithm
Security depends on the secrecy of the key, not the secrecy of the algorithm
![Page 13: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/13.jpg)
Symmetric Cryptography Principles
![Page 14: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/14.jpg)
Public-Key Cryptography Principles
The use of two keys has consequences in: key distribution, confidentiality and authentication.
The scheme has six ingredients Plaintext Encryption algorithm Public key Private key Ciphertext Decryption algorithm
![Page 15: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/15.jpg)
Encryption using Public-Key system
![Page 16: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/16.jpg)
Decryption using Public-Key System
![Page 17: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/17.jpg)
Applications for Public-Key Cryptosystems
Three categories: Encryption/decryption: The sender
encrypts a message with the recipient’s public key.
Digital signature: The sender ”signs” a message with its private key.
Key echange: Two sides cooperate two exhange a session key.
![Page 18: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/18.jpg)
Methods use in Cryptography Algorithm Substitution
monoalphabetic substitution Formed by shifting the letters of the original alphabet
polyalphabetic substitution Extension of monoalphabetic substitution system Using Vigenere Tableau
Transposition unkeyed transposition
Rearrange letters by using matrix keyed transposition
Rearrange letters by using matrix where the size of matrix is determined by the length of the key used.
![Page 19: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/19.jpg)
Example: Monoalphabetic Substitution Cipher
Based on the keys below, change this plaintext “ failure is the only opportunity to begin again more intelligently” to ciphertext. Use 5-letter words.
Plaintext Alphabet 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 zCiphertext Key f g h i j k I m n o p q r s t u v w x y z a b c d e
![Page 20: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/20.jpg)
SolutionPlaintext: “Failure is the only opportunity to begin again more intelligently”
![Page 21: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/21.jpg)
Example: Polyalphabetic Substitution Cipher
Based on Figure 2.2 in the notes, get the ciphertext for the plaintext “A minutes success pays the failure of years” in 4-letter words and “failure” as the repeating key. Use ‘x’ to pad out the blanks.
![Page 22: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/22.jpg)
Figure 2.2
![Page 23: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/23.jpg)
Solution
Plaintext: “A minutes success pays the failure of years”
![Page 24: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/24.jpg)
Example: Unkeyed Single Transposition
Encrypt the plaintext : “there is no security on this earth there is only opportunity” into a matrix of 5 (rows) by 10 (columns).
Get the ciphertext horizontally, using 5- letter words.
![Page 25: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/25.jpg)
SolutionPlaintext: “There is no security on this earth there is only opportunity”
Ciphertext:
THERE ISNOS ECURI TYONT HISEA RTHTH EREIS ONLYO PPORT UNITY
![Page 26: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/26.jpg)
Example: Keyed Single Transposition
With the key “security”, encrypt the plaintext “ignorance is the mother of admiration” using keyed single transposition into 4-letter words. Use “x” to pad out columns.
![Page 27: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/27.jpg)
SolutionPlaintext: “ignorance is the mother of admiration”
Ciphertext:
ietm ihig nser arto rhot ifea nmao ndoc
![Page 28: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/28.jpg)
Classification of ciphers (transformation) Stream ciphers
they convert one symbol of plaintext immediately into a symbol of ciphertext
depends on symbol, key and control information of encipherment algorithm
Block ciphers encrypt a group of plaintext symbols as one
block examples are transposition ciphers
e.g, in columnar transposition, the entire message is translated as one block, block size need not have any particular relationship to the size of the character
![Page 29: Chap2 Cryptography](https://reader035.fdocuments.net/reader035/viewer/2022081412/544b5996af7959a8438b5296/html5/thumbnails/29.jpg)
Puzzle of the Day Some programs use passwords for access
control, but do not protect the passwords in a very sophisticated manner or make determining the correct password very easy. The argument for using simple passwords and weak encipherment is that the data or programs being protected are of little value and the passwords give a small measure of privacy.
Given that what they are protecting is truly of little value, why is the use of such simple passwords and easily-broken encipherment bad?