399 Commits

Author SHA1 Message Date
Brian Smith
0395743dc1 cpu: Always use #[cfg] for target-arch-specific tests.
Previously we were relying in part on the compiler and linker to work
together to inline always-false guards around calls to architecture-
specific functions that might not even exist. However, this isn't
guaranteed to work, though so far it always has. Instead, use
compile-time logic to guard all architecture-specific calls.

To help ensure tihs happens, only expose `cpu::intel` on Intel targets
and similarly only expose `cpu::arm` on ARM targets.
2023-12-11 11:40:45 -08:00
Brian Smith
2be687bebd 0.17.7. 2023-12-05 14:28:41 -08:00
Brian Smith
febe76dc77 cpu arm: Fix static feature detection initialization.
Commit f932b941bd1f59782cb3db8f7cd7b8b2c9842ee9 was incomplete and
wrong. On targets where we do any static or dynamic feature detection
and where we have these global variables, we need to unconditionally
write the detected features to the global variable so that assembly
can see them. Since we do static feature detection regardless of
operating system, the initialization of the global most be done
without any conditions on the operating system.
2023-12-01 17:57:15 -08:00
Brian Smith
464d367252 0.17.6. 2023-11-28 13:19:11 -08:00
Jorge Aparicio
7fa58cc7f7 rename feature
and have it apply only when `target_os = "none"`
2023-11-14 13:22:44 -08:00
Jorge Aparicio
9195b4a33f add an opt-in less-safe-getrandom-custom feature
This Cargo feature treats a user-provided `getrandom` implementation as
a secure random number generator (`SecureRandom`). The feature only has
effect on targets not supported by `getrandom`.

I agree to license my contributions to each file under the terms given
at the top of each file I changed.
2023-11-14 13:22:44 -08:00
Brian Smith
ad356c99ac Limit libc dependency to ARM and AArch64 targets. 2023-10-30 18:38:06 -07:00
Brian Smith
c3fda8b4dd 0.17.5. 2023-10-18 20:58:28 -07:00
Brian Smith
a86b7fabb9 0.17.5-alpha.1. 2023-10-18 20:58:28 -07:00
Brian Smith
057de0ff98 0.17.4. 2023-10-15 20:57:03 -07:00
Brian Smith
e0bc21f51a 0.17.4-alpha.1. 2023-10-15 12:48:10 -07:00
JanKaul
2019d8482f Add support for wasm32-wasi.
[The files changed in this commit were part of the original PR. The
original PR also changed other files, but those changes were removed.]
2023-10-14 16:50:18 -07:00
Brian Smith
ff2cc71e94 Require wasm-bindgen-test 0.3.37.
This is the minimum we've tested.
2023-10-13 15:07:44 -07:00
Brian Smith
aa01858787 Require getrandom 0.2.10.
This is the minimum we've tested.
2023-10-13 15:07:44 -07:00
Brian Smith
90879811aa Require spin 0.9.8.
This is the minimum we've tested.
2023-10-13 15:07:44 -07:00
Brian Smith
801ebce7e2 Require cc-rs 1.0.83.
This is the minimum we've tested.
2023-10-13 15:07:44 -07:00
Brian Smith
dac669b648 Require at least libc 0.2.148.
This is the minimum that we've tested.
2023-10-13 15:07:44 -07:00
Brian Smith
2e8363b433 0.17.3. 2023-10-09 21:45:25 -07:00
Brian Smith
a076d28b82 0.17.3-alpha.1. 2023-10-09 21:45:25 -07:00
Brian Smith
fa5d6bd6ac Move benchmarks to a new ring-bench crate.
Move the Criterion.rs dependency out of *ring* into a new `ring-benches`
crate. This speeds up many build scenerios by eliminating a bunch of
dependencies from *ring*'s dependency tree for `cargo test`.
2023-10-06 21:54:05 -07:00
Brian Smith
f6d9efd5b3 0.17.2. 2023-10-06 16:55:46 -07:00
Brian Smith
bebaa473f6 Cargo.toml: Add "third_party/fiat/curve25519_64_adx.h". 2023-10-06 16:55:46 -07:00
Brian Smith
8a123d5900 0.17.1. 2023-10-06 16:55:46 -07:00
Brian Smith
f69e1e831f 0.17.1-alpha.1. 2023-10-06 16:55:46 -07:00
Brian Smith
af7c37f8af Enable FE25519_ADX Curve25519 base point mult. except on Windows. 2023-10-06 09:54:59 -07:00
Brian Smith
244a1dee00 Remove doc/link-to-readme.md.
The intended effect was to redirect people reading about *ring* on
crates.io to the GitHub-hosted README.md. However, the unintended effect
was that docs.rs is broken for the 0.17.0 release.
2023-10-05 22:45:41 -07:00
Brian Smith
096a99f426 Benchmarks: Add X25519 benchmark. 2023-10-04 20:59:49 -07:00
Brian Smith
d34858a918 0.17.0. 2023-10-02 01:18:18 -07:00
Brian Smith
93d1807dd0 0.17.0-beta.3 2023-10-02 01:18:18 -07:00
Brian Smith
851f9f339b 0.17.0-beta.2 2023-10-02 01:18:18 -07:00
Brian Smith
812592f5f3 0.17.0-beta.1 2023-10-02 01:18:18 -07:00
Brian Smith
e4a85afb58 ARM & Aarch64: Add ability to disable hardware crypto for testing. 2023-10-01 21:29:57 -07:00
Brian Smith
901441fd59 MSRV 1.61.0: Use cfg!(target_feature) for static AARCH64 feature detection. 2023-09-30 17:41:26 -07:00
Brian Smith
00da1cb1f7 Merge BoringSSL 'a905bbb': Consistently include BTI markers in every assembly file 2023-09-29 14:52:41 -07:00
Brian Smith
de138ee2e7
Revert "Document or remove some uses of unsafe" 2023-09-29 10:14:25 -07:00
Brian Smith
238ff8b191
Merge pull request #1657 from joshlf/unsafe-cleanup
Document or remove some uses of `unsafe`
2023-09-29 10:14:19 -07:00
Joshua Liebow-Feeser
4056fb9f6a Document or remove some uses of unsafe 2023-09-29 00:27:21 +00:00
Brian Smith
af45ee28f2 Add newly-added files to Cargo.toml to fix package job. 2023-09-28 15:04:48 -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
5d8bdb6ca6 CI: Increase MSRV to 1.60. 2023-09-03 16:03:25 -07:00
Brian Smith
d0513bd767 Merge BoringSSL 53a87b7: ChaCha20-Poly1305 for Armv8 (AArch64). 2022-11-03 16:30:40 -07:00
Brian Smith
feae54128f Merge BoringSSL fa3fbda: P-256 assembly optimisations for Aarch64. 2022-11-02 13:15:58 -07:00
Brian Smith
e51d3c4eea Merge BoringSSL 661266e: Move CPU detection symbols to crypto/internal.h. 2022-10-31 16:31:35 -07:00
Brian Smith
6b0050f08c Merge BoringSSL 295b313: Rename CPU feature files with underscores. 2022-10-31 16:17:20 -07:00
Brian Smith
abe9529fc0 Remove documentation link.
The self-hosted documentation wasn't being kept up to date.
2022-10-29 11:16:41 -07:00
Brian Smith
a7b235162c Add MSRV to Cargo.toml. 2022-10-29 11:16:41 -07:00
Brian Smith
f5bd88cc0a Use the getrandom crate to implement ring::rand. 2022-10-29 11:14:38 -07:00
Brian Smith
371377d41d 2021 Edition: Remove now-redundant resolver = "2". 2022-10-20 23:03:50 -07:00
Brian Smith
6cf448ad49 Use Rust 2021 Edition. 2022-10-20 23:03:50 -07:00
Brian Smith
7386436fb7 Upgrade to critereon.rs 0.4.0 to shrink dev-dependencies tree.
Remove these 20 dev-dependencies:

  * bstr
  * crossbeam-channel
  * crossbeam-deque
  * crossbeam-epoch
  * crossbeam-utils
  * csv
  * csv-core
  * itoa
  * memchr
  * memoffset
  * num_cpus
  * plotters
  * plotters-backend
  * plotters-svg
  * rayon
  * rayon-core
  * regex-automata
  * scopeguard
  * serde_cbor
  * unicode-width

at the cost of adding these 8 dev-dependencies:

  * anes
  * ciborium
  * ciborium-io
  * ciborium-ll
  * clap_lex
  * hashbrown
  * indexmap
  * os_str_bytes
2022-10-20 09:41:56 -07:00