You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR 2
Also, if trying using the latest version of rand and curve25519, get a different error:
error[E0277]: the trait bound R: zkp::rand::RngCore is not satisfied
--> src/main.rs:49:34
|
49 | SecretKey(Scalar::random(rng))
| ^^^ the trait zkp::rand::RngCore is not implemented for R
|
::: /home/oracle/.cargo/registry/src/github.com-1ecc6299db9ec823/curve25519-dalek-3.0.2/src/scalar.rs:558:22
|
558 | pub fn random<R: RngCore + CryptoRng>(rng: &mut R) -> Self {
| ------- required by this bound in curve25519_dalek::scalar::Scalar::random
|
help: consider further restricting this bound
|
48 | fn new<R: RngCore + CryptoRng + zkp::rand::RngCore>(rng: &mut R) -> SecretKey {
| ^^^^^^^^^^^^^^^^^^^^
I'm getting the following errors when trying to compile code sig_and_vrf_example.rs.
Rust version: 1.47.0
ERROR 1
error[E0308]: mismatched types
--> src/main.rs:91:20
|
91 | x: &self.sk.0,
| ^^^^^^^^^^ expected struct
zkp::curve25519_dalek_ng::scalar::Scalar
, found structcurve25519_dalek::scalar::Scalar
|
= note: expected reference
&zkp::curve25519_dalek_ng::scalar::Scalar
found reference
&curve25519_dalek::scalar::Scalar
Cargo.tml
...
[dependencies]
zkp = "0.8.0"
rand = "0.7"
curve25519-dalek = { version = "2", default-features = false, features = ["serde", "std"] }
[features]
default = ["u64_backend"]
u32_backend = ["curve25519-dalek/u32_backend"]
u64_backend = ["curve25519-dalek/u64_backend"]
simd_backend = ["curve25519-dalek/simd_backend"]
ERROR 2
Also, if trying using the latest version of rand and curve25519, get a different error:
error[E0277]: the trait bound
R: zkp::rand::RngCore
is not satisfied--> src/main.rs:49:34
|
49 | SecretKey(Scalar::random(rng))
| ^^^ the trait
zkp::rand::RngCore
is not implemented forR
|
::: /home/oracle/.cargo/registry/src/github.com-1ecc6299db9ec823/curve25519-dalek-3.0.2/src/scalar.rs:558:22
|
558 | pub fn random<R: RngCore + CryptoRng>(rng: &mut R) -> Self {
| ------- required by this bound in
curve25519_dalek::scalar::Scalar::random
|
help: consider further restricting this bound
|
48 | fn new<R: RngCore + CryptoRng + zkp::rand::RngCore>(rng: &mut R) -> SecretKey {
| ^^^^^^^^^^^^^^^^^^^^
Cargo.toml
...
[dependencies]
zkp = "0.8.0"
rand = "0.8.3"
curve25519-dalek = "3.0.2"
The text was updated successfully, but these errors were encountered: