logo

Cryptography and its Types

The assignment involves encrypting and decrypting messages using Caesar and Vigenère ciphers, calculating probabilities of ciphertexts in shift ciphers with given distributions.

32 Pages4897 Words30 Views
   

Added on  2022-08-27

Cryptography and its Types

The assignment involves encrypting and decrypting messages using Caesar and Vigenère ciphers, calculating probabilities of ciphertexts in shift ciphers with given distributions.

   Added on 2022-08-27

ShareRelated Documents
Running head: CRYPTOGRAPHY
CRYPTOGRAPHY
Name of the Student
Name of the University
Author Note
Cryptography and its Types_1
CRYPTOGRAPHY
1
1. Encrypt the message “coursework” with Caesar cipher using 7 as the key.
Solution:s
2. Decrypt the ciphertext “wjanxnts” with Caesar cipher using 5 as the key.
Solution:
3. Using Caesar cipher, what key shall we use to encrypt “Julius Caesar” to “qbspbz
jhlzhy”?
Solution: Using the cipher text and plaintext we can determine the shifts for the each alphabet.
As it is a Caesar cipher encryption, assuming all the shifts should be same for all letters.
Cryptography and its Types_2
CRYPTOGRAPHY
2
Plaintext: Julius Caesar
Cipher text: qbspbz jhlzhy
Determining shifts: J->q= 7 shifts, u->b= 7 shifts, l->s= 7 shifts, i->p= 7 shifts, u->b=7shifts,
s->z= 7 shifts, c->j=7shifts, a->h=7 shifts, e->l= 7 shifts, s->z= 7 shifts, a->h= 7 shifts, r->y 7
shifts.
Hence, the key used is 7. Ans.
4. Encrypt the message “coursework” with Vigenère cipher using “test” as the key.
Solution: Message = COURSEWORK, Key = TEST.
Draw a table for the letters of the plaintext (message), and repeat the letters of the key so that the
no of letters present in the plain text becomes the equal to the no of letters in the key.
C O U R S E W O R K
T E S T T E S T T E
Cryptography and its Types_3
CRYPTOGRAPHY
3
To determine the letters of cipher text the 26x26 table of English alphabet is used.
Cryptography and its Types_4
CRYPTOGRAPHY
4
By using the table,
The cipher text will be = VSMKLIOHKO
5. Decrypt the ciphertext “smes zwgl” with Vigenère cipher using “with” as the key.
Solution: Cipher text = SMES ZWGL, Key = WITH
Draw a table for the letters of the plaintext (message), and repeat the letters of the key so that the
no of letters present in the plain text becomes the equal to the no of letters in the key.
S M E S Z W G L
W I T H W I T H
Cryptography and its Types_5
CRYPTOGRAPHY
5
To determine the letters of plain text, the 26x26 table of English alphabet is used.
Cryptography and its Types_6
CRYPTOGRAPHY
6
By using the table, match the key with column or row and find the respective cipher text letter to
the column if row is selected and row if column is selected.
Hence the plaintext will be = WELLDONE.
6. Consider a case insensitive shift cipher, with the following distribution over M [𝑀 = 𝑎] =
0.2 , 𝑃𝑟[𝑀 = 𝑏] = 0.2 , 𝑃𝑟[𝑀 = 𝑐] = 0.3 , 𝑃𝑟[𝑀 = 𝐷] = 0.3
a. What is the probability that the ciphertext is y?
Probability of ciphertext is y = Pr[C=y]
Cryptography and its Types_7
CRYPTOGRAPHY
7
Where the probability of each letter depends on the probability plaintext and used key.
Hence, the plain text letters along with the keys will be,
Either, M=a and key = 2
Either, M=b and key = 3
Either, M=c and key = 4
Or M=D and key = 5
So the formula will lead to
Pr[C=z] = Pr[M=a]*Pr[K=2]+ Pr[M=b]*Pr[K=3]+ Pr[M=c]*Pr[K=4] +
Pr[M=D]*Pr[K=5]
Pr[C=y] = 0.2*1/26 + 0.2*1/26 + 0.3*1/26 + 0.3*1/26
As, for all k {0,...,25}, Pr[K=k] = 1/26]
Pr[C=y] =1/26 Ans.
b. What is the probability that the ciphertext is z?
Probability of ciphertext is z = Pr[C=z]
Where the probability of each letter depends on the probability plaintext and used key.
Hence, the plain text letters along with the keys will be,
Either, M=a and key = 1
Either, M=b and key = 2
Either, M=c and key = 3
Cryptography and its Types_8

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
IFN648 | Applied Cryptography
|16
|2694
|27

Security in computing and information technology
|9
|1672
|462

Applied Cryptography Assignment 2022
|17
|2555
|21

Cryptography Tutorial with Examples and Exercises - Desklib
|20
|3498
|416

Foundation of Cyber Security
|23
|5334
|304

SEO for Desklib
|3
|629
|415