-
Notifications
You must be signed in to change notification settings - Fork 119
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
deprecate rust-crypto / wasm #33
Comments
yeah I'd really like to phase out rust-crypto as rust implementations become available. I'm very interested in replacing the remaining pieces with competent implementations (ex. curve25519-dalek). I'll have to check out this wasm fork to see what kinds of changes they made, haven't heard of it up until now. |
Fixes mcginty#33 this enables building for wasm with cargo build --no-default-features --features=wasm-resolver
in the meantime the PR might be an OK quickfix. it enables the fork only for wasm. |
Fixes mcginty#33 this enables building for wasm with cargo build --no-default-features --features=wasm-resolver
@mcginty seems to work for me. should we go ahead with that PR? |
Hey sorry for being less responsive, I'm traveling more intensely for the next couple weeks. Let's take a look at that PR. |
Your code seems fine, but there's some smell in the First, they haven't updated the Second, the constant-time comparison implemented isn't convincingly constant-time given how complicated it can be in Rust with its clever optimizer. In a nicer world it'd rely on something like subtle rather than implementing in an way that's I'd imagine does not actually fix timing attacks. Overall, I don't get the feeling that this crate should be included in its current state since it feels half-baked. |
makes sense, thanks for checking. |
No problem! By the way, unfortunately I think the AES checkmark in your list isn't there yet either, because the RustCrypto project doesn't implement GCM. Also, we already use https://github.com/cesarb/chacha20-poly1305-aead for chacha20poly1305, and the same author of that wrote the BLAKE library we are using as well. |
It seems like maybe we could switch to RustCrypto's SHA implementations though at least? Then all we'd use I'll look into putting a PR in to migrate |
could you open a bug in the meantime? Maybe someone else could work on the GCM. If thats the only part missing, that sounds pretty good! |
There's already a tracking issue open for their missing MACs. |
this is currently blocking me from porting to aaarch64 and mipsel. any idea what the state is? the issue here RustCrypto/block-ciphers#1 doesnt seem to mention GCM is using a tls crate like rusttls an option? |
rustls uses ring as its crypto provider. does ring not compile for aarch64 and mipsel I take it? |
ah, that makes sense of course. no ring isnt that portable unfortunately. my best option seems to be fixing hacl |
hacl compiles, however:
looks like thats just missing: snow/src/resolvers/hacl_star.rs Lines 19 to 21 in da3675f
should i add this using the rand crate? |
You can do this using the existing snow just by using I'd like to keep the HACL* resolver as-is because it would only make sense to resolve the RNG in that impl if it's a HACL*-specific RNG, in my opinion. |
got it. unfortunately hacl has no aesgcm either. how do you feel about this one: https://github.com/miscreant/miscreant-rs (sorry i did misread, thats not AES, which the author claims to be less misuse resistant. i'm going to post this to the noise ml) |
how do we proceed here? My proposal would be to add a new resolver that simply doesnt have aesgcm. I can do a PR |
Yeah, let's just remove our dependency on rust-crypto and not support AES-GCM in the default resolver for now, and I will look into spinning off a separate crate with just the AES-GCM support + fixes. If you want to submit a PR, I think it's time to remove our dependency on an abandoned crypto crate. |
@mcginty I spent a bit of time and replaced |
@BlackHoleFox just skimmed it - off to a good start, left you some comments. Feel free to open a PR and I can help you finish iterating on it. |
In the mean time though, rust-crypto is no longer in this project so I'm going to go ahead and close this issue. |
whats your opinion on the state of rust-crypto? it doesnt look well maintained and doesnt compile for webassembly. there's an unpopular but maintained fork here that does https://github.com/buttercup/rust-crypto-wasm
this stuff is maintained https://github.com/RustCrypto but would require picking libraries for individual parts.
The text was updated successfully, but these errors were encountered: