Using Visual Studio, open the provided “TimingAttackLab.sln”. This project was used to create the file “time_data”, which should be located in “....\TimingAttackLab\bin\Debug\”. Have a look at the “time_data” file; it is simply the number of ticks used to calculate a 1 or a 0. We assume a 1 takes more time to calculate than a 0. The project only has a few functions that are left to be implemented in order for you to decrypt the super-secret message. Turn in a lab report containing: -Your implementation of the functions “public static String BinStr2ASCII(String BinStr)” and “public static String LongToBinStr(long[] TimeData)” -The decoded message from running the complete program. And answers to the following questions: 1) What are some possible ways an algorithm could be designed to thwart timing attacks? 2) What assumptions must be true for an attacker to be able to perform a timing attack? 3) As a machine increases in processing power, is the difference in processing time between inputs (for example a one and a zero) likely to be greater or smaller? 4.1 Lab on hash generation and sensitivity of hash functions to plaintext modifications Keyed-Hash Message Authentication Code (HMAC) ensures integrity of a message and authentication of the message. It requires a common key for sender and recipient. 1. Open the file CrypTool-en.txt under C:\Program Files (x86)\CrypTool\examples. 2. Select from Menu “Indiv. Procedures” \“Hash” \“Generation of HMACs”. 3. Select SHA-1 as hash function and double hashing as HMAC variants. 4. Enter your key “chattanooga”. The HMAC code generated from the message and the key is 66 C2 2E BA 41 36 6D EB EA FB 8E B1 7D B1 3B 42 5A 15 98 E1
Using Visual Studio, open the provided “TimingAttackLab.sln”. This project was used to create the file “time_data”, which should be located in “....\TimingAttackLab\bin\Debug\”. Have a look at the “time_data” file; it is simply the number of ticks used to calculate a 1 or a 0. We assume a 1 takes more time to calculate than a 0. The project only has a few functions that are left to be implemented in order for you to decrypt the super-secret message. Turn in a lab report containing: -Your implementation of the functions “public static String BinStr2ASCII(String BinStr)” and “public static String LongToBinStr(long[] TimeData)” -The decoded message from running the complete program. And answers to the following questions: 1) What are some possible ways an algorithm could be designed to thwart timing attacks? 2) What assumptions must be true for an attacker to be able to perform a timing attack? 3) As a machine increases in processing power, is the difference in processing time between inputs (for example a one and a zero) likely to be greater or smaller? 4.1 Lab on hash generation and sensitivity of hash functions to plaintext modifications Keyed-Hash Message Authentication Code (HMAC) ensures integrity of a message and authentication of the message. It requires a common key for sender and recipient. 1. Open the file CrypTool-en.txt under C:\Program Files (x86)\CrypTool\examples. 2. Select from Menu “Indiv. Procedures” \“Hash” \“Generation of HMACs”. 3. Select SHA-1 as hash function and double hashing as HMAC variants. 4. Enter your key “chattanooga”. The HMAC code generated from the message and the key is 66 C2 2E BA 41 36 6D EB EA FB 8E B1 7D B1 3B 42 5A 15 98 E1