Cryptography
Community
Cryptography
Model Paper
Section A
Answer any two questions.
1
Define the CIA Triad and explain its components. List out the services of security. Differentiate between block ciphers and stream ciphers with examples.
10
Connect with us on Discord to become a contributor.
2
Given p = 61, q = 53. Calculate the public key, private key, and encrypt the message "42". Then, decrypt the ciphertext to retrieve the original message.
10
Connect with us on Discord to become a contributor.
3
Explain the single round operation in DES. Describe the F function in DES.
10
Connect with us on Discord to become a contributor.
Section B
Answer any eight questions.
4
Explain the process of generating message digests using MD4.
5
Connect with us on Discord to become a contributor.
5
Encrypt the message "INFORMATION" using the Playfair cipher with the keyword "SECURITY".
5
Playfair Cipher Encryption
Question: Encrypt the message "INFORMATION" using the Playfair cipher with the keyword "SECURITY".
Given:
- Plaintext: INFORMATION
- Keyword: SECURITY
Step 1: Construct the 5x5 Key Matrix
First, we create the 5x5 key square. The matrix is filled with the unique letters of the keyword "SECURITY", followed by the remaining letters of the alphabet in order. We treat 'I' and 'J' as the same letter to fit the 26 letters into 25 squares.
- Unique letters from the keyword: The keyword is SECURITY. All its letters are unique. So, we use S E C U R I T Y.
- Fill the matrix: We place these letters into the matrix, then fill the remaining cells with the rest of the alphabet (A-Z), skipping letters already used and combining 'I'/'J'.
The resulting 5x5 key matrix is:
| 1 | 2 | 3 | 4 | 5 | |
|---|---|---|---|---|---|
| 1 | S | E | C | U | R |
| 2 | I/J | T | Y | A | B |
| 3 | D | F | G | H | K |
| 4 | L | M | N | O | P |
| 5 | Q | V | W | X | Z |
Step 2: Prepare the Plaintext
Next, we process the plaintext "INFORMATION" according to the Playfair rules:
- Break the plaintext into pairs of letters (digraphs).
- If a pair contains two identical letters, insert a filler letter (usually 'X') between them.
- If the plaintext has an odd number of letters, add a filler letter ('X') at the end.
Let's process "INFORMATION": IN FO RM AT IO N
The last letter 'N' is alone, so we add an 'X' to make a pair.
The final plaintext digraphs are: IN FO RM AT IO NX
Step 3: Apply Encryption Rules to Each Digraph
We now encrypt each digraph using the key matrix and the three Playfair rules:
- If letters are in the same row: Replace each with the letter to its immediate right (wrapping around if necessary).
- If letters are in the same column: Replace each with the letter immediately below it (wrapping around if necessary).
- If letters form a rectangle: Replace each with the letter on the same row but in the other corner of the rectangle.
Let's encrypt each pair:
-
Digraph 1: IN
- 'I' is at (row 2, col 1). 'N' is at (row 4, col 3).
- They form a rectangle.
- 'I' is replaced by the letter in its row and N's column -> Y.
- 'N' is replaced by the letter in its row and I's column -> L.
- IN -> YL
-
Digraph 2: FO
- 'F' is at (row 3, col 2). 'O' is at (row 4, col 4).
- They form a rectangle.
- 'F' is replaced by the letter in its row and O's column -> H.
- 'O' is replaced by the letter in its row and F's column -> M.
- FO -> HM
-
Digraph 3: RM
- 'R' is at (row 1, col 5). 'M' is at (row 4, col 2).
- They form a rectangle.
- 'R' is replaced by the letter in its row and M's column -> E.
- 'M' is replaced by the letter in its row and R's column -> P.
- RM -> EP
-
Digraph 4: AT
- 'A' is at (row 2, col 4). 'T' is at (row 2, col 2).
- They are in the same row.
- 'A' is replaced by the letter to its right -> B.
- 'T' is replaced by the letter to its right -> Y.
- AT -> BY
-
Digraph 5: IO
- 'I' is at (row 2, col 1). 'O' is at (row 4, col 4).
- They form a rectangle.
- 'I' is replaced by the letter in its row and O's column -> A.
- 'O' is replaced by the letter in its row and I's column -> L.
- IO -> AL
-
Digraph 6: NX
- 'N' is at (row 4, col 3). 'X' is at (row 5, col 4).
- They form a rectangle.
- 'N' is replaced by the letter in its row and X's column -> O.
- 'X' is replaced by the letter in its row and N's column -> W.
- NX -> OW
Final Ciphertext
By combining the encrypted digraphs, we get the final ciphertext.
YL HM EP BY AL OW
Final Answer: YLHMEPBYALOW
6
Explain the concept of digital signatures and differentiate between direct and arbitrated digital signatures.
5
Connect with us on Discord to become a contributor.
7
Define firewall and types of firewalls.
5
Types of Firewall
Firewalls are security systems that monitor and control incoming and outgoing network traffic based on predefined rules. The main types of firewalls are:
1. Packet Filtering Firewall
A packet filtering firewall operates at the network layer of the OSI model. It filters packets based on rules defined in Access Control Lists (ACLs), such as source/destination IP address, port number, and protocol. It is simple and fast but provides limited security as it does not inspect packet contents.
2. Circuit Level Gateway
A circuit level gateway works at the session layer of the OSI model. It monitors and verifies the TCP connection establishment (handshake) between sender and receiver. It provides anonymity by hiding internal network details but does not inspect the actual data in packets.
3. Application Level Gateway (Proxy Firewall)
An application level gateway operates at the application layer of the OSI model. It acts as a proxy server, inspecting both headers and data (payload) of packets for specific applications (e.g., HTTP, FTP). It provides high security but is slower due to deep inspection.
4. Stateful Inspection Firewall
A stateful inspection firewall operates mainly at the network layer and tracks the state of active connections using a state table. It allows or blocks packets based on whether they belong to a valid, established session, making it more secure than simple packet filtering.
5. Next Generation Firewall (NGFW)
A next generation firewall is an advanced firewall that extends stateful inspection by incorporating features like deep packet inspection (DPI), intrusion detection and prevention (IDS/IPS), and application awareness. It can identify and control traffic based on applications and detect modern threats.
Fella Note (Optional)
Each type description consists of their
- OSI layer location (total three layers 3,5,and 7 i.e. network, session, and application)
- whether they inspect the packets of data
- and their primary utility.
8
State Fermat's theorem example. Write the algorithm forelse
5
Connect with us on Discord to become a contributor.
9
Explain IP Security (IPSec) and its components.
5
Connect with us on Discord to become a contributor.
10
Divide 3x2 + x + 6 by 5x + 3 over GF(9).
5
Connect with us on Discord to become a contributor.
11
Explain the process of public key distribution and secret key distribution using public key cryptography.
5
Connect with us on Discord to become a contributor.
12
Explain the concept of a denial of service attack and provide examples.
5
Connect with us on Discord to become a contributor.