IT653 : Network Security Autumn Semester, KReSIT, IIT Bombay. Instructor(s) * Bernard L Menezes Teaching Assistant(s) * V Vijayakumar * Prashant Rajoria * Sudeep Biswas Look at * Home * Announcements * Resources * Assignments * Marks / Grades Network Security I This Course will have 3 to 4 assignments. They will be put up as soon as they are discussed in the class. For group assignments, the groups will also be put with the assignments. Assignments Submission Instructions 1. Please DO NOT copy the assignments. 2. Adhere to deadlines strictly. Assignments submitted after deadline will not be considered. 3. Assignments SHOULD be in the following format: 1. All the assignments must be within a single directory named "your_register_number"_"assignment_no" . eg., 02329007_1 for a person with register number 02329007 and submitting the first assignment. 2. There should be a README file in text format in this directory, containing your name, roll number and anything you want to tell about your assignment. 3. tar zip this directory into a single file as follows: tar -zcvf dirname.tgz directory eg., tar -zcvf 02329007_1.tgz 02329007_1/ 4. Assigment file (the .tgz file) must be mailed to it653-assignments[at]it.iitb.ac.in ALL THE BEST List of Assignments (In Chronological Order) 1. First Assignment. Due 18th Aug Friday midnight. 1. A terrorist transmits the same message m to each of his 3 accompliers across the globe. The accomplies have differeent private keys (d1, n1), (d2, n2) and (d3, n3). They have the same encryption key 3. Further, n1, n2 and n3 are relatively prime to each other. The terrorist encrypts the message m before transmission. All the three encrypted messages, c1, c2 and c3, are intercepted during transmission. Show how to recover m without being able to factorize n1, n2 or n3. Hint: Use Chineese Remainder Theorem. 2. Using the Java BigInteger class, 1. Generate an RSA Public-Private key pair. 2. Encrypt an arbitrary message using the public key. 3. Decrypt the message using the private key. Experiment the above with 1. Different key sizes (128, 256, 512, 768, 1024 bits) and determine the time for each of the above operations as a function of key size. 2. Different message sizes from 0 to 4KB for any two key sizes of your choice and determine the time for encrypting/decrypting those messages as a function of message size. 3. Different values for the "probability of P, Q being prime" variable in the constructor of the BigInteger class and determine the time for key generation for different value of this variable. In addition to the time measurements for key generation, encryption and decryption AND analysis of results please submit an appendix which includes: * Your Java code. * A sample key and message with key generation time and encryption / decryption time. * A script file to execute your program. Here is the source code of the java program demonstrated in the class for implementation of RSA. Here is a link to the local copy of Java 2 Platform API doccumentation. Here is a link directly to the page containing the documentation for BigInteger class. 2. Assignment II. Part 1, 2 and 3 due 1st Sep Monday midnight. 1. Suppose A's Diffie-Hellmann parameters (P, g) are (24691, 106) respectively and his public key is 12375, write a program to compute A's private key. 2. Write a program to 1. Calculate the digest of a message (Both SHA-1 and MD-5) 2. Compute the RSA and DSA Signatures of a message. 3. Verify the RSA and DSA Signatures. Use "Kanwal Rekhi School of Information Technology, IIT Bombay" as the message in the above three cases. 1. Estimate the time taken for the message digest as a function of message size (message size varying from 0 to 4K) and the algorithm. 2. Estimate the time taken for generating the signatures as a function of message size, keysize and algorithm. 3. Estimate the time taken for verifying the signatures as a function of message size, keysize and algorithm. 3. Let Ci be the cipher text corresponding to plain text Pi using DES. 1. What effect does a transmission error in C1 (first bit of cipher text) have on the decrypted cipher text at the reciever?. Assume CBC mode 2. What is the effect in the cipher text block due to an error in P1 of plain text?. Assume CBC mode. What is the error at the reciever? 3. If a bit error occurs in the i th transmitted byte in CFB mode, how far does the error propagate?. 4. To be put up soon. Here is the Sample code to generate DSA Signature. Similarly, others can be done. IT653 : Network Security Autumn Semester, KReSIT, IIT Bombay. Instructor(s) * Bernard L Menezes Teaching Assistant(s) * V Vijayakumar * Prashant Rajoria * Sudeep Biswas Look at * Home * Announcements * Resources * Assignments * Marks / Grades Network Security I This Course will have 3 to 4 assignments. They will be put up as soon as they are discussed in the class. For group assignments, the groups will also be put with the assignments. Assignments Submission Instructions 1. Please DO NOT copy the assignments. 2. Adhere to deadlines strictly. Assignments submitted after deadline will not be considered. 3. Assignments SHOULD be in the following format: 1. All the assignments must be within a single directory named "your_register_number"_"assignment_no" . eg., 02329007_1 for a person with register number 02329007 and submitting the first assignment. 2. There should be a README file in text format in this directory, containing your name, roll number and anything you want to tell about your assignment. 3. tar zip this directory into a single file as follows: tar -zcvf dirname.tgz directory eg., tar -zcvf 02329007_1.tgz 02329007_1/ 4. Assigment file (the .tgz file) must be mailed to it653-assignments[at]it.iitb.ac.in ALL THE BEST List of Assignments (In Chronological Order) 1. First Assignment. Due 18th Aug Friday midnight. 1. A terrorist transmits the same message m to each of his 3 accompliers across the globe. The accomplies have differeent private keys (d1, n1), (d2, n2) and (d3, n3). They have the same encryption key 3. Further, n1, n2 and n3 are relatively prime to each other. The terrorist encrypts the message m before transmission. All the three encrypted messages, c1, c2 and c3, are intercepted during transmission. Show how to recover m without being able to factorize n1, n2 or n3. Hint: Use Chineese Remainder Theorem. 2. Using the Java BigInteger class, 1. Generate an RSA Public-Private key pair. 2. Encrypt an arbitrary message using the public key. 3. Decrypt the message using the private key. Experiment the above with 1. Different key sizes (128, 256, 512, 768, 1024 bits) and determine the time for each of the above operations as a function of key size. 2. Different message sizes from 0 to 4KB for any two key sizes of your choice and determine the time for encrypting/decrypting those messages as a function of message size. 3. Different values for the "probability of P, Q being prime" variable in the constructor of the BigInteger class and determine the time for key generation for different value of this variable. In addition to the time measurements for key generation, encryption and decryption AND analysis of results please submit an appendix which includes: * Your Java code. * A sample key and message with key generation time and encryption / decryption time. * A script file to execute your program. Here is the source code of the java program demonstrated in the class for implementation of RSA. Here is a link to the local copy of Java 2 Platform API doccumentation. Here is a link directly to the page containing the documentation for BigInteger class. 2. Assignment II. Part 1, 2 and 3 due 1st Sep Monday midnight. 1. Suppose A's Diffie-Hellmann parameters (P, g) are (24691, 106) respectively and his public key is 12375, write a program to compute A's private key. 2. Write a program to 1. Calculate the digest of a message (Both SHA-1 and MD-5) 2. Compute the RSA and DSA Signatures of a message. 3. Verify the RSA and DSA Signatures. Use "Kanwal Rekhi School of Information Technology, IIT Bombay" as the message in the above three cases. 1. Estimate the time taken for the message digest as a function of message size (message size varying from 0 to 4K) and the algorithm. 2. Estimate the time taken for generating the signatures as a function of message size, keysize and algorithm. 3. Estimate the time taken for verifying the signatures as a function of message size, keysize and algorithm. 3. Let Ci be the cipher text corresponding to plain text Pi using DES. 1. What effect does a transmission error in C1 (first bit of cipher text) have on the decrypted cipher text at the reciever?. Assume CBC mode 2. What is the effect in the cipher text block due to an error in P1 of plain text?. Assume CBC mode. What is the error at the reciever? 3. If a bit error occurs in the i th transmitted byte in CFB mode, how far does the error propagate?. 4. To be put up soon. Here is the Sample code to generate DSA Signature. Similarly, others can be done.