186df3a655
fiat-crypto only generates fe_mul and fe_sq, but the original Ed25519 implementation we had also had fe_sq2 for computing 2*f^2. Previously, we inlined a version of fe_mul. Instead, we could implement it with fe_sq and fe_add. Performance-wise, this seems to not regress. If anything, it makes it faster? Before (clang, run for 10 seconds): Did 243000 Ed25519 key generation operations in 10025910us (24237.2 ops/sec) Did 250000 Ed25519 signing operations in 10035580us (24911.4 ops/sec) Did 73305 Ed25519 verify operations in 10071101us (7278.7 ops/sec) Did 184000 Curve25519 base-point multiplication operations in 10040138us (18326.4 ops/sec) Did 186000 Curve25519 arbitrary point multiplication operations in 10052721us (18502.5 ops/sec) After (clang, run for 10 seconds): Did 242424 Ed25519 key generation operations in 10013117us (24210.6 ops/sec) Did 253000 Ed25519 signing operations in 10011744us (25270.3 ops/sec) Did 73899 Ed25519 verify operations in 10048040us (7354.6 ops/sec) Did 194000 Curve25519 base-point multiplication operations in 10005389us (19389.6 ops/sec) Did 195000 Curve25519 arbitrary point multiplication operations in 10028443us (19444.7 ops/sec) Before (clang + OPENSSL_SMALL, run for 10 seconds): Did 144000 Ed25519 key generation operations in 10019344us (14372.2 ops/sec) Did 146000 Ed25519 signing operations in 10011653us (14583.0 ops/sec) Did 74052 Ed25519 verify operations in 10005789us (7400.9 ops/sec) Did 150000 Curve25519 base-point multiplication operations in 10007468us (14988.8 ops/sec) Did 91392 Curve25519 arbitrary point multiplication operations in 10057678us (9086.8 ops/sec) After (clang + OPENSSL_SMALL, run for 10 seconds): Did 144000 Ed25519 key generation operations in 10066724us (14304.6 ops/sec) Did 148000 Ed25519 signing operations in 10062043us (14708.7 ops/sec) Did 74820 Ed25519 verify operations in 10058557us (7438.4 ops/sec) Did 151000 Curve25519 base-point multiplication operations in 10063492us (15004.7 ops/sec) Did 90402 Curve25519 arbitrary point multiplication operations in 10049141us (8996.0 ops/sec) Change-Id: I31e9f61833492c3ff2dfd78e1dee5e06f43c850f Reviewed-on: https://boringssl-review.googlesource.com/24724 Reviewed-by: Adam Langley <agl@google.com> |
||
---|---|---|
.github | ||
crypto | ||
decrepit | ||
fipstools | ||
fuzz | ||
include/openssl | ||
infra/config | ||
ssl | ||
third_party | ||
tool | ||
util | ||
.clang-format | ||
.gitignore | ||
API-CONVENTIONS.md | ||
BUILDING.md | ||
CMakeLists.txt | ||
codereview.settings | ||
CONTRIBUTING.md | ||
FUZZING.md | ||
INCORPORATING.md | ||
LICENSE | ||
PORTING.md | ||
README.md | ||
sources.cmake | ||
STYLE.md |
BoringSSL
BoringSSL is a fork of OpenSSL that is designed to meet Google's needs.
Although BoringSSL is an open source project, it is not intended for general use, as OpenSSL is. We don't recommend that third parties depend upon it. Doing so is likely to be frustrating because there are no guarantees of API or ABI stability.
Programs ship their own copies of BoringSSL when they use it and we update everything as needed when deciding to make API changes. This allows us to mostly avoid compromises in the name of compatibility. It works for us, but it may not work for you.
BoringSSL arose because Google used OpenSSL for many years in various ways and, over time, built up a large number of patches that were maintained while tracking upstream OpenSSL. As Google's product portfolio became more complex, more copies of OpenSSL sprung up and the effort involved in maintaining all these patches in multiple places was growing steadily.
Currently BoringSSL is the SSL library in Chrome/Chromium, Android (but it's not part of the NDK) and a number of other apps/programs.
There are other files in this directory which might be helpful:
- PORTING.md: how to port OpenSSL-using code to BoringSSL.
- BUILDING.md: how to build BoringSSL
- INCORPORATING.md: how to incorporate BoringSSL into a project.
- API-CONVENTIONS.md: general API conventions for BoringSSL consumers and developers.
- STYLE.md: rules and guidelines for coding style.
- include/openssl: public headers with API documentation in comments. Also available online.
- FUZZING.md: information about fuzzing BoringSSL.
- CONTRIBUTING.md: how to contribute to BoringSSL.