OpenCores
Issue List
Encryption/Decryption #1
Open QasimH opened this issue over 6 years ago
QasimH commented over 6 years ago

Dear Sir/Madam,

I compiled and simulated your code on Quartus Prime. I compared the encryption result with software versions of XTEA (using the same KEY, Plaintext and same number of feistel rounds). What I discovered was that the results for the two versions (software XTEA and hardware XTEA) were very different from each other.

I then later used an rtl simulator to simulate your code from which I encrypted and decrypted a binary text. what I discovered was that I was not able to achieve the original binary text after it was encrypted i.e. the encrypted text was not decrypted back to the original.

I am not sure if the issue is with the code or if I am missing something in all of this.

I was hoping if you could help me clarify on this. Has the code been validated? And has the code been tested with encryption and decryption using a plaintext (.doc, .txt or any other formats) and if so could I kindly request the results that were obtained

Kind regards.

entactogenic was assigned over 6 years ago
Greg_SA commented over 6 years ago

There are some issues in this code. I have compared the results of this VHDL core with software based XTEA, and the results differ.

I have made some changes to the VHDL, and it is working now.

The main issue is in the test bench, which waits for 464 clock cycles before testing the output. It should only wait for 432 cycles.

The recommended/standard XTEA implementations use 64 Feistel rounds which is 32 cycles.

The other issue is the way in which the key and input data is presented - this is not very clear. Most software implementations use a byte sequence, while this code uses 128 and 64 bit vectors. So the mapping of the bytes to the vectors should have a proper description.

I will soon provide updated code with comments that explain how to use it properly.

QasimH commented over 6 years ago

Dear Dreijer,

Has the code been updated? I compared the current code with the previous code and did not find any difference between the two.

Kind regards,


Assignee
entactogenic
Labels
Bug