In: Computer Science
You are required to research and report on this topic according
to the Detail of Question below.
Detail of Questions
A. Alice is sending an encrypted message to Bob.
1. Discuss Kerckhoff’s principle.
2. What should be kept secret?
B. By using the plain text, key and IV, convert the following
plaintext to cipher-text using the below mode:
1. Block Cipher Chain (CBC)
Plain Text: 111100011000001
Key: 1 2 3 4
4 1 2 3
IV = 0111
C. The figure bellow present the two-key method in 3DES.
Indicate in detail what would the result be if :
1. ?1=?3
2. ?1=?2
D. Alice is sending message “HIDE” to Bob. Perform encryption and decryption using RSA algorithm, with the following information:
Parameters
p q e 11 5 7
Present all the information that you will need to encrypt and decrypt only the first letter from text.
A. Alice is sending an encrypted message to Bob.
1. Discuss Kerckhoff’s principle.
Kerckhoff's principle is the concept that a cryptographic system should be
designed to be secure, even if all its details, except for the key,
are publicly known.
The principle forms the basis of open security and security by design and
contrasts directly with the deprecated security through obscurity model.
After a message has been subjected to a cryptographic algorithm, it is expected to remain secure even if an intruder has or gains full access to the encrypted message and has knowledge of what algorithm was used. The point is that,
even if a system's design and details are not made open, to begin with,
they may be detected by an unauthorized party and, as such, should be
inherently secure.
2. What should be kept secret?
The key used for encryption and decryption should be kept secret.
D. Alice is sending message “HIDE” to Bob.
Perform encryption and decryption using RSA algorithm,
with the following information:
Parameters
p q e 11 5 7
p = 11 & q = 5. Then n = p * q = 11*5 = 55.
Calculate F(n):
F(n): = (p-1)(q-1) = 10 * 4 = 40
Choose e & d:
d & n must be relatively prime (i.e., gcd(d,n) = 1),
and e & d must be multiplicative inverses mod F(n).
Try d = 23.As given in the question e = 7
Encrypting message HIDE:
formula: c=m^e mod n
Encrypting H: The numerical representation of H is 7
m=7 e=7 n=55
c=7^7 mod 55
c=28 mod 55 28 is the first ciphertext
Ciphertext: 28
Encrypting I: The numerical representation of H is 8
m=8 e=7 n=55
c=8^7 mod 55
c=2 mod 55 2 is the second ciphertext
Ciphertext: 28,2
Encrypting D: The numerical representation of H is 3
m=3 e=7 n=55
c=3^7 mod 55
c=42 mod 55 42 is the third ciphertext
Ciphertext: 28,2,42
Encrypting E: The numerical representation of H is 4
m=4 e=7 n=55
c=4^7 mod 55
c=29 mod 55 49 is the fourth ciphertext
Ciphertext: 28,2,42,49
Decrypting message:
Ciphertext: 28,2,42,49
formula: m=^d mod n
Decryption 28:
c=28 d=23 n=55
m=28^23 mod 55
m=7 mod 55 7=H.This is our first plaintext.
Plaintext: H
Decryption 2:
c=2 d=23 n=55
m=2^23 mod 55
m=8 mod 55 8=I.This is our second plaintext.
Plaintext: HI
Decryption 42:
c=42 d=23 n=55
m=42^23 mod 55
m=3 mod 55 3=D.This is our third plaintext.
Plaintext: HID
Decryption 49:
c=49 d=23 n=55
m=49^23 mod 55
m=4 mod 55 4=E.This is our fourth plaintext.
Plaintext: HIDE
Thus, we have a plaintext message "HIDE" after decryption.