Comments (5)
Cross-posting to the main repo.
This post can stay open: the book probably needs updating eventually.
from book.
While this library has CSPRNGs that are in fact cryptographically secure, this is not a general purpose cryptographic library providing other algorithms like encryption and authentication? (And if you want encryption and authentication you should go to the referenced libraries instead of building your own using rand.)
I think this is accurate, but we cannot guarantee that our implementations are cryptographically secure. It's more of a best-effort thing, we don't spend the resources in verifying our implementations that a crypto library might.
If you look at crypto libraries, they use getrandom
directly to generate keys, and you might want to do something similar if cryptographic security is important.
from book.
Was reading the book as I need a secure RNG and this statement confused me. Also the links suggest that the other projects provide a secure RNG. But RustCrypto has no RNG, and Ring only provides an abstraction over the OS RNG.
from book.
Ring only provides an abstraction over the OS RNG.
This is AFAIK best practice for cryptographic use cases: Don't use a user-space CSPRNG, use the OS directly (i.e. getrandom).
from book.
This section of the book was updated (#61) to clarify what the the crate does and doesn't attempt to provide. Nothing fundamental changes. Any comments?
Note that the book is for documentation; for changes to rand
itself see my cross post to the main repo.
from book.
Related Issues (16)
- Test code examples and links
- Guide page for generating seeded random floats HOT 4
- "This is not a property of true randomness."
- Incorrect formula HOT 2
- Claim about obsolescence of non-crypto PRNGs HOT 3
- Conversion to 64-bit float HOT 2
- Dead links to random number generators HOT 2
- "Crates and features" implies that `rand` subsumes `rand_chacha` HOT 5
- Mention DistString
- Example of what can go wrong with RNGs HOT 1
- Document how to run RNGs in parallel HOT 1
- Broken links due to rand_distr split
- Document how to make a type randomizable
- confusing lack of full name for StdRng on guide-rngs.html HOT 1
- Update RNG performance stats
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from book.