10803 Commits

Author SHA1 Message Date
Brian Smith
075b129f8b Skip BoringSSL 8640b41: Test ECDSA signing is non-deterministic.
*ring* PR #1239 proposes similar tests.
2021-03-24 17:43:58 -07:00
Brian Smith
3b1864a071
Merge pull request #1240 from briansmith/b/merge-boringssl
Merge BoringSSL through bc0a4f1.
2021-03-24 17:24:31 -07:00
Brian Smith
5db2df2d9a ChaCha internals: Clarify usage of internal value of Key.
The compiler complained that `words` is never read in situations where
it is passed to the assembly code as a `Key`, relying on `Key` being
`#[repr(transparent)]`.

We've been moving away from using `repr(transparent)` for these kinds of types. Do
that here to solve this problem and also to continue that general trend. Use
`words_less_safe()` instead of directly accessing `words` to reduce the amount of
conditional logic.
2021-03-24 16:51:01 -07:00
Brian Smith
cd492d2129 Ignore BoringSSL f6bd54e..bc0a4f1. 2021-03-24 16:19:45 -07:00
Brian Smith
b48609fe8d Ignore BoringSSL e7c0c97: Don't overflow the output length in EVP_CipherUpdate calls. 2021-03-24 16:16:01 -07:00
Brian Smith
201cf72422 Skip BoringSSL ce9b002 Align the ARM capability functions.
*ring* issue #1237 tracks similar work.
2021-03-24 16:08:46 -07:00
Brian Smith
3254c83e13 Temporarily skip BoringSSL f9bd455: Skip runtime NEON checks if __ARM_NEON is defined.
*ring* issue #1237 tracks similar improvements.
2021-03-24 16:07:53 -07:00
Brian Smith
7d9c70b6b4
Merge pull request #1235 from briansmith/b/merge-boringssl
Merge BoringSSL through fc23300.
2021-03-24 15:36:26 -07:00
Brian Smith
9b9603ecf7 Ignore BoringSSL 5d54832..fc23300. 2021-03-24 14:58:47 -07:00
Brian Smith
3fd2cb2c27 Merge perlasm part of BoringSSL afd5dba: Add ASM optimizations for Windows on Arm.
The CPU feature detection will be done in a similar way in the future, but in Rust.
2021-03-24 14:51:35 -07:00
Brian Smith
739a644ff6 Ignore BoringSSL 76164b1..571c3e7. 2021-03-24 14:49:22 -07:00
Brian Smith
5389ed898a Take BoringSSL c42baf8: delocate: eliminate expression from vpaes assembly. 2021-03-24 14:47:50 -07:00
Brian Smith
08726b1281 Ignore BoringSSL 4f75b76..e484375. 2021-03-24 14:47:27 -07:00
Brian Smith
416576c04b No-op merge BoringSSL 9422ac6: Fix chacha20_poly1305_x86_64.pl comments.
These changes were already made in *ring* previously.
2021-03-24 14:46:53 -07:00
Brian Smith
b1093d599d Ignore BoringSSL 60926d3..bac5544. 2021-03-24 14:44:40 -07:00
Brian Smith
db019020eb ECC internals: Rename elem_equals to elem_equals_vartime. 2021-03-24 14:40:58 -07:00
Brian Smith
708a504c69 ECC internals: Avoid reimplementing slice equality. 2021-03-24 14:40:58 -07:00
Brian Smith
2be8976f70 AEAD internals: Have each AEAD key type remember the CPU features.
Move the `cpu_features` field from `KeyInner` to the (inner) inner key
types. This makes the AES-GCM code clearer.
2021-03-23 01:02:44 -07:00
Brian Smith
4a0c4830af AEAD internals: Remove redundant cpu_features parameter from gcm::Context::is_avx2(). 2021-03-23 01:02:44 -07:00
Brian Smith
521081fd31 CI: Don't enable unuseful features during coverage measurement. 2021-03-22 23:45:44 -07:00
Brian Smith
95cbe07c58 Internals: DRY array_map polyfill. 2021-03-22 21:59:51 -07:00
Brian Smith
2a6b7484dc Internals: Polyfill array_map. 2021-03-22 21:59:51 -07:00
Brian Smith
45604135a6 Digest internals: use array patterns. 2021-03-22 20:40:48 -07:00
Brian Smith
9385c6d014 Use Self more. 2021-03-22 16:11:07 -07:00
Brian Smith
1c36465f81 AEAD: Inline AES-GCM aead() into seal() and open().
Don't try to share logic between sealing and opening, so that we can clarify
the assumptions and simplify the implementation.

This will enable future improvements to the internal AEAD API.
2021-03-04 10:30:04 -08:00
Brian Smith
94838a3602 AEAD: Inline ChaCha20-Poly1305 aead() into seal() and open().
Avoid trying to have common logic inside the `aead()` function in favor
of having specialized control flow within each of `seal()` and `open()`.

This will enable future improvements to the internal AEAD API.
2021-03-04 10:30:04 -08:00
Brian Smith
05f0c91db5 CI: Increase wasm-bindgen-test timeout to 60s.
See if this prevents some of the wasm32 failures.
2021-02-26 16:27:01 -08:00
Brian Smith
74aa79b650 AEAD: Refactor more of the AEAD internals to use copy_within style. 2021-02-26 14:57:56 -08:00
Brian Smith
bb17fbb9e7 AES: Change internal CTR32 API to be more like copy_within.
Match what was done for ChaCha20.
2021-02-26 14:57:56 -08:00
Brian Smith
0a40cd431b CI: Use Android "cmdline-tools" instead of SDK tools.
https://github.com/actions/virtual-environments/issues/2252 is the best
description of the difference I have found.

Also stop using `sudo`; maybe this was a holdover from Travis CI days?
2021-02-26 13:22:54 -08:00
Brian Smith
209b866c75 CI: Always use macos-latest and Xcode 12.4.
macos-11.0 is pre-production. Use macos-latest instead, to (I hope)
make macOS jobs more likely to succeed. (Presently, they frequently
fail with no logs.)

Upgrade to Xcode 12.4 in hopes that this will make things work.
2021-02-26 11:25:50 -08:00
Brian Smith
abf9efac0d AEAD: Fix typo in docs for OpeningKey::open_within. 2021-02-24 21:16:07 -08:00
Brian Smith
e8620224e6 AEAD: Move each key type into its own submodule.
Encapsulate each key type in its own module.
2021-02-24 20:15:26 -08:00
Brian Smith
47edace294 AEAD: DRY implementation of Debug for keys. 2021-02-24 20:15:26 -08:00
Brian Smith
82f88d6ac3 AEAD: Simplify the implementation of LessSafeKey.
Inline the implementation of the old `open_within_` function into
`LessSafeKey::open_within`. Rename the inner `open_within` function to
`open_within_`.
2021-02-24 20:15:26 -08:00
Brian Smith
64e9a5490a AEAD: Move LessSafeKey code into a submodule. 2021-02-24 20:15:26 -08:00
Brian Smith
565c8942b4 AEAD: Implement key types in terms of LessSafeKey.
Implement `UnboundKey`, `OpeningKey`, and `SealingKey` in terms of
`LessSafeKey`. Ultimately those key types are restrictoins on the
interface of `LessSafeKey`. It wasn't done this way previously because
we had the idea that code that uses `BoundKey` shouldn't ever touch
`LessSafeKey`. That sounded nice in theory, but the unintended result
was that we introduced code duplication and otherwise made things harder
to understand. Continuing on the previous path would have seen us
duplicate `LessSafeKey` as `KeyInner` or something similar.

Now each bound key opening/sealing function is implemented in terms of
the same-named function in `LessSafeKey`.

Replace the old `LessSafeKey::new()` with an implementation of
`From<UnboundKey>`.
2021-02-24 20:15:26 -08:00
Brian Smith
e48c324695 AEAD tests: Add tests for seal_in_place_separate_tag(). 2021-02-24 05:14:07 +00:00
Brian Smith
29b5727bc1 AEAD test: Add tests for open_in_place(). 2021-02-24 05:14:07 +00:00
Brian Smith
e49a8da4e5 AEAD tests: Further refactor tests to reduce repetition. 2021-02-24 05:14:07 +00:00
Brian Smith
16e1b77f3b AEAD tests: Split test_aead into multiple functions. 2021-02-24 05:14:07 +00:00
Brian Smith
ffa5a9f88f AEAD tests: Refactor to reduce boilerplate. 2021-02-24 05:14:07 +00:00
Brian Smith
0664f59420 AEAD tests: Remove unnecessary prefixes in some test functions. 2021-02-24 05:14:07 +00:00
Brian Smith
930b97b0c9 AEAD: Make Aad implement common traits if the underlying type does. 2021-02-24 00:49:15 +00:00
David Benjamin
8640b412d9 Test ECDSA signing is non-deterministic.
This is a very very basic sanity check on k generation, but it helps
make sure we haven't *completely* disconnected the RNG.

Change-Id: If7ae5dd6be3d0866962cd966b8c1ed1cdedffb50
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/45865
Reviewed-by: Adam Langley <agl@google.com>
2021-02-23 21:21:44 +00:00
Brian Smith
c6d8f58ad0 Add a Rust ChaCha20 implementation.
See the comments in fallback.rs for more details on the origin.
2021-02-23 18:39:36 +00:00
Stephen Crane
bc0a4f1f0f acvp: split ACVP modulewrapper for reuse by Trusty
Trusty requires its own trusted app to implement the ACVP modulewrapper
functionality for validation. Separate the frontend from the generic
functions that implement each algorithm.

Change-Id: I86802b66c627ce4f5b5ddd54555a386e8e993eed
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/45604
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: Adam Langley <agl@google.com>
2021-02-22 18:27:59 +00:00
David Benjamin
1a7456ac15 No-op CL to trigger some builds.
Make sure the recent changes to the builders all work.

Change-Id: I0eca1b7732da29a14325673deeb031c8863b45b8
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/45724
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
2021-02-19 19:48:13 +00:00
David Benjamin
48d80bb6cf Use CIPD Go packages.
These are ultimately just the upstream tarballs, but it's one less
ad-hoc script to maintain.

Change-Id: Ia93a7a9d4944d482e4e4137587998790e8e59294
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/45784
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2021-02-19 19:31:14 +00:00
David Benjamin
814465f01d Update CMake on the bots and switch to CIPD where available.
Newer versions of CMake have some fix for default libraries on
Windows/ARM64. (Not sure exactly what version, but the latest CMake does
seem to work.)

While trying to update the others, it turns out my workstation no longer
makes CMake builds compatible with the builders. It's also tedious that
updating CMake requires making builds myself. Fortunately, Chrome infra
is maintains some packages of third-party software in CIPD.

However, they don't make Windows CMake builds (filed
https://crbug.com/1180257 to request them), and they're stuck on 3.13.x
(blocked on https://crbug.com/1176531).

So, this CL switches to CIPD for Mac/Linux, with the latest version they
have available. It sticks with the old method (uploading copies of
upstream's packages) for Windows and grabs the latest version. When both
of the bugs above are fixed, hopefully things will be more uniform.

Change-Id: I710091fc60594165738a893b2be73cdcef54dfe2
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/45764
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
2021-02-19 18:48:04 +00:00