Repository navigation
support encrypt-then-mac (etm) MACs - #987
Merged
Merged
Conversation
Support for calculating MAC (message authentication code) on encrypted data instead of plain text data. This adds support for the following MACs: [email protected] [email protected] [email protected] Integration-patches-by: Viktor Szakats * rebase on master * fix checksrc warnings * fix compiler warnings * fix indent/whitespace/eol * merge with AES-GCM patch Closes libssh2#655 Closes libssh2#987
Member
Author
|
@palmin: After merging the AES-GCM patch (#797) by @dfandrich, I've rebased your ETM-MAC patch onto it. Can you review / test it, if there is any issues to address? A critical area is |
Contributor
|
Take a look at the dfandrich/shellfish branch. That had both the ETM and
AES-GCM code merged as of a few months ago. IIRC, there was only one place were
I was able to reasonably merge loops.
|
Member
Author
|
@dfandrich Thank you, looking into it. |
```
src/transport.c:262:30: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
262 | if(blocksize < decrypt_size) {
| ^
```
```
src/transport.c:503:25: error: comparison of integer expressions of different signedness: ‘ssize_t’ {aka ‘long int’} and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
503 | if(numbytes < required_size) {
| ^
```
Member
Author
|
That loop deduped. All went smooth. This PR is effectively on par with |
This was referenced Apr 20, 2023
Member
Author
|
@palmin Managed to mess up attribution in the final commit. I apologize. |
1 of 12 tasks
agreppin
pushed a commit
to agreppin/libssh2
that referenced
this pull request
Jul 14, 2024
Support for calculating MAC (message authentication code) on encrypted data instead of plain text data. This adds support for the following MACs: - `[email protected]` - `[email protected]` - `[email protected]` Integration-patches-by: Viktor Szakats * rebase on master * fix checksec warnings * fix compiler warning * fix indent/whitespace/eol * rebase/manual merge onto AES-GCM patch libssh2#797 * more manual merge of `libssh2_transport_send()` based on dfandrich/shellfish Fixes libssh2#582 Closes libssh2#655 Closes libssh2#987
vszakats
added a commit
that referenced
this pull request
Jun 15, 2026
Spotted by GitHub Code Quality Follow-up to 0048f30 #987 Refs: https://github.com/libssh2/libssh2/pull/655/files#diff-230448d52506d4e318b43c34773bd5624e3a6883aad330f3b1c20d420214e4adR569-R579 63805b9#diff-230448d52506d4e318b43c34773bd5624e3a6883aad330f3b1c20d420214e4adR551-R560 Closes #2056
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support for calculating MAC (message authentication code) on encrypted
data instead of plain text data.
This adds support for the following MACs:
[email protected][email protected][email protected]Integration-patches-by: Viktor Szakats
libssh2_transport_send()basedon dfandrich/shellfish
Fixes #582
Closes #655
Closes #987
After rebasing to AES-GCM, the whitespace-free diff is recommended for a clearer view:
https://github.com/libssh2/libssh2/pull/987/files?w=1