Question: Cryptography: Q1 (20 pts). Write a C++ function named expansion that accepts an unsigned integer (32 bit) as input and returns an unsigned long long
Cryptography:

Q1 (20 pts). Write a C++ function named expansion that accepts an unsigned integer (32 bit) as input and returns an unsigned long long (64 bit) using an expansion function given below. It is similar to the expansion function of f-function of DES. However, the table is different. Here, you can assume bit 1 as the most significant bit and bit 32 as the least significant bit of the input. Actually, your output will contain 48 bits. Therefore, you can use 0 in the first 16 bits. For example, expansion(1) should return the unsigned long long equivalent of (0000000000000000000000000000000000000000000000000000000000000010)2 expansion(2) should return the unsigned long long equivalent of (0000000000000000000000000000000000000000000000000000000000001100)2 expansion(2147483648) should return the unsigned long long equivalent of (0000000000000000100000000000000000000000000000000000000000000001)2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
