x25519-dalek | X25519 elliptic curve Diffie-Hellman key exchange in pure-Rust, using curve25519-dalek | Cryptography library
kandi X-RAY | x25519-dalek Summary
kandi X-RAY | x25519-dalek Summary
X25519 elliptic curve Diffie-Hellman key exchange in pure-Rust, using curve25519-dalek.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of x25519-dalek
x25519-dalek Key Features
x25519-dalek Examples and Code Snippets
Community Discussions
Trending Discussions on x25519-dalek
QUESTION
this is a question that does have a lot of overlap with what might be posted on cryptography stack exchange,but it's mostly Rust-specific, and thus I posted it here.
So I have an application that needs to use a DH keypair.
It's important that this project is academic only, this code will not be used in any prod environments.
I'm working in a context that already uses a crate called x25519_dalek and thus it makes sense to keep using that resource for my own creation of keypairs.
The documentiation gives this example of key creation:
...ANSWER
Answered 2022-Feb-09 at 12:56OsRng
should be cryptographically secure. It implements CryptoRng
, which is a trait only implemented for cryptographically secure PRNGs, and it's backed by the getrandom
crate, which always uses the system's (or, in the case of WebAssembly, the environment's) CSPRNG.
It is always a sensible choice for a CSPRNG, but as mentioned in the comments, it isn't always very fast, since it involves a system call per operation, and the system's CSPRNG isn't always very fast, either. In such a case, you can use ThreadRng
, which will be faster and is also cryptographically secure.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install x25519-dalek
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page