Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Padding was calculated incorrectly #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Dzitu
Copy link

@Dzitu Dzitu commented Jun 27, 2017

in case size was multiple of N_BLOCK full block of padding should be used. Instead no padding was applied. Issue is fixed now.

…CK. Full block of padding should be used. Instead no padding was applied.
@spaniakos
Copy link
Owner

will review and approve! thanks

@spaniakos
Copy link
Owner

your suggestion is correct
but there is a problem
we need to modify the bool AES::CheckPad(byte* in,int lsize) as well.
You are free to do it if you want so i can accept the code, or i will make the changes.

thank you.

palto42 added a commit to palto42/AES that referenced this pull request May 7, 2018
Combined proposed fixes of pull requests spaniakos#15 and spaniakos#16 plus the required change of the function `AES::CheckPad(byte* in,int lsize)`.
The function `AES::calc_size_n_pad`could be simplified by combining spaniakos#15 and spaniakos#16 and also ` `AES::CheckPad` is simpler because there is always padding added.
The definition of `byte arr_pad` in `AES.h` must also be aligned for the extra padding value 0x10.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants