Roll No.
B.E (FT) END SEMESTER EXAMINATIONS – Nov / Dec 2021
Computer Science and Engineering
Semester - VII
CS6008 & Cryptography and Network Security
(Regulation 2018 - RUSA)
Time: 3 Hours Answer ALL Questions Max. Marks 100
PART- A (10 x 2 = 20 Marks)
1. Write a program in C or C++ to find the value of a/(b-c). The values of a, b and c can
be any integer. Use GDB to find and handled any arithmetic error such as division by
0 or memory overflow due to use of large integers.
2. Write a program in C to copy the contents of one file to another file using the read,
write, open and close system calls of Linux.
3. Give an example for self-join in SQL.
4. How will you improve the performance by increasing the number of CPUs from 8 to
16?
5. Give an example for Discrete Logarithm problem.
6. What is the purpose of Primality Testing?
7. Define Galois Field used in AES algorithm.
8. How will you verify the Hash values for message authentication?
9. Compare the key sizes of RSA and ECC algorithms.
10. What is the need for setting the lifetime of keys?
PART- B (8 x 8 = 64 Marks)
(Answer any 8 questions)
11. Write a program using recursion to find the factorial of a number. Explain the memory
management using stack for this program.
12. Write a shell script to check whether a given string is a palindrome.
13. How will you perform return oriented programming without using a return instruction?
14. Explain the method of attacking domain names using port scanning.
15. Prove that the set of integers form an abelian group with respect to multiplication
modulo n operation. You can use n greater than 4 and less than 10.
16. Find the values of following exponents using Fermat’s theorem. i) 611mod 11 ii) 314
mod 11 iii) 8-1 mod 17 iv) 5-1 mod 23
17. A group of people are arranging themselves for a parade. If they line up three to a
row, one person is left over. If they line up four to a row, two people are left over, and
if they line up five to a row, three people are left over. What is the smallest possible
number of people?
18. List the modes of operations and explain them.
19. Consider a Diffie-Hellman scheme with a common prime q = 11 and a primitive root
a = 2. If user A has public key YA = 9, what is A’s private key XA? If user B has public
key YB = 3, what is B’s private key XB? what is the shared secret key (K) of user A
and user B?
20. Assume that you are giving your name as input to the SHA-1 algorithm. Find the
output.
21. Explain the key generation process in ECC with an example.
22. Discuss the method of performing registration and key generation in PKI.
PART- C (2 x 8 = 16 Marks)
23. You are given the following schema regarding a table for inventory control.
Inventory (Item no, Item name, Item description, Item quantity, Date of item).
Using this schema, an attacker launches an attack query based on the retrieval of
item details using an item number through SQL injection attack. Write a sample SQL
query for this scenario to illustrate the attack. How will detect and prevent this attack?
24. Using the plain text “0123456789ABCDEF” and the key “123457799BBCDFF1”
perform the encryption using DES algorithm and find the cipher text.