Comments (5)
While we're fixing up Scalar::random
, maybe we should get rid of it entirely? I think there's a trait from the rand
crate that types can implement in order to be "randomly generable" by any RNG.
from curve25519-dalek.
Looking into it a bit, I think that what that would look like is implementing a Distribution
https://docs.rs/rand/0.5.4/rand/distributions/trait.Distribution.html for Scalar
s, which people would call sample
on. There's also a provided sample_iter
, which could be more convenient for generating sequences than what we're doing now.
from curve25519-dalek.
I'm not sure exactly what that would look like? impl rand::distributions::Distribution<Scalar> for Uniform
? But Uniform
is their type, so the orphan rules will hate us, so we'd need to create our own Uniform
type.. it sounds slightly messy. That should probably be a new issue in any case.
from curve25519-dalek.
This is fixed in #167.
from curve25519-dalek.
We'd define our own distribution type and implement the trait for it.
from curve25519-dalek.
Related Issues (20)
- Zeroize `SecretKey` on drop HOT 5
- Potential optimization for the torsion check HOT 1
- 4.1.3 release? HOT 4
- Implementation of ed25519-dalek::VerifyingKey::verify_strict seemingly inconsistent with documentation
- Verifying signatures using ZIP215 criteria
- Hard to use API for raw_sign_prehashed, I want to pass a 64 byte message hash HOT 1
- Add the ability to convert `[u8; 32]` into a `VerifyingKey` HOT 17
- `mul_bits_be` endianess footgun HOT 1
- new
- new
- Implement `Reduce` trait HOT 3
- Allow disabled SIMD support on x86_64 baremetal targets HOT 1
- Could you please update zeroize dependency to the newer version? HOT 1
- AVX512 code will need to change to handle the whole AVX10 business HOT 10
- Experimental supports cfg HOT 10
- Does not work on Mac M1
- Malicious strong universal exclusive ownership; Message bound security HOT 1
- Mention the need to add the feature flag getrandom on README file HOT 1
- signing_key.sign_prehashed ... method not found in SigningKey HOT 2
- aws-lc-rs backend
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 curve25519-dalek.