-
Notifications
You must be signed in to change notification settings - Fork 57
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
Be compatible to the updated botan's behaviour related to botan_cipher_update(). #2240
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2240 +/- ##
========================================
Coverage 83.60% 83.60%
========================================
Files 106 107 +1
Lines 22964 23174 +210
========================================
+ Hits 19198 19374 +176
- Misses 3766 3800 +34 ☔ View full report in Codecov by Sentry. |
b85d93c
to
0cb2663
Compare
c1eeda6
to
5cbf852
Compare
5cbf852
to
94ba422
Compare
…ss the whole input.
…-c13 naming scheme.
94ba422
to
8eae86f
Compare
@maxirmx Don't you mind that I picked here your commit, fixing macOS/Python issue? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* @return true on success or false otherwise. On success exactly len processed bytes will be | ||
* stored in out buffer | ||
*/ | ||
bool pgp_cipher_aead_update(pgp_crypt_t *crypt, uint8_t *out, const uint8_t *in, size_t len); | ||
bool pgp_cipher_aead_update( | ||
pgp_crypt_t &crypt, uint8_t *out, const uint8_t *in, size_t len, size_t &read); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to change pointer to reference here? It will be weird from user perspective if other functions use pointer but this one not.
@@ -54,7 +54,7 @@ | |||
#define ST_FROM ("From") | |||
|
|||
/* Preallocated cache length for AEAD encryption/decryption */ | |||
#define PGP_AEAD_CACHE_LEN (PGP_INPUT_CACHE_SIZE + PGP_AEAD_MAX_TAG_LEN) | |||
#define PGP_AEAD_CACHE_LEN (PGP_INPUT_CACHE_SIZE + 2 * PGP_AEAD_MAX_TAG_LEN) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, why 2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found my answer in stream-write.cpp :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is to include the tag for the last block + the final tag after the encrypted stream.
Two approvals so merhing this. Thanks all! |
Looks like this commit changes behaviour to which we were stick for years:
randombit/botan@8336835
Fixes #2245