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

Boring and rustcrypto rsa #71

Merged
merged 1 commit into from
Aug 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions implementations/hostcalls/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repository = "https://github.com/webassembly/wasi-crypto"
aes-gcm = "0.9.4"
anyhow = "1.0.58"
bincode = "1.3.3"
boring = "2.0.0"
boring = {version = "2.0.0", optional = true }
byteorder = "1.4.3"
chacha20poly1305 = "0.9.1"
curve25519-dalek = "=3.2.0" # updating is impossible due to a dependency on an older `zeroize` version
Expand All @@ -40,10 +40,16 @@ p384 = { version = "0.11.1", features = [
"pkcs8",
"pem",
] }
rsa = { version = "0.6.1", features = [
"expose-internals",
"serde",
"std",
"pem"
], optional = true }
pqcrypto-traits = { version = "0.3.4", optional = true }
pqcrypto-kyber = { version = "0.7.6", optional = true }

rand_core = { version = "0.6.3", default-features = false, package = "rand_core" }
rand_core = { version = "0.6.3", features = ["getrandom"], package = "rand_core" }
rand_core_05 = { package = "rand_core", version = "0.5", default-features = false }
serde = { version = "1.0.140", features = ["derive"] }
sha2 = "0.10.2"
Expand All @@ -53,8 +59,9 @@ xoodyak = "0.7.3"
zeroize = "1.5.7"

[features]
default = ["pqcrypto"]
default = ["pqcrypto", "boring"]
pqcrypto = ["pqcrypto-traits", "pqcrypto-kyber"]
rcrypto = ["dep:rsa"]

[badges]
maintenance = { status = "experimental" }
2 changes: 1 addition & 1 deletion implementations/hostcalls/rust/src/signatures/keypair.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::ecdsa::*;
use super::eddsa::*;
use super::publickey::*;
use super::rsa::*;
use super::rsa_impl::*;
use super::*;
use crate::asymmetric_common::*;
use crate::error::*;
Expand Down
6 changes: 5 additions & 1 deletion implementations/hostcalls/rust/src/signatures/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ mod ecdsa;
mod eddsa;
mod keypair;
mod publickey;
mod rsa;

#[cfg_attr(feature = "boring", path = "rsa_boring.rs")]
#[cfg_attr(feature = "rcrypto", path = "rsa_rcrypto.rs")]
mod rsa_impl;

mod secretkey;
mod signature;

Expand Down
2 changes: 1 addition & 1 deletion implementations/hostcalls/rust/src/signatures/publickey.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::ecdsa::*;
use super::eddsa::*;
use super::rsa::*;
use super::rsa_impl::*;
use super::*;
use crate::asymmetric_common::*;
use crate::error::*;
Expand Down
Loading