Merge BoringSSL 9855c1c: Add a constant-time fallback GHASH implementation. #973
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.
ring tries to work without type-punning
memcpy
, so the use of thatin
GFp_gcm_ghash_nohw
was replaced by the use ofu64_from_be_bytes
.This will (I hope) also help with the eventual support for big-endian
targets. Here's the diff from BoringSSL in that function:
During the merge, I found that
GFp_gcm_gmult_clmul
had its.cfi_startproc
on the wrong line. I fixed that as part of the merge.During my review of the BoringSSL changes, I noticed that BoringSSL had
left some of the dead code in ghash-x86_64.pl, which had previously been
removed in ring. That removal is being done in BoringSSL in [1].
[1] https://boringssl-review.googlesource.com/c/boringssl/+/41144