C++ in LINUX

Виконано Опубліковано %project.relative_time Оплачується при отриманні
Виконано Оплачується при отриманні

In this project, you will develop a C++ program to find keys of two files encrypted with AES in ECB mode using brute force key search (exhaustive key search). You will implement the Brute-force Key Search, i.e., you should try all the different combinations of first four bytes of the keys to find the right key (The first 4 bytes of the key are in the set of {a,…z} (lower-case characters) and {0,…,9}), and the original plaintext files. After the key is found, your program will print out "the key for the encrypted file, and the original plaintext file”.

I have 13 encrypted files (00_e to 12_e) using the AES encryption algorithm in ECB mode posted. The source code of the encryption program and the decryption program in ECB mode using crypto library Cryptopp will be provided. You can revise the decryption program and include it as a function in your exhaustive key search program for you to decrypt with a guessed key.

The length of each key used for encryption is 128 bits, which is 16 bytes. To find a 128-bit key with exhaustive search will be too time consuming. So the students are only required to search exhaustively for the first 32 bits (4 ASCII characters), while the remaining 96 bits of key is set to ‘x7qfkp3mbv9w’ for simplicity. The key format with the last 96 bits of the AES key fixed is in the following format:

????x7qfkp3mbv9w

The first 4 bytes of the keys (4 ASCII characters) are in the set of {a,…z} (lower-case characters) and {0,…,9}. Because the unknown key length is 4 bytes, you can try all the possible combinations in your program (exclusive key search). The number of possible combination is 36^4.

In the program, every loop iteration a new guessed key with the first 4 bytes of the key different (the last 96 bits were set to ‘x7qfkp3mbv9w’ for simplicity) will be generated and applied on the cipher text to see if the key is the correct key or not. In other words, you guess the first 4 bytes of the key every loop iteration, and use it to decrypt the ciphertext, and then analyze if the decrypted file is a possible English text.

The original plain-text is written in English, actually copied from some child story books. It may have numbers, small or capital letters or some characters such as SPACE, LF,COMMA, PERIOD, COLON, SEMICOLON, “, ”, -, etc. as an ordinary English article might have. It is hard for anyone to know which characters are possible in the texts and which are not, so you probably have to guess. You can reference the table of ASCII code which you can find online. My suggestion for your analysis part is to count whether most of the decrypted characters, belong to possible readable English characters defined in your program (eg., 95 percentage of the decrypted characters are English characters), and if so, record this key as a “candidate.” Most likely, after you try half of all the possible key combinations, you will find the correct key, and thus the corresponding original plaintext.

Програмування на С Linux Архітектура ПЗ

ID Проекту: #13377485

Про проект

3 заявок(-ки) Дистанційний проект Остання активність 7 роки(ів) тому

Доручено:

maksum1

ok .

$40 USD за 1 день
(32 відгуків(-и))
5.0

3 фрілансерів(-и) готові виконати цю роботу у середньому за $117

hbxfnzwpf

I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 7 years. My work is online game developing, and mainly focus on server side, using c++ under Linux environ Більше

$100 USD за 1 день
(114 відгуків(и))
6.9