Skip to content
This repository was archived by the owner on Mar 5, 2024. It is now read-only.

Conversation

@rob-brown
Copy link
Contributor

When decrypting with CBC mode, the in and out buffers should be the same size. Even though the IV and ciphertext are contiguous, the in buffer points to the first byte of the ciphertext. The sanity check has been updated accordingly.

Because of this error, the CBC mode tests are reporting the wrong size for the decrypted buffer (80 - 16 - 16 == 48 != 64). This has been corrected.

Also, since the loop in the decryption is writing to the out buffer, the loop conditional has been changed to n < outlen. This should avoid any future errors if inlen changes so that it’s no longer equal to outlen.

When decrypting with CBC mode, the in and out buffers should be the same size. Even though the IV and ciphertext are contiguous, the in buffer points to the first byte of the ciphertext. The sanity check has been updated accordingly.

Because of this error, the CBC mode tests are reporting the wrong size for the decrypted buffer (80 - 16 - 16 == 48 != 64). This has been corrected.

Also, since the loop in the decryption is writing to the out buffer, the loop conditional has been changed to `n < outlen`.  This should avoid any future errors if `inlen` changes so that it’s no longer equal to `outlen`.
@hackermnementh hackermnementh merged commit 8a35f17 into intel:master Sep 2, 2017
@hackermnementh
Copy link
Contributor

Many thanks for the patch!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants