Tribhuwan University

Institute of Science and Technology

2078

Bachelor Level / Third Year / Fifth Semester / Science

B.Sc in Computer Science and Information Technology (CSC327)

(Cryptography)

Full Marks: 60

Pass Marks: 24

Time: 3 Hours

Candidates are required to give their answers in their own words as for as practicable.

The figures in the margin indicate full marks.

Section A

Long Answers Questions

Attempt any TWO questions.
[2*10=20]
1.
Define CIA triad. State the encryption process of double and triple DES. What is the task of S-Box in DES? Discuss with an example.[10]

CIA Triad, Double & Triple DES, and S-Box in DES

CIA Triad

The CIA Triad is a model that represents the three fundamental goals of information security: Confidentiality, Integrity, and Availability.

  • Confidentiality — Ensures that information is accessible only to authorized individuals. Prevents unauthorized disclosure of data.

  • Integrity — Ensures that information is not altered or tampered with by unauthorized parties. Data remains accurate and complete.

  • Availability — Ensures that information and resources are accessible to authorized users whenever needed.

These three principles form the foundation of any security policy or system design.


Encryption Process of Double DES

Double DES applies the DES algorithm twice with two different keys to increase security.

Process:

  • Encryption: C=EK2(EK1(P))C = E_{K2}(E_{K1}(P))
  • Decryption: P=DK1(DK2(C))P = D_{K1}(D_{K2}(C))

Where:

  • PP = Plaintext
  • CC = Ciphertext
  • K1K1, K2K2 = Two different 56-bit keys
  • EE = Encryption, DD = Decryption

Key Length: 56+56=11256 + 56 = 112 bits

Limitation: Vulnerable to Meet-in-the-Middle attack, which reduces effective security to 2572^{57} operations instead of 21122^{112}.


Encryption Process of Triple DES (3DES)

Triple DES applies the DES algorithm three times using two or three keys to provide stronger encryption.

Process (EDE mode — Encrypt-Decrypt-Encrypt):

  • Encryption: C=EK3(DK2(EK1(P)))C = E_{K3}(D_{K2}(E_{K1}(P)))
  • Decryption: P=DK1(EK2(DK3(C)))P = D_{K1}(E_{K2}(D_{K3}(C)))

Two-key variant: K1=K3K1 = K3 (effective key length = 112 bits)

Three-key variant: All keys different (effective key length = 168 bits)

Advantage: Much stronger than Double DES and resistant to Meet-in-the-Middle attack.


Task of S-Box in DES

The S-Box (Substitution Box) performs non-linear substitution in DES, providing confusion by making the relationship between the key and ciphertext complex.

Role of S-Box:

  • Converts a 6-bit input into a 4-bit output
  • DES uses 8 S-Boxes, each with a unique substitution table
  • It is the only non-linear component in DES, providing the core cryptographic strength
  • Without S-Boxes, DES would be a linear system and easily breakable

How it works:

  • The 1st and 6th bits of the 6-bit input form the row number (0–3)
  • The 2nd, 3rd, 4th, and 5th bits form the column number (0–15)
  • The value at that row and column in the S-Box table gives the 4-bit output

Example of S-Box (S1)

Given 6-bit input: 101100

Step a: Row = 1st and 6th bit = 1 and 0 → Row = 10210_2 = 2

Step b: Column = middle 4 bits = 0110 → Column = 011020110_2 = 6

Step c: Look up S-Box 1, Row 2, Column 6:

Row\Col 0 1 2 3 4 5 6 7 ...
0 14 4 13 1 2 15 11 8 ...
1 0 15 7 4 14 2 13 1 ...
2 4 1 14 8 13 6 2 11 ...
3 15 12 8 2 4 9 1 7 ...

Step d: Output = 2 → in 4 bits = 0010

So the 6-bit input 101100 is substituted by 4-bit output 0010.


Conclusion

The CIA Triad defines the core security objectives. Double DES and Triple DES enhance DES security by applying multiple encryption rounds. The S-Box is the heart of DES providing non-linearity and confusion, making the cipher resistant to linear and algebraic attacks.

2.
Explain the generic model of digital signature process. Consider the two prime numbers 7 and 19. Select 29 as public key and 41 as private key. Encrypt the plaintext 4 and decrypt the cipher text 3 using RSA.[10]
3.
Define Galois field with an example. Explain any two modes of block cipher encryption. Determine the quadratic residues of 7.[10]
Section B

Short Answers Questions

Attempt any Eight questions.
[8*5=40]
4.
What does intrusion mean? How the system detect intrusion? List any four types of firewall. [5]
5.
Decrypt the message 'GVPJ' using Hill cipher taking the key as {Row1 = 3 7, Row2= 5 12}. [5]
6.
Describe the PKI trust model. [5]
7.
Define authentication system. Illustrate the need of mutual authentication over one way authentication with an example. [5]
8.
Find the value of 72019mod137^{2019} \mod 13 using Fermat’s Little theorem. Define Euler totient function with an example. [5]
9.
List the properties of hash function. Discuss the first pass of MD4. [5]
10.
Differentiate between Symmetric and Asymmetric cipher. Encrypt the message 'HELL' using the key 'FAIL' using Vernam cipher. [5]
11.
Divide 3x2+4x+33x^2 + 4x + 3 by 5x+65x + 6 over GF(7). [5]
12.
Define SSL protocol. Mention the services provided by PGP. [5]