diff --git a/cipher-traits/src/kem.rs b/cipher-traits/src/kem.rs index d5391f444..f469ee451 100644 --- a/cipher-traits/src/kem.rs +++ b/cipher-traits/src/kem.rs @@ -8,7 +8,9 @@ //! encapsulation. //! //! The [Kem] Trait describes the basic API offered by a Key Encapsulation -//! Mechanism. Two implementations for it are provided, [StaticKEM] and [EphemeralKEM]. +//! Mechanism. Two implementations for it are provided: +//! [Kyber512](../../rosenpass_oqs/kyber_512/enum.Kyber512.html) and +//! [ClassicMceliece460896](../../rosenpass_oqs/classic_mceliece_460896/enum.ClassicMceliece460896.html). //! //! An example where Alice generates a keypair and gives her public key to Bob, for Bob to //! encapsulate a symmetric key and Alice to decapsulate it would look as follows. diff --git a/ciphers/src/lib.rs b/ciphers/src/lib.rs index ecb618da7..6b6c67fbb 100644 --- a/ciphers/src/lib.rs +++ b/ciphers/src/lib.rs @@ -41,10 +41,11 @@ pub mod xaead { pub mod hash_domain; /// This crate includes two key encapsulation mechanisms. -/// Namely ClassicMceliece460896 (as [StaticKem]) and Kyber512 (as [EphemeralKem]). +/// Namely ClassicMceliece460896 (also referred to as `StaticKem` sometimes) and +/// Kyber512 (also referred to as `EphemeralKem` sometimes). /// -/// See [rosenpass_oqs::ClassicMceliece460896](rosenpass_oqs::ClassicMceliece460896) -/// and [rosenpass_oqs::Kyber512](rosenpass_oqs::Kyber512) for more details on the specific KEMS. +/// See [rosenpass_oqs::ClassicMceliece460896] +/// and [rosenpass_oqs::Kyber512] for more details on the specific KEMS. /// pub mod kem { pub use rosenpass_oqs::ClassicMceliece460896 as StaticKem; diff --git a/ciphers/src/subtle/blake2b.rs b/ciphers/src/subtle/blake2b.rs index c29a6e3ca..26dbf257b 100644 --- a/ciphers/src/subtle/blake2b.rs +++ b/ciphers/src/subtle/blake2b.rs @@ -10,7 +10,7 @@ use rosenpass_to::{ops::copy_slice, with_destination, To}; use rosenpass_util::typenum2const; /// Specify that the used implementation of BLAKE2b is the MAC version of BLAKE2b -/// with output and key length of 32 bytes (see [Blake2bMac]). +/// with output and key length of 32 bytes (see [Blake2bMac]). type Impl = Blake2bMac; type KeyLen = ::KeySize; @@ -21,17 +21,17 @@ const KEY_LEN: usize = typenum2const! { KeyLen }; /// The output length for BLAKE2b supported by this API. Currently 32 Bytes. const OUT_LEN: usize = typenum2const! { OutLen }; -/// Minimal key length supported by this API (identical to [KEY_LEN]) +/// Minimal key length supported by this API. pub const KEY_MIN: usize = KEY_LEN; -/// maximal key length supported by this API (identical to [KEY_LEN]) +/// maximal key length supported by this API. pub const KEY_MAX: usize = KEY_LEN; -/// minimal output length supported by this API (identical [OUT_LEN]) +/// minimal output length supported by this API. pub const OUT_MIN: usize = OUT_LEN; -/// maximal output length supported by this API (identical [OUT_LEN]) +/// maximal output length supported by this API. pub const OUT_MAX: usize = OUT_LEN; -/// Hashes the given `data` with the [Blake2bMac] hash function under the given `key`. -/// The [KEY_LEN] and [OUT_LEN] are both set to 32 bytes (or 256 bits). +/// Hashes the given `data` with the [Blake2bMac] hash function under the given `key`. +/// The both the length of the output the length of the key 32 bytes (or 256 bits). /// /// # Examples /// diff --git a/ciphers/src/subtle/mod.rs b/ciphers/src/subtle/mod.rs index 179cf9e66..7e9431b75 100644 --- a/ciphers/src/subtle/mod.rs +++ b/ciphers/src/subtle/mod.rs @@ -1,7 +1,7 @@ /// This module provides the following cryptographic schemes: /// - [blake2b]: The blake2b hash function -/// - [chacha20poly1305_ietf]: The Chacha20Poly1305 AEAD as implemented in [RustCrypto](https://crates.io/crates/chacha20poly1305) (only used when the feature `experiment_libcrux` is disabled. -/// - [chacha20poly1305_ietf_libcrux]: The Chacha20Poly1305 AEAD as implemented in [libcrux](https://github.com/cryspen/libcrux) (only used when the feature `experiment_libcrux` is enabled. +/// - [chacha20poly1305_ietf]: The Chacha20Poly1305 AEAD as implemented in [RustCrypto](https://crates.io/crates/chacha20poly1305) (only used when the feature `experiment_libcrux` is disabled). +/// - [chacha20poly1305_ietf_libcrux]: The Chacha20Poly1305 AEAD as implemented in [libcrux](https://github.com/cryspen/libcrux) (only used when the feature `experiment_libcrux` is enabled). /// - [incorrect_hmac_blake2b]: An (incorrect) hmac based on [blake2b]. /// - [xchacha20poly1305_ietf] The Chacha20Poly1305 AEAD as implemented in [RustCrypto](https://crates.io/crates/chacha20poly1305) pub mod blake2b;