Comments (2)
I agree that example is deficient and doesn't fully explain everything you need to do for the generate
method to be available.
For more information, see the documentation here, note "available on crate feature rand_core
only":
https://docs.rs/ed25519-dalek/latest/ed25519_dalek/struct.SigningKey.html#method.generate
![Screenshot 2024-02-22 at 6 34 39 PM](https://private-user-images.githubusercontent.com/797/307201974-6086e460-ee3d-41f9-9db2-3c5b88c13c63.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEzMTQ3NzQsIm5iZiI6MTcyMTMxNDQ3NCwicGF0aCI6Ii83OTcvMzA3MjAxOTc0LTYwODZlNDYwLWVlM2QtNDFmOS05ZGIyLTNjNWI4OGMxM2M2My5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzE4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcxOFQxNDU0MzRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hN2NlOGQ2NjllYTdkMzE0ZWI3NjE2ODQ4NDQyMjA4ZTNkNDMxNWM1MzU4NjY1MzcwMjNkZTQxOTNhN2FiZmNhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.nXyCNNpAajPSaIWtnaPSOe0HJ3hibkcwg-mAxbx0Jjw)
Solution: you need to enable the rand_core
crate feature in Cargo.toml:
[dependencies]
ed25519-dalek = { version = "2", features = ["rand_core"] }
from curve25519-dalek.
Thanks @tarcieri ! That indeed solves the compilation error. I was not aware of the rand_core
option after reading https://docs.rs/ed25519-dalek/latest/ed25519_dalek/.
I will update the issue title to reflect a docs issue, instead of a compilation one.
from curve25519-dalek.
Related Issues (20)
- `curve25519_dalek::SubgroupPoint`: missing traits
- Build fails on nightly-2024-02-05 HOT 2
- Crate fails with `nightly-2024-02-06` HOT 3
- How to check a VerifyingKey point is within the prime order subgroup HOT 3
- Support NIST validation criteria for Edwards points HOT 2
- ed25519: support PKCS#8 v1 (for OpenSSL interop)? HOT 2
- Use of unstable library feature 'stdsimd HOT 6
- Use of unstable library feature 'stdsimd' HOT 3
- Incorrect use of cfg to import dependency HOT 1
- [docs request] how to serialize a public key in the format compatible with `~/.ssh/authorized_keys`? HOT 2
- AVX512-IFMA & AVX10 status
- curve25519: nightly CI seems borked w/ warn(unused_imports)
- Impl std::num_traits::{One, Zero} for Scalar types
- 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
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.