//! # ccc-crypto-boring //! //! BoringSSL implementation of the CCC provider traits, through Cloudflare's //! [`boring`] crate. It adds a native library family next to wolfSSL and //! RustCrypto (design: "Provider diversity"). //! //! With the `fips` feature, `boring-sys` builds BoringCrypto in FIPS mode. //! The vendored source is the update stream of a validated module, not a //! certified build; a certified build links a validated `bcm.o` (`boring`'s //! `fips-precompiled`). BoringSSL's FIPS build needs ELF objects, so it //! works on Linux and Android only, not on macOS or iOS. `fips_mode()` is //! `true` only for a `fips` build that reports FIPS mode at run time. //! //! Licences: `boring` is Apache-2.0 and `boring-sys` is MIT. The vendored //! BoringSSL (libcrypto) is Apache-2.0 throughout, including the files that //! came from OpenSSL; only its Go test harness, which is not linked, is under //! the Go licence. //! //! The crate does not depend on the AWS-LC provider (itself a BoringSSL //! fork); the two are separate builds of separate sources. //! //! Call [`init()`] once at start-up to register it in the global //! [`ProviderRegistry`][ccc_crypto_core::registry::ProviderRegistry]. #![forbid(unsafe_code)] pub mod aead; pub mod capabilities; pub mod hash; pub mod kdf; pub mod kem; pub mod mac; pub mod provider; pub mod self_test; pub use provider::BoringProvider; /// The provider's registry name. pub const PROVIDER_NAME: &str = "boring"; /// Register a [`BoringProvider`] in the global registry. pub fn init() { ccc_crypto_core::ProviderRegistry::global() .register(PROVIDER_NAME, Box::new(BoringProvider::new())); log::info!("[ccc-crypto-boring] provider registered"); }