getrandom_or_panic

A RngCore which panics unless getrandom exists

Latest version: 0.0.3 registry icon
Maintenance score
6
Safety score
100
Popularity score
71
Check your open source dependency risks. Get immediate insight about security, stability and licensing risks.
Security
  Vulnerabilities
Version Suggest Low Medium High Critical
0.0.3 0 0 0 0 0
0.0.2 0 0 0 0 0
0.0.1 0 0 0 0 0

Stability
Latest release:

0.0.3 - This version may not be safe as it has not been updated for a long time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform

Licensing

Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.

BSD-3-Clause   -   BSD 3-Clause "New" or "Revised" License

Not a wildcard

Not proprietary

OSI Compliant



getrandom_or_panic

Addresses one minor conundrum in cryptography crates:

We want end user signers and provers to depend directly upon getrandom for system randomness, so that users cannot supply insecure random number generators.

We need verifiers to run in contexts without system randomness though, like block chains.

We'd ideally separate provers and verifiers using features, but doing so becomes tricky as crates become more complex, and makes insecure backends for getrandom tempting.

Instead, we pretend that system randomness exists to satisfy the compiler, but panic if called without getrandom. You could still provide an insecure getrandom, but now you've been warned about this footgun.