elardus-erasmus
2b1689fdc4
Update README.md
...
There is no `benches` folder in the project. Change to the existing `bench` folder name.
2024-01-26 13:56:12 -08:00
Vlad Krasnov
c1e31b8943
bench: Report throughput in AEAD benchmarks
...
This makes the results directly comparable to BoringSSL and OpenSSL
2024-01-26 12:54:43 -08:00
Vlad Krasnov
ee5db43617
tests: properly format a limb on 32-bit arch
2024-01-23 16:35:33 -08:00
Brian Smith
14c6e3d54b
ec: go run crypto/fipsmodule/ec/make_ec_scalar_base_mult_tests.go
...
Update the point multiplication test vectors to match exactly the
output of the (new) generation script.
2024-01-22 09:47:43 -08:00
Vlad Krasnov
e217869a51
ec: use unencoded elements for point mul base tests
2024-01-19 13:05:45 -08:00
Vlad Krasnov
5644cb94d6
ec: Allow test vectors to be decoded as unencoded elements
2024-01-19 13:05:45 -08:00
Brian Smith
e8a5d1138c
build.rs: More consistently use named constants for OS names.
2024-01-18 14:33:06 -08:00
Brian Smith
4e37622614
build.rs: Consistently use named constants for architecture names.
2024-01-18 14:33:06 -08:00
Brian Smith
728eeb33c1
aes-gcm: Don't assume NEON is available on AArch64.
...
Some of the assembly probably assumes NEON is available on Aarch64, so
don't remove the assertion in the feature detection logic. But move
closer to supporting NEON-less Aarch64 configurations, e.g. within an
OS kernel or when NEON is disabled for testing purposes, or when we
have a target that for whatever reason doesn't statically enable NEON
for AAarch64 and also doesn't support dynamic feature detection.
2024-01-18 14:14:42 -08:00
Travis Finkenauer
57f58c98f1
build.rs: don't use -pedantic
flag
...
In some build systems, target sysroots may use non-standard C extentions
like `#include_next`. In such cases, the `-pedantic` flag breaks the
compilation.
Resolves issue #1923 .
2024-01-18 14:02:40 -08:00
Brian Smith
73fb637078
Build: Add compile-time checks regarding ABI assumptions.
2024-01-16 09:33:22 -08:00
Brian Smith
c5a9c81bc1
Build: Don't mention invalid_reference_casting
lint.
...
https://doc.rust-lang.org/beta/rustc/lints/listing/deny-by-default.html
says that it is deny-by-default, so don't mention it. This eliminates
an "unknown lint" warning for Rust versions prior to Rust 1.73.
This was `clippy::cast_ref_to_mut` prior to Rust 1.72.0, according to
https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1720-2023-08-24 .
2024-01-16 09:32:34 -08:00
Brian Smith
c5eb21e7c9
CI: Add mips64el- to test matrix.
...
mips64- (big-endian) wasn't added to the test matrix because it isn't
enabled in target.h.
2024-01-13 20:21:33 -08:00
Brian Smith
f40ac2d840
CI: Add powerpc-, powerpc64le-, and S/390x to test matrix.
2024-01-13 19:34:12 -08:00
Brian Smith
e966cad608
PowerPC: Only support big-endian 32-bit PowerPC.
...
In commit c72a5aa710eebf001d7e020b042e9971ce9ef6b6 we removed the
big-endian-only check for 32-bit PowerPC. Add it back.
2024-01-13 19:34:12 -08:00
Brian Smith
0042789cfe
CI: Add mips-unknown-linux-gnu and mipsel-unknown-linux-gnu to test matrix.
2024-01-13 19:02:22 -08:00
David Horton
2f7471d05f
Added MIPS 32-bit big-endian
2024-01-13 19:02:22 -08:00
Brian Smith
d8e55e2542
CI: Check symbol prefixes for Apple targets too.
...
It doesn't seem to work with the 1.61.0 toolchain for iOS, so
exclude that.
2024-01-13 18:12:27 -08:00
Brian Smith
183ce8066b
CI: mk/check-symbol-prefixes.sh: Use llvm-tools-preview llvm-nm.
2024-01-13 18:12:27 -08:00
Brian Smith
a94849dc26
mk/check-symbol-prefixes.sh: Make target argument mandatory.
2024-01-13 18:12:27 -08:00
Brian Smith
3e50503763
target.h: Only define OPENSSL_<arch>
when we have code specific to that arch.
...
New architecture-conditional logic should be done Rust, not in C.
2024-01-13 15:23:14 -08:00
Brian Smith
accca784ef
CI: Use macos-13 instead of macos-13-xlarge for most aarch64-apple-darwin jobs.
...
Running these jobs cost $111.04 in December. Reduce the cost by an
expected 75%.
2024-01-12 22:23:25 -08:00
Brian Smith
a0ce2d3c22
internal: Add generalized "noinline" attribute support.
...
There are some functions that we never want to be (cross-language)
inlined, and we expect to add more. Make it easier to add more, and
make it easier to extend this capability to more C compilers.
2024-01-12 17:09:36 -08:00
Brian Smith
c72a5aa710
Require __BYTE_ORDER__ to be defined for bi-endian target architectures.
2024-01-10 10:53:26 -08:00
Brian Smith
c4742e0cae
NFC: Address Clippy unused import warning.
...
See https://github.com/briansmith/ring/issues/1887 about addressing this
messiness long-term.
2024-01-09 11:57:06 -08:00
Brian Smith
7f8fb38e22
CI: Move rustdoc tests to a separate matrix.
...
Only build/run rustdoc tests once, instead of in every `test` matrix entry.
2024-01-02 18:29:17 -08:00
Qiu Chaofan
a206284f83
CI: add powerpc64-linux to CI
2024-01-02 16:18:27 -08:00
Brian Smith
a3d034dc90
Remove redundant block nesting.
...
This nesting was required in earlier versions of Rust, but not with our MSRV.
2023-12-14 10:34:36 -08:00
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
2d974347e0
cpu: Hide dead code warning on 32-bit x86.
2023-12-11 11:40:45 -08:00
Brian Smith
89d22e23fa
digest: Remove CPU features from the digest context.
...
Take a step towards refactoring the CPU feature detection.
2023-12-11 11:24:23 -08:00
Brian Smith
5b437d514f
digest internals: Call block_data_order
from one point.
...
Step towards future memory safety clarifications.
2023-12-11 11:24:23 -08:00
Brian Smith
6347be9634
bigint: Remove cpu::Features
from OwnedModulus.
...
Since all the arithmetic is actually done on `Modulus` now,
`OwnedModulus` doesn't need access to the CPU features.
2023-12-06 10:36:09 -08:00
Brian Smith
71a7271209
biging tests: DRY m.modulus() calls.
2023-12-06 10:36:09 -08:00
Brian Smith
bf966622c9
AEAD: Don't store cpu::Features in the key.
...
Have the inner AEAD API take `cpu::features()` for all operations.
Then we will be able to write CPU-capability-based tests using (a
variation of) the inner API, which will (when implemented) eliminate
the need to use SDE and the other various hacks we use for testing all
the implementations.
2023-12-06 10:13:49 -08:00
Brian Smith
a4127d0a3c
CI: Update versions of cargo-audit and cargo-deny.
2023-12-05 20:21:41 -08:00
Brian Smith
ae3b83042f
CI: Remove unnecessary RUSTFLAGS for aarch64-pc-windows-msvc.
...
This isn't necessary though it may be useful.
2023-12-05 20:21:16 -08:00
Brian Smith
0006e3d64a
CI: Run rustup --version
as the first step in package
job.
...
Be consistent with the other jobs.
2023-12-05 20:21:16 -08:00
Brian Smith
2be687bebd
0.17.7.
2023-12-05 14:28:41 -08:00
Brian Smith
317a062bf4
ec suite_b: De-duplicate to_mont
.
2023-12-04 14:36:50 -08:00
Brian Smith
c89b5c6e28
ec suite_b: Split scalar inversion API into variable- and constant- time.
2023-12-04 14:36:50 -08:00
Brian Smith
ed2b1d7054
ec suite_b: Make oneRR_mod_n private.
2023-12-04 14:36:50 -08:00
Brian Smith
f55712e909
ec suite_b: Make CommonOps::num_limbs
and ops::elem::Elem::*
private.
2023-12-04 13:53:55 -08:00
Brian Smith
e952c64eba
ec suite_b: Hide COMMON_OPS.n
and reduce direct use of .num_limbs
.
2023-12-04 13:53:55 -08:00
Brian Smith
2926ebb500
ec suite_b: Calculate elem/scalar byte length in one place.
2023-12-04 13:53:55 -08:00
Brian Smith
16c3e19f71
montgomery: Encapsulate Rust uses of bn_mul_mont.
...
Have all calls from Rust go through `mul_mont`, which ensures
CPU feature detection has been done.
2023-12-03 10:56:49 -08:00
Brian Smith
40e147dfe8
arithmetic: Move bn_mul_mont
declaration to montgomery
.
2023-12-02 12:10:56 -08:00
Brian Smith
af471c9351
arithmetic: Allow use of N0
from outside of arithmetic
.
...
Allow N0 to be const-constructed and expose it outside of `arithmetic`
so that `ec` can start using it.
2023-12-02 12:10:56 -08:00
Brian Smith
ad1204ec11
CI: Update comment about not running aarch64-apple-ios tests.
2023-12-01 19:17:31 -08:00
Brian Smith
b2cb243a7c
CI: Run tests on aarch64-apple-darwin in GitHub Actions.
2023-12-01 19:17:31 -08:00