CSE 539 – 2018
Due: Feb 1, 2018
Groups: You are to do the HW in a group of 2 people. (This policy is enforced)
Design (invent) a 32 bit encryption algorithm (block encryption using ECB mode). This base-algorithm takes as input two 32 bit quantities, (plaintext and key) and produces a 32 bit quantity as an output (ciphertext). The input, output and key are all “type-less” (or can be thought of as unsigned integers) – as they could be any form of data.
The input and key should not be easily derivable from the output. If the plaintext and ciphertext is known the key should be hard to derive. Also the encryption algorithm must be reversible (decryption) when a key is known.
The encryption method should use some method to make the algorithm hard to “break”.
Write a program to encrypt and decrypt data and test your
programs. The program is run from the command line with the following command
% encrypt 12345678 <filename1> <filename2>
// where 12345678 is an 8 character HEX key (32-bits) and the input is in <filename1>.
The program encrypts the input, and produces the encrypted output in <filename2>.
You are to write the decryption program in the same fashion.
Make sure you test it on several kinds of input such as text, PDF, JPG and so on. Please use Linux. You may use C or C++ or Java, but C/C++ is encouraged.
2. Write a program to brute force the encrypted file and find the key.
3. Find a method or method(s) of finding the key using some weakness of your algorithm, without the need for brute forcing. You are encouraged to get help from friends or colleagues to find weaknesses in your design.
SUBMIT: A short design document showing your algorithm design and why you made the choices and why you think it is a good encryption algorithm. Document how long it takes you to brute force the key (does it depend on the type of file you break?).
Also show what weaknesses you found and how this results in faster breaks of the encryption.
Methods of submission:
Hard copy, hand it in, in class. Only 1 submission per group (put both names).