Closed igorcoroli closed 6 years ago
Thanks for info, I will take a look at that and see what I can do. I have to verify the it really is a problem.
Pls use pull request next time. Thanks!
You probably used input data which were not correctly padded. In the version you reported the input data has to be aligned on the block size.
The original ./main
worked only in plain ECB mode which is highly discouraged to use in practice.
For demonstration purposes, I implemented also PKCS5 padding and CBC mode - ready in master.
There are some unittests run by Travis.
The problem is at line 379 on return of the function: long int iter2comp = min(iters, (long int) ceil((float)bRead / N_BYTES));
The entire iter2comp is coming with one more element. Workaround: long int iter2comp = (min (iters, (long int) ceil ((float) bRead / N_BYTES)) - 1);