commit | 3fd8220e3c88365627ecd1af7c29f5096ff9cefd | [log] [tgz] |
---|---|---|
author | David Benjamin <davidben@google.com> | Sat Jul 05 21:34:16 2025 -0400 |
committer | Boringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Jul 07 11:34:32 2025 -0700 |
tree | b9e19bacddeaf5c2e1e08cb26e94d3cebbb0342f | |
parent | 913c14be725d9c9081b24ba1a2b81d14a3e8a179 [diff] |
Drop the RSA, DSA, and DH DoS limits to 8,192 bits RSA-8192 is already too big. This avoids needing to worry about bn_mul_mont allocating more than a page of stack memory, makes it a lot more comfortable to just stack-allocate all Montgomery temporaries. Also RSA operations scale quadratically or cubicly. For reference, on my machine: Did 1638 RSA 2048 signing operations in 1015740us (1612.6 ops/sec) Did 82000 RSA 2048 verify (same key) operations in 1000238us (81980.5 ops/sec) Did 70000 RSA 2048 verify (fresh key) operations in 1001850us (69870.7 ops/sec) Did 13580 RSA 2048 private key parse operations in 1013849us (13394.5 ops/sec) Did 611 RSA 3072 signing operations in 1038497us (588.4 ops/sec) Did 39000 RSA 3072 verify (same key) operations in 1009250us (38642.6 ops/sec) Did 34000 RSA 3072 verify (fresh key) operations in 1005116us (33826.9 ops/sec) Did 7799 RSA 3072 private key parse operations in 1016058us (7675.7 ops/sec) Did 276 RSA 4096 signing operations in 1008941us (273.6 ops/sec) Did 23000 RSA 4096 verify (same key) operations in 1029290us (22345.5 ops/sec) Did 20000 RSA 4096 verify (fresh key) operations in 1006214us (19876.5 ops/sec) Did 5137 RSA 4096 private key parse operations in 1001233us (5130.7 ops/sec) Did 39 RSA 8192 signing operations in 1012397us (38.5 ops/sec) Did 6039 RSA 8192 verify (same key) operations in 1061168us (5690.9 ops/sec) Did 5181 RSA 8192 verify (fresh key) operations in 1000616us (5177.8 ops/sec) Did 1749 RSA 8192 private key parse operations in 1074560us (1627.6 ops/sec) Did 6 RSA 16834 signing operations in 1147874us (5.2 ops/sec) Did 1562 RSA 16834 verify (same key) operations in 1086732us (1437.3 ops/sec) Did 1386 RSA 16834 verify (fresh key) operations in 1057798us (1310.3 ops/sec) Did 440 RSA 16834 private key parse operations in 1039747us (423.2 ops/sec) This change removes our exposure to the last of these. Also align limits for legacy DSA and DH so that Montgomery reduction can rely on this. Update-Note: This lowers our maximum key sizes: - The maximum RSA modulus size is now 8,192 bits, down from 16,384 bits - The maximum DSA p is now 8,192 bits, down from 10,000 bits - The maximum DH p is now 8,192 bits, down from 10,000 bits Fixed: 402677800 Change-Id: I52c0205af568b66a2fbc586b1c7300e13a47c7ab Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/80287 Auto-Submit: David Benjamin <davidben@google.com> Commit-Queue: David Benjamin <davidben@google.com> Commit-Queue: Adam Langley <agl@google.com> Reviewed-by: Adam Langley <agl@google.com>
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.
Project links:
To file a security issue, use the Chromium process and mention in the report this is for BoringSSL. You can ignore the parts of the process that are specific to Chromium/Chrome.
There are other files in this directory which might be helpful: