1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//!
//! # About `randombytes`
//!
//! Consumers of this crate must provide a `randombytes`
//! function whose exported symbol matches the value of
//! [`crate::randombytes::RANDOMBYTES_INTERNAL_NAME`].
//! The [`crate::randombytes`] module provides helpers and further
//! details.
//!
//! **This function is at the FFI boundary with the backend C
//! implementation, and must adhere to the expected C ABI and
//! semantics.**
//!
//! Consumers who do not wish to provide their own implementation may
//! enable **both** the `rand` and `extern-C-randombytes` Cargo
//! features.
//! This makes the crate self-contained by exporting a default
//! implementation backed by [`rand::fill`].
//!
//! ### Security
//!
//! The `randombytes` function is a critical cryptographic dependency.
//! It must produce fresh, unpredictable bytes from a cryptographically
//! secure random number generator (CSPRNG).
//!
//! Any weakness in the provided randomness source directly compromises
//! the security of all non-deterministic operations performed by
//! `mldsa-native`.
/// Bindings to the underlying functions and constants from mldsa-native.
///
/// This module also re-exports the C types from [`core::ffi`] for convenience.
pub use *;