-
Notifications
You must be signed in to change notification settings - Fork 120
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
Support Armv8.5 RNDR as prediction resistance #2029
Merged
torben-hansen
merged 14 commits into
aws:randomness_generation
from
torben-hansen:rndr_support
Dec 13, 2024
Merged
Support Armv8.5 RNDR as prediction resistance #2029
torben-hansen
merged 14 commits into
aws:randomness_generation
from
torben-hansen:rndr_support
Dec 13, 2024
+303
−19
Conversation
This file contains 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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## randomness_generation #2029 +/- ##
======================================================
Coverage 78.71% 78.72%
======================================================
Files 606 608 +2
Lines 102759 102774 +15
Branches 14578 14582 +4
======================================================
+ Hits 80887 80908 +21
+ Misses 21161 21156 -5
+ Partials 711 710 -1 ☔ View full report in Codecov by Sentry. |
dkostic
reviewed
Dec 4, 2024
dkostic
reviewed
Dec 10, 2024
… instead for unsigned integers.
torben-hansen
force-pushed
the
rndr_support
branch
from
December 12, 2024 16:13
3f63139
to
33577f8
Compare
dkostic
previously approved these changes
Dec 12, 2024
dkostic
reviewed
Dec 12, 2024
nebeid
reviewed
Dec 12, 2024
nebeid
reviewed
Dec 12, 2024
nebeid
reviewed
Dec 13, 2024
nebeid
approved these changes
Dec 13, 2024
dkostic
approved these changes
Dec 13, 2024
torben-hansen
merged commit Dec 13, 2024
414cd0f
into
aws:randomness_generation
107 of 116 checks passed
torben-hansen
added a commit
to torben-hansen/aws-lc
that referenced
this pull request
Dec 13, 2024
Adds Arm as a hardware source for prediction resistance, if supported. This covers Linux+Armv8.5-A that impements rndr. For exmaple, this should be enabled on Graviton3/Graviton4+Amazon Linux. Note, only multiples of 8 are supported. That's what we need now and I don't see that need changing.
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.
Description of changes:
Adds Arm as a hardware source for prediction resistance, if supported. This covers Linux+Armv8.5-A that impements
rndr
. For exmaple, this should be enabled on Graviton3/Graviton4+Amazon Linux.Note, only multiples of 8 are supported. That's what we need now and I don't see that need changing.
Call-outs:
Wrap the libcrypto inlined functions to workaround the Arm capability vector having internal linkage.
Apple doesn't implement
FEAT_RNG
on any of their M's. Might be able to implement for Windows. But I don't see a way to probe for the instruction here https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-isprocessorfeaturepresent.Added
s3_3_c2_c4_0
as a known symbol to the delocator to avoid it from interpreting the string as an external symbol that needs a trampoline... It's not really a symbol... And this was the quickest way to move forward.Testing:
Tested that the function is executed successfully on a Graviton3 instance. This might also be executed through codebuild depending on which instances are spawned.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.