Skip to content
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

Fix 32-bit big-endian p521 bug #1240

Merged
merged 7 commits into from
Oct 18, 2023
Merged

Fix 32-bit big-endian p521 bug #1240

merged 7 commits into from
Oct 18, 2023

Conversation

justsmth
Copy link
Contributor

Issues:

N/A

Description of changes:

  • Fixes 32-bit big-endian bug in P521.
    • P521_NLIMBS is 19, but the EC_FELEM type only contains EC_MAX_WORDS (= 17) words.

Call-outs:

N/A

Testing:

❮ ppc-qemu.sh ./crypto/crypto_test --gtest_filter="EC*.*:*/EC*.*"                         
Note: Google Test filter = EC*.*:*/EC*.*
[==========] Running 156 tests from 6 test suites.
[----------] Global test environment set-up.
[----------] 7 tests from ECDHTest
...
[----------] 80 tests from All/ECCurveTest (7543 ms total)

[----------] Global test environment tear-down
[==========] 156 tests from 6 test suites ran. (407363 ms total)
[  PASSED  ] 156 tests.

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.

@justsmth justsmth requested a review from a team as a code owner October 10, 2023 22:17
@andrewhop andrewhop requested a review from dkostic October 10, 2023 22:43
@justsmth justsmth enabled auto-merge (squash) October 11, 2023 01:12
@@ -109,7 +109,7 @@ OPENSSL_STATIC_ASSERT(EC_MAX_WORDS <= BN_SMALL_MAX_WORDS,
// An EC_SCALAR is an integer fully reduced modulo the order. Only the first
// |order->width| words are used. An |EC_SCALAR| is specific to an |EC_GROUP|
// and must not be mixed between groups.
typedef union {
typedef struct {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have been done as part of the upstream merge of #1177.

@justsmth justsmth merged commit bce94dc into aws:main Oct 18, 2023
5 checks passed
@justsmth justsmth deleted the p532-be-32 branch October 18, 2023 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants