Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error in slh-dsa when using with x-wing #929

Open
gkgoat1 opened this issue Mar 28, 2025 · 0 comments
Open

Compilation error in slh-dsa when using with x-wing #929

gkgoat1 opened this issue Mar 28, 2025 · 0 comments

Comments

@gkgoat1
Copy link

gkgoat1 commented Mar 28, 2025

    Checking slh-dsa v0.1.0
error[E0405]: cannot find trait `CryptoRngCore` in crate `signature::rand_core`
   --> /[redacted]/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/slh-dsa-0.1.0/src/signing_key.rs:200:46
    |
200 |         rng: &mut impl signature::rand_core::CryptoRngCore,
    |                                              ^^^^^^^^^^^^^
    |
   ::: /[redacted]/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rand_core-0.9.3/src/lib.rs:204:1
    |
204 | pub trait CryptoRng: RngCore {}
    | ---------------------------- similarly named trait `CryptoRng` defined here
    |
help: a trait with a similar name exists
    |
200 |         rng: &mut impl signature::rand_core::CryptoRng,
    |                                              ~~~~~~~~~
help: consider importing this trait
    |
1   + use rand_core::CryptoRngCore;
    |
help: if you import `CryptoRngCore`, refer to it directly
    |
200 -         rng: &mut impl signature::rand_core::CryptoRngCore,
200 +         rng: &mut impl CryptoRngCore,
    |

error[E0643]: method `try_sign_with_rng` has incompatible signature for trait
   --> /[redacted]/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/slh-dsa-0.1.0/src/signing_key.rs:200:19
    |
200 |         rng: &mut impl signature::rand_core::CryptoRngCore,
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected generic parameter, found `impl Trait`                                                                                   
    |
   ::: /[redacted]/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/signature-2.3.0-pre.6/src/signer.rs:99:26
    |
99  |     fn try_sign_with_rng<R: TryCryptoRng>(&self, rng: &mut R, msg: &[u8]) -> Result<S, E...
    |                          - declaration in trait here

Some errors have detailed explanations: E0405, E0643.
For more information about an error, try `rustc --explain E0405`.
error: could not compile `slh-dsa` (lib) due to 2 previous errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant