Code Monkey home page Code Monkey logo

getrandom_or_panic's Introduction

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.

getrandom_or_panic's People

Contributors

burdges avatar swasilyev avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

swasilyev

getrandom_or_panic's Issues

Attempted to use functionality that requires system randomness!!

Hello,

I am getting this error for a ESP32-S3(xtensa-esp32s3-espidf).

The ESP-IDF have a Random Number Generation which do this type of things.

I am guessing that this is not supported and it will not be supported, right ?

This is connected with Is the ESPIDF implementation actually correct?

panicked at .cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom_or_panic-0.0.3/src/lib.rs:29:55:
Attempted to use functionality that requires system randomness!!
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
``

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.