Git Product home page Git Product logo

Comments (3)

josephlr avatar josephlr commented on June 2, 2024 2

Is this done/called automatically in this crate

Nope, this crate specifically implements one function:

pub fn getrandom(dest: &mut [u8]) -> Result<(), Error>

and that's it. Things like SecureZeroMemory are orthogonal to this crate, and would be be handled by a "Secure Buffer Mangement" crate like secstr. That crate's SecVec<u8> implements BorrowMut<[u8]>, so it can be used with getrandom like any u8 array or Vec<u8>.

Both securely managing secrets in memory and generating good random bytes are tricky problems, but they are different problems. Keeping them in separate crates seems to be the best bet.

And CryptGenRandom is deprecated. I already read the issue thread about why you don't want to use BCryptGenRandom rn because it doesn't support Windows XP, but I honestly think the change should be made soon. BCryptGenRandom works on minimum of Windows Vista.

I think discussion around this are best handled in #65 (so that everyone involved will see it).

from getrandom.

newpavlov avatar newpavlov commented on June 2, 2024 1

Regarding deprecation of RtlGenRandom see this message. There is a proposal to use getrandom inside std, so as long as Windows XP (and preferably Vista) support is not officially dropped by Rust, we have to stay conservative.

I think we can close this issue in favor of #65?

from getrandom.

AtropineTears avatar AtropineTears commented on June 2, 2024

Yes, I'll close the issue and any further discussion can be done on #65

from getrandom.

Related Issues (20)

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.