12718 Commits

Author SHA1 Message Date
Brian Smith
f3b8acf010 Ignore BoringSSL '5e356a8'..'0586618' 2023-09-28 12:08:22 -07:00
Brian Smith
c93317d75e Skip BoringSSL 'a9ce915': Add ABI tests for bn_add_words, etc.
*ring* doesn't incoroprate the ABI tests (unfortunately).
2023-09-28 12:07:07 -07:00
Brian Smith
4cffc8548a Skip BoringSSL 'd4396e3': Avoid branches in GCC in bn/generic.c.
*ring* doesn't use bn/generic.c.
2023-09-28 12:06:24 -07:00
Brian Smith
0671a90267 Partial merge of BoringSSL 'd1b4516': Add bn_add_words and bn_sub_words assembly for aarch64.
Bring in the new code as we'll likely use it soon, but not now.

Merged as-is except with the "arm_arch.h" include changed to what we need.
2023-09-28 12:05:52 -07:00
Brian Smith
88572523e3 Skip BoringSSL '3a16df9'.
*ring* doesn't use bn/generic.c. Instead it uses limbs.c. Likely we need to
optimize limbs.c but not now.
2023-09-28 12:04:02 -07:00
Brian Smith
bcb347b975 No-op merge of BoringSSL '8f220ec'.
We don't have padding.c yet.
2023-09-28 11:51:08 -07:00
Brian Smith
1d98a7975f Ignore BoringSSL '210674b'. 2023-09-28 11:49:26 -07:00
Brian Smith
8166b6855f Merge BoringSSL '53b876a'.
The *ring* counterpart to `copy_from_prebuf` is `LIMBS_select_512_32`
which is already written very (too?) conservatively w.r.t. compiler-
introduced side channels. I inspected the generated code before/after
adding additional `value_barrier_w` and it made no difference.
2023-09-28 11:47:45 -07:00
Brian Smith
25c999046b Ignore BoringSSL '1967621'..'aa83c12'. 2023-09-28 11:07:20 -07:00
Brian Smith
0be8d58a4e
Merge pull request #1654 from briansmith/b/merge-boringssl-13
Merge BoringSSL through a43c76dbe30d619188dc685b7d432a92e7c2b66b
2023-09-28 11:02:25 -07:00
Brian Smith
a02e49b0b0 Use ring-core/arm_arch.h in aesv8-gcm-armv8.pl.
The code isn't used yet but we should avoid the openssl/ include before
we forget it is there.
2023-09-28 10:44:07 -07:00
Brian Smith
102f6719aa Remove gratuitous change to LICENSE.
These additions break people's `cargo deny` jobs. The actual license
isn't affected by the change that updated LICENSE; it just added some
of Google's internal tracking numbers. Those numbers are not useful to
us. The next time we update LICENSE for an important reason we should
remove all the tracking numbers.
2023-09-28 09:26:50 -07:00
Brian Smith
78b0af8531 Take BoringSSL 'a43c76d': Work around nasm bug with empty assembly files 2023-09-27 22:48:05 -07:00
Brian Smith
6452e740f6 Ignore BoringSSL '70690f7'..'4a264b2'. 2023-09-27 22:47:33 -07:00
Brian Smith
f1668276c8 Merge BoringSSL '0d5b608': Maintain a frame pointer in aesni-gcm-x86_64.pl and add SEH unwind codes 2023-09-27 22:46:28 -07:00
Brian Smith
70bdc19072 Ignore BoringSSL '1c9d183'. 2023-09-27 22:44:13 -07:00
Brian Smith
2653466c80 Take BoringSSL 'ae1546b': Convert ghash-x86_64.pl to new directives. 2023-09-27 22:43:45 -07:00
Brian Smith
2eccbdf001 Merge BoringSSL 'c556ee9': Add initial support for SEH directives in x86_64 perlasm. 2023-09-27 22:43:26 -07:00
Brian Smith
9a762139a5 Ignore BoringSSL '45b8d7b'..'ba68ca0'. 2023-09-27 22:42:21 -07:00
Brian Smith
29ae0f1806 Merge BoringSSL 'aa18fe2': Indent DB lines in x86_64 NASM output. 2023-09-27 22:41:37 -07:00
Brian Smith
aeee2d5823 Ignore BoringSSL 'fc07738'..'114fa72'. 2023-09-27 22:41:00 -07:00
Brian Smith
b0afb00eb8 Partial merge of BoringSSL 'c6e3780': Add optimised Aarch64 GCM.
Bring in the new assembly language code but do not start using it yet.
The changes to enable it will be done later.
2023-09-27 22:40:18 -07:00
Brian Smith
35e1748119 Ignore BoringSSL '5f6d57a'..'1f2529d'. 2023-09-27 21:23:28 -07:00
Brian Smith
a6ff12be89 Take BoringSSL '90e3b6e': Add prefetch to aesni_ctr32_ghash_6x. 2023-09-27 21:17:23 -07:00
Brian Smith
dc3bdd8c34 Ignore BoringSSL 'c3197fc'..'837ade7'. 2023-09-27 21:16:50 -07:00
Brian Smith
c82566dea0 Merge BoringSSL 'cdccbe1': Fully condition all assembly files. 2023-09-27 21:15:24 -07:00
Brian Smith
21289d3dcd Ignore BoringSSL 'e0d601a'..'7cb90e0' 2023-09-27 21:04:15 -07:00
Brian Smith
4c6fe71650 No-op merge of BoringSSL 'db10ae5': Cap Montgomery moduli to 8 KiB.
This is the same limit we already implement.
2023-09-27 21:02:10 -07:00
Alexis (Poliorcetics) Bourget
7bbc307f57 deps: Move from winapi to windows-sys
`winapi` is in maintenance mode and the new blessed way to access Windows APIs are the `windows`
and `windows-sys` crates. I don't think any types of `winapi` were exposed in the public API so
I used `windows-sys` since it has much faster compile times.
2023-09-26 19:40:45 -07:00
Brian Smith
cfbd46b774 32-bit ARM AES-GCM: Fix use of BSAES.
The slice indexing was wrong. CI did not catch this because it only
uses the implementations that the feature detection logic chooses,
and in CI it uses the emulator that always chooses the hardware AES
implementation.

The consequence is that on 32-bit ARM targets with NEON but without
hardware AES, the encryption/decryption is done incorrectly.

The change that introduced this problem was
74aa79b650f8a1f751993a56046ca43166ae9934. I checked (and tested) the
latest release (0.16.20) to verify that it is correct. So this only
affects 0.17, which wasn't been released yet.

The fix mirrors what we were doing before in 0.16.20.
2023-09-26 19:39:52 -07:00
Brian Smith
38409e109b NFC: Minimize visibility of aes::Key. 2023-09-26 19:39:52 -07:00
Brian Smith
8020c1b634 Tests: Move bigint tests to where BoringSSL puts them.
BoringSSL split up there bn_tests.txt into multiple files, which we had
done previously. Prepare to merge that BoringSSL change by putting the
test input files in the same places.
2023-09-26 19:39:52 -07:00
Bob Beck
d24a38200f Sync pki to chromium eddbcb143c7462e0b8d60e859b96d678ca0c013c
This removes one more patch, and adapts import to deal with gmock from chrome
which is now included in boring.

Bug: chromium:1322914
Change-Id: I2a5957f741252941fea76205a21e98fd655f8cae
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/63225
Commit-Queue: Adam Langley <agl@google.com>
Auto-Submit: Bob Beck <bbe@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2023-09-27 02:13:00 +00:00
Brian Smith
f9378e8ed5 NFC: Move low-level Montgomery arithmetic out of bigint.
When the `alloc` feature is disabled, on lesser-used targets we don't
build `bigint` but we still need some of the Montgomery arithmetic.

```
 git diff \
    HEAD^1:src/arithmetic/bigint/bn_mul_mont_fallback.rs \
    src/arithmetic/montgomery.rs
```

```
 git diff \
    HEAD^1:src/arithmetic/bigint.rs \
    src/arithmetic/montgomery.rs
```
2023-09-26 17:45:59 -07:00
David Benjamin
764e6a319b Stop rewriting ret to repz ret on x86_64
This is an old workaround from the AMD K8 days. GCC stopped doing it for
their generic output in 2017.
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=4ca47ced33cc0d6f9e336930d628a6fdbf22f6e2

b/65150507#comment2 says LLVM has never done it.

We can retire this now and recover a small handful of bytes.

Change-Id: I37ef47038b6b3a1a7500bcea8cbd1beefc83121c
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/63205
Auto-Submit: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Bob Beck <bbe@google.com>
2023-09-26 19:51:28 +00:00
Brian Smith
b04bed15be
Merge pull request #1651 from briansmith/b/merge-boringssl-11
Merge BoringSSL through 27e45c43420125ed293d4646ddf8ff2c321f01b9
2023-09-26 08:39:48 -07:00
Alice Wang
cfcb954901 Make bssl-crypto no_std compatible
Bug: 649
Change-Id: Ib47e843496e58a5cdb3cd04b3929e0a08ba09744
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/63145
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
2023-09-25 18:20:34 +00:00
Brian Smith
0ae93f0b15 No-op merge of BoringSSL '27e45c4'. 2023-09-24 16:01:45 -07:00
Brian Smith
62655ad141 Merge BoringSSL '7ab49bf': Fix comments now BN_mod_exp_mont_consttime is not cache-line-sensitive. 2023-09-24 16:01:13 -07:00
Brian Smith
4a8ea2a832 Skip BoringSSL 'a880d2a'. 2023-09-24 15:53:00 -07:00
Brian Smith
9e93637357 Merge BoringSSL 'e0bb21b': Update x86_64-mont5.pl and RSAZ comments a bit. 2023-09-24 15:49:52 -07:00
Brian Smith
6c90cce7b8 Ignore BoringSSL 'a1dffbf'..'e5c86b7'. 2023-09-24 15:46:46 -07:00
Brian Smith
6678808009 Merge BoringSSL '7ac94aa': More -Wshorten-64-to-32 fixes. 2023-09-24 15:43:35 -07:00
Brian Smith
ba1c0f5934 Ignore BoringSSL '41eb357'..'dd81bf7'. 2023-09-24 15:42:15 -07:00
Brian Smith
20b1810a3b Merge BoringSSL '0faffc7': Fix the comment in ecp_nistz256_ord_sqr_mont to match code and prototype. 2023-09-24 15:40:07 -07:00
Brian Smith
6874e555a5 Ignore BoringSSL '361e3e0'..'6b785f6'. 2023-09-24 15:36:50 -07:00
Brian Smith
00401a0afe Skip BoringSSL '91e0b11'. 2023-09-24 15:33:18 -07:00
Brian Smith
97a526c010 Merge BoringSSL '1b2b7b2': Various -Wshorten-64-to-32 fixes. 2023-09-24 15:31:41 -07:00
Brian Smith
b08f7da343 Ignore BoringSSL 'fd52296'..'bbd9f18' 2023-09-24 15:27:42 -07:00
Brian Smith
75d34bc1a8 Merge BoringSSL 7b2795a: Replace even more ad-hoc bytes/integer conversions. 2023-09-24 15:26:51 -07:00