0% found this document useful (0 votes)
48 views5 pages

Cyber

Uploaded by

Aman Bansal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views5 pages

Cyber

Uploaded by

Aman Bansal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

1.

Define Steganography with Example


Steganography is the practice of hiding information within another file,
message, or image. For example, a message could be concealed in an image by
altering the least significant bits of the pixel values, so the changes are
imperceptible to the human eye.
2. Explain Cryptanalysis
Cryptanalysis is the study of analyzing information systems to break
cryptographic codes and access encrypted data without authorization. It involves
techniques to decipher encrypted messages, often exploiting weaknesses in the
encryption algorithm or key management.
3. Compute GCD (24120, 1640) Using Euclid’s Algorithm
Using Euclid's algorithm:
1. ( 24120 div 1640 = 14 ) remainder ( 1210 ) 2. ( 1640 div 1210 = 1 ) remainder
( 430 )
3. ( 1210 div 430 = 2 ) remainder ( 350 ) 4. ( 430 div 350 = 1 ) remainder ( 80 )
5. ( 350 div 80 = 4 ) remainder ( 30 ) 6. ( 80 div 30 = 2 ) remainder ( 20 )
7. ( 30 div 20 = 1 ) remainder ( 10 ) 8. ( 20 div 10 = 2 ) remainder ( 0 )
Thus, GCD(24120, 1640) = 10 .
4. Discuss the Working of DES in Detail with Diagram
DES (Data Encryption Standard) works by dividing the plaintext into
64-bit blocks and applying a series of transformations. It uses a 56-bit key to
perform 16 rounds of permutation and substitution processes. The process
involves:
- Initial Permutation (IP)
- 16 rounds of Feistel function, which consists of expansion, key mixing,
substitution using S-boxes, and permutation.
- Final Permutation (IP-1).
The diagram typically shows the block structure with inputs, outputs, and
transformations applied.
5. Explain RSA Algorithm with Steps
1. Choose two primes: ( p = 17 ) and ( q = 11 ).
2. Calculate ( n = p times q = 187 ).
3. Compute ( phi(n) = (p-1)(q-1) = 160 ).
4. Choose ( e = 7 ) (must be coprime to ( phi(n) )).
5. Compute ( d ) such that ( d times e equiv 1 mod phi(n) ).
Here, ( d = 23 ).
6. Public key = (e, n) = (7, 187); Private key = (d, n) = (23, 187).
Encryption : ( C = M^e mod n = 77^7 mod 187 = 119 ).
Decryption : ( M = C^d mod n = 119^{23} mod 187 = 77 ).
6. Discuss Cryptography and Its Types
Cryptography is the practice of securing information by transforming it
into an unreadable format. Types include:
- Symmetric Cryptography : Same key for encryption and decryption (e.g.,
AES).
- Asymmetric Cryptography : Uses a pair of keys (public and private)
(e.g., RSA).
- Hash Functions : Transforms data into a fixed-size string (e.g.,
SHA-256).
7. Define Block Cipher & Discuss Modes of Operation
A Block Cipher encrypts data in fixed-size blocks (e.g., 64 bits). Modes
include:
- ECB (Electronic Codebook) : Each block is encrypted independently.
Advantages : Simplicity. Disadvantages : Identical plaintext blocks yield
identical ciphertexts, compromising security.
- CBC (Cipher Block Chaining) : Each block depends on the previous one.
Advantages : Better security. Disadvantages : Errors propagate.
8. State and Prove Fermat’s Theorem
Fermat’s Little Theorem states if ( p ) is a prime and ( a ) is
an integer not divisible by ( p ), then ( a^{p-1} equiv 1 mod p ).
To find ( a equiv 9794 mod 73 ), compute:
1. ( 9794 mod 73 = 61 ).
Thus, ( a = 61 ).
9. State Chinese Remainder Theorem (CRT)
CRT states that if ( n_1, n_2, ldots, n_k ) are pairwise coprime,
then there exists a unique solution modulo ( N = n_1 times n_2 times
ldots times n_k ).
Solution :
1. From ( X = 2 mod 3 )
2. ( X = 3 mod 5 )
Using back substitution, ( X = 8 ).
10. Find the Value of ( phi(12) )
Prime factorization of 12: ( 2^2 times 3^1 ). Thus,
[
phi(12) = 12 left(1 - frac{1}{2} right) left(1 - frac{1}{3} right) =
12 times frac{1}{2} times frac{2}{3} = 4.
]
11. Compute ( 361 mod 7 )
( 361 div 7 = 51 ) remainder ( 4 ). Thus, ( 361 mod 7 = 4 ).
12. Find ( text{gcd}(1970, 1066) )
Using Euclid’s algorithm:
1. ( 1970 div 1066 = 1 ) remainder ( 904 )
2. ( 1066 div 904 = 1 ) remainder ( 162 )
3. ( 904 div 162 = 5 ) remainder ( 74 )
4. ( 162 div 74 = 2 ) remainder ( 14 )
5. ( 74 div 14 = 5 ) remainder ( 4 )
6. ( 14 div 4 = 3 ) remainder ( 2 )
7. ( 4 div 2 = 2 ) remainder ( 0 )
Thus, GCD(1970, 1066) = 2 .
13. Differentiate Between Substitution & Transposition Cipher
- Substitution Cipher : Replaces each letter with another (e.g., Caesar
Cipher).
- Transposition Cipher : Rearranges the letters without substitution
(e.g., Rail Fence Cipher).
14. What Do You Mean by Cryptanalysis?
This is a repeat of Question 2.
15. Intercepted RSA Cipher Text C=8
Given ( e=13 ), ( n=33 ):
1. Find ( d ) such that ( ed equiv 1 mod phi(n) ) where (
phi(33) = 20 ).
2. Find ( d ): ( d = 5 ).
3. ( M = C^d mod n = 8^5 mod 33 = 2 ).
16. Monoalphabetic vs. Polyalphabetic Ciphers
- Monoalphabetic Cipher : Uses a fixed substitution alphabet (e.g.,
Caesar Cipher).
- Polyalphabetic Cipher : Uses multiple substitution alphabets (e.g.,
Vigenère Cipher).
17. Explain CRT and Solve Congruent Equations
Given:
1. ( X = 1 mod 5 )
2. ( X = 2 mod 7 )
3. ( X = 3 mod 9 )
4. ( X = 4 mod 11 )
Using the method of successive substitutions, solve for ( X ).
18. Define Euler’s Totient Function
Euler's Totient Function ( phi(n) ) counts integers up to ( n
) that are coprime to ( n ). For primes ( p ) and ( q ):
[
phi(pq) = (p-1)(q-1).
]
19. Most Security-Critical Component of DES Round Function
The most critical component is the S-Box which provides non-linearity
and confusion. It transforms input bits to output bits, making it difficult to
deduce the key from ciphertext.
20. Design of S-Box of AES
The S-Box in AES is a nonlinear substitution function based on finite field
arithmetic. It differs from DES S-Boxes as it is more complex, designed to
provide greater security through better diffusion and confusion.
21. Define a Group and Ring
- Group : A set with a binary operation satisfying closure,
associativity, identity, and invertibility.
- Ring : A set with two binary operations (addition and multiplication)
satisfying certain properties.
Proof : The order of a subgroup divides the order of the group
(Lagrange's theorem).
22. Explain Shannon Confusion and Diffusion
Confusion obscures the relationship between the key and ciphertext.
Diffusion spreads the influence of a single plaintext bit over many
Sure! Here are the answers to your remaining questions:
23. Apply the Caesar Cipher (p=D(3,C)) and Decrypt the Cipher Text “PHHW
PH”
The Caesar cipher shifts letters by a fixed number. To decrypt "PHHW PH" with a
shift of 3:
1. P → M
2. H → E
3. H → E
4. W → T
5. (space)
6. P → M
7. H → E
So, the decrypted text is "MEET ME" .
24. Calculate ( phi(35) )
The prime factorization of 35 is ( 5 times 7 ). Thus,
[
phi(35) = 35 left(1 - frac{1}{5} right) left(1 - frac{1}{7} right) =
35 times frac{4}{5} times frac{6}{7} = 24.
]
25. Find ( text{gcd}(1970, 1066) ) Using Euclid’s Algorithm
Using Euclid’s algorithm:
1. ( 1970 div 1066 = 1 ) remainder ( 904 )
2. ( 1066 div 904 = 1 ) remainder ( 162 )
3. ( 904 div 162 = 5 ) remainder ( 74 )
4. ( 162 div 74 = 2 ) remainder ( 14 )
5. ( 74 div 14 = 5 ) remainder ( 4 )
6. ( 14 div 4 = 3 ) remainder ( 2 )
7. ( 4 div 2 = 2 ) remainder ( 0 )
Thus, GCD(1970, 1066) = 2 .
26. Explain Block Cipher and Stream Cipher
- Block Cipher : Encrypts data in fixed-size blocks (e.g., 64 or 128
bits). Each block is processed independently.
- Stream Cipher : Encrypts data one bit or byte at a time, using a
keystream that combines with plaintext to produce ciphertext.
Modes of Operation for block ciphers:
- ECB (Electronic Codebook) : Each block is encrypted independently.
Advantages : Simplicity. Disadvantages : Patterns in plaintext are visible
in ciphertext.
- CBC (Cipher Block Chaining) : Each block is XORed with the previous
ciphertext block before encryption. Advantages : Provides better security.
Disadvantages : Errors in one block affect subsequent blocks.
27. Explain Playfair Technique and Encrypt the Message
Playfair Cipher uses a 5x5 grid filled with a keyword. Each letter pair
in the plaintext is encrypted based on their positions in the grid. For the
message "hide the gold in the treestump" using the key "playfair":
1. Remove spaces and duplicate letters in the keyword: `PLAYFIR`.
2. Fill the grid:
```
P L A Y
F I R B
C D E G
H J K M
N O Q S
T U V W
X Z
```
3. For "HIDE THE GOLD IN THE TREE STUMP", treat pairs: "HI", "DE", "TH", etc.
4. Encrypt each pair using grid rules (same row, same column, or rectangle
rule).
Resulting encrypted message will depend on grid placements.
28. Block Level Diagram of One Round of DES
The round of DES includes:
1. Initial Permutation (IP)
2. Splitting the data into Left and Right halves (L and R)
3. Feistel Function : involves:
- Expansion
- Key mixing (XOR with round key)
- Substitution through S-boxes
- Permutation
4. XOR with left half (L) and result from Feistel function
5. Swap halves for next round
6. Final Permutation (IP-1) after all rounds.
Complementation Proof : If both the plaintext and the key are
complemented, the output remains complemented due to the symmetry of the
operations used in DES.
29. Explain AES Algorithm
AES (Advanced Encryption Standard) encrypts data in 128-bit blocks,
using key lengths of 128, 192, or 256 bits. Its rounds include:
1. SubBytes : Non-linear substitution using S-Box.
2. ShiftRows : Row-wise shifting.
3. MixColumns : Mixing the data within columns.
4. AddRoundKey : XOR with the round key.
Difference from DES :
- AES is more secure and efficient, using a larger key size.
- AES operates on larger block sizes (128 bits) compared to DES (64 bits).
30. State and Prove Fermat’s Theorem
Fermat’s Little Theorem states if ( p ) is a prime and ( a ) is
an integer not divisible by ( p ), then ( a^{p-1} equiv 1 mod p ).
Using it to find ( a equiv 9794 mod 73 ) :
1. Calculate ( 9794 mod 73 ): ( 9794 div 73 = 134 ), remainder (
61 ).
Thus, ( a = 61 ).
31. Describe RSA Algorithm in Detail
RSA Algorithm steps:
1. Choose two distinct primes ( p ) and ( q ): ( p = 13 ), ( q =
17 ).
2. Calculate ( n = pq = 221 ).
3. Compute ( phi(n) = (p-1)(q-1) = 192 ).
4. Choose a public exponent ( e ) such that ( 1 < e < phi(n) ) and
coprime to ( phi(n) ). Given public key is ( 35 ).
5. Calculate the private key ( d ) such that ( ed equiv 1 mod phi(n)
). Solve ( 35d equiv 1 mod 192 ) to find ( d ).
Public Key : (e, n) = (35, 221)
Private Key : Calculated ( d ) can be found using the Extended
Euclidean Algorithm.

You might also like