Skip to content

Add feature to directly use the OS-provided RNG instead of rand - #403

Open
MatMaul wants to merge 1 commit into
matrix-org:mainfrom
tchapgouv:os-rng
Open

Add feature to directly use the OS-provided RNG instead of rand#403
MatMaul wants to merge 1 commit into
matrix-org:mainfrom
tchapgouv:os-rng

Conversation

@MatMaul

@MatMaul MatMaul commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

The os-rng feature enables the use of the operating system's RNG instead of the default random number generator provided by the rand crate, which is not backtracking resistant.

This is usually not necessary, but can be enabled for security-critical applications or compliance purposes.

Please note that OS RNG is not guaranteed to be backtracking resistant either since it will depend on the underlying OS implementation, but the RNG state will be available in kernel space instead of user space so harder to extract.

@MatMaul
MatMaul requested review from dkasak and poljar as code owners August 19, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant