PART - SNS Courseware

advertisement
SNS COLLEGE OF ENGINEERING
Kurumbapalayam(Po), Coimbatore – 641 107
Accredited by NAAC-UGC with ‘A’ Grade
Approved by AICTE & Affiliated to Anna University, Chennai
INTERNAL ASSESMENT EXAMINATIONS - II
COURSE: B.E – CSE
IT2352 – CRYPTOGRAPHY AND NETWORK SECURITY
ANSWER KEY
PART-A
1. Uses of RC4


RC4 is used in Secure Sockets Layer / Transport layer security standards that have
been defined for communication between Web browsers and servers.
It is also used in the Wired Equivalent Privacy protocol and newer Wi-Fi Protected
Access Protocol.

2. Four steps used in AES algorithm




Substitute bytes
Shift rows
Mix columns
Add Round key
3. Attacks on RSA algorithm

Brute force attack



Mathematical attack
Timing attack
Chosen cipher text attack
4. Discrete algorithm
For any integer “b” and a primitive root “a” of prime number “p”, we can find a
unique exponent “i” such that
b=a(power)i mod p
where 0<i<(p-1).
The expression i is referred to as the Discrete algorithm.
5. Primitive root
For any integer “b” and a primitive root “a” of prime number “p”, we can find a unique
exponent “i” such that
b=a(power)i mod p
where 0<i<(p-1).
6. Weak collision resistance
For any given block x, it is computationally infeasible to find y ≠ x with H(y)=H(x).
This is also known as Second pre image resistant.
7. Digital signature
A Digital signature is an authentication mechanism that enables the creator of a message
to attach a code that acts as a signature. The message is formed by taking the hash of the
message and encrypting the message with the creator’s private key.
Types:
Discrete Digital signature
Arbitrary Digital signature
PART –B
8. A(i) AES algorithm
AES is a block cipher intended to replace DES for commercial application .
All operations-8 bit byte
Arithmetic operations –finite fields GF(2power 8)
Steps
Four different stages are used namely
 Substitute bytes
 Shift rows
 Mix columns
 Add Round key
Substitute bytes
Sub byte 16 *16 matrix- S-box
All possible 256 8-bit bytes
Left most 4 bits of the bytes-row value
Right most 4 bits of the bytes-column value
States
Forward substitute byte transformation
Inverse substitute byte transformation
Shift rows
A row shift moves an individual byte from one column to another
Forward Shift rows transformation
Inverse
Shift rows transformation
Mix columns
Each byte of a column is mapped into a new value that is a function of all four bytes in that
columns.
Forward Mix columns
Inverse Mix columns
Add Round key
128 bits of state are bitwise XOR-ed with the 128 bits of the round keys.
Forward Add Round key
Inverse Add Round key
8. B (ii) RSA algorithm
RSA is a block cipher in which the plain text and cipher text are integer between 0 and
(n-1)
 Select p,q
 Calculate n=p*q
 Calculate ϕ(n)=(p-1)(q-1)
 Select integer e
 Calculate d
 Public key
 private key
9.A.(i) Given :
q = 11
α=7
x(a)=3
x(b)=6
using:
Diffie Hellman key exchange technique
Solution:
X(a)< q
3<11
Y(a)=α(power x(a)) mod q
Y(a)=7^3 mod 11
=343 mod 11
=2
X(b)< q
6 < 11
Y(b)=α^x(b) mod q
=7^6 mod 11
=117649 mod 11
=4
K=(y(b))^(x(a)) mod q
=4^3 mod 11
=64 mod 11
=9
K=y(a)^(x(b)) mod q
=2^6 mod 11
=64 mod 11
=9
K=9
9. (b).Elgamal algorithm
 Select private X(a)
 Calculate Y(a)
 Public key
 Private key
 M< q
 K <q
 K=(y(a))^k mod q
 C1=α^k mod q
 C2=KM mod q
 (c1,c2)
10. A.(i) Requirement of hash function
 Variable input size
 Fixed output size
 Efficiency
 Pre image resistant second pre image resistant
 Collision resistant
 Pseudo random ness
10A(ii) Secure Hash Algorithm
SHA-0 up to SHA-512
Steps





Append padding bits
Append length
Initialize hash buffer
Process message in 1024 bit block
Output
10 B.(II) Digital signature in connection with RSA and Elgamal
 Generate a random integer X(a),such that 1 <X(A) <q-1
 Compute Y(A)=α^(X(a) mod q
 A’s private key is X(a);A’s public key is {q,α,Y(a)}
 Prime number where 26(L-1)<p<2^L
 Prime divisor of (p-1)
 G=h^[(p-1)/q] mod p
 K=random integer with 0<k<q
Download