Skip to content

Commit

Permalink
Merge pull request #1658 from briansmith/b/merge-boringssl-15
Browse files Browse the repository at this point in the history
Merge BoringSSL through 4c8bcf0
  • Loading branch information
briansmith authored Sep 28, 2023
2 parents 2e5a55e + af45ee2 commit bc5d2c3
Show file tree
Hide file tree
Showing 11 changed files with 4,097 additions and 813 deletions.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,10 @@ include = [
"tests/rsa_test_public_modulus.bin",
"third_party/fiat/curve25519_32.h",
"third_party/fiat/curve25519_64.h",
"third_party/fiat/curve25519_64_msvc.h",
"third_party/fiat/p256_32.h",
"third_party/fiat/p256_64.h",
"third_party/fiat/p256_64_msvc.h",
"third_party/fiat/LICENSE",
"third_party/NIST/SHAVS/SHA1LongMsg.rsp",
"third_party/NIST/SHAVS/SHA1Monte.rsp",
Expand Down
10 changes: 6 additions & 4 deletions crypto/curve25519/curve25519.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,16 @@
// Various pre-computed constants.
#include "./curve25519_tables.h"

#if defined(BORINGSSL_CURVE25519_64BIT)
#if defined(BORINGSSL_HAS_UINT128)
#if defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wpedantic"
#endif
#include "../../third_party/fiat/curve25519_64.h"
#elif defined(OPENSSL_64_BIT)
#include "../../third_party/fiat/curve25519_64_msvc.h"
#else
#include "../../third_party/fiat/curve25519_32.h"
#endif // BORINGSSL_CURVE25519_64BIT
#endif


// Low-level intrinsic operations
Expand All @@ -75,7 +77,7 @@ static uint64_t load_4(const uint8_t *in) {

// Field operations.

#if defined(BORINGSSL_CURVE25519_64BIT)
#if defined(OPENSSL_64_BIT)

// assert_fe asserts that |f| satisfies bounds:
//
Expand Down Expand Up @@ -149,7 +151,7 @@ static uint64_t load_4(const uint8_t *in) {
} \
} while (0)

#endif // BORINGSSL_CURVE25519_64BIT
#endif // OPENSSL_64_BIT

OPENSSL_STATIC_ASSERT(sizeof(fe) == sizeof(fe_limb_t) * FE_NUM_LIMBS,
"fe_limb_t[FE_NUM_LIMBS] is inconsistent with fe");
Expand Down
Loading

0 comments on commit bc5d2c3

Please sign in to comment.