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.
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.
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.
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.
GitHub Actions runners already have rustup with the stable toolchain
installed, apparently. actions-rs is going away and we don't want to
keep maintaining a fork with an unsupported upstream, so start the
process of dropping it.
We want all of our internal symbols to be internal so that none of
these internal symbols leak from a static/dynamic library that is
built with *ring* inside.
Check `d` by processing it as a `OwnedModulus` like we do for the
other moduli. This should make the checking more consistent.
As a nice side effect, this eliminates the last non-test usage of
`Nonnegative` and elimnates more now-dead `Nonnegative` code.
Remove `SmallerModulus` and instead do the check dynamically. This
eliminates the last `unsafe impl` regarding the modulus
relationships. The uses of `elem_widen` won't ever fail but since
they are in an already-fallible function they wo't hurt.
The dynamic checks should never fail but since they are added in
already-fallible functions they won't cause any trouble. This
facilitates future changes where the dynmic checks are required.