Skip to content

Commit db7747f

Browse files
committed
feat(guests/rsa): Use risc0 precompiles
1 parent 406848b commit db7747f

File tree

3 files changed

+112
-12
lines changed

3 files changed

+112
-12
lines changed

guests/rsa/Cargo.lock

Lines changed: 106 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

guests/rsa/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ js-sys = "=0.3.72"
1313
getrandom = { version = "0.2", features = ["js"] }
1414

1515
rsa-sp1 = { git = "https://github.com/sp1-patches/RustCrypto-RSA", package = "rsa", tag = "patch-0.9.6-sp1-4.0.0-v2", optional = true }
16+
rsa-risc0 = { git = "https://github.com/risc0/RustCrypto-RSA", package = "rsa", tag = "v0.9.7-risczero.0", optional = true }
1617

1718
[features]
1819
no_std = []
1920
jolt = []
2021
nexus = []
21-
risc0 = []
22+
risc0 = ["rsa-risc0"]
2223
sp1 = ["rsa-sp1"]
2324
zkm = []
2425
zkwasm = []

guests/rsa/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ use sha2::{Digest, Sha256};
1010
#[cfg(feature = "sp1")]
1111
use rsa_sp1::{pkcs8::DecodePublicKey, Pkcs1v15Sign, RsaPublicKey};
1212

13-
#[cfg(not(feature = "sp1"))]
13+
#[cfg(feature = "risc0")]
14+
use rsa_risc0::{pkcs8::DecodePublicKey, Pkcs1v15Sign, RsaPublicKey};
15+
16+
#[cfg(not(any(feature = "sp1", feature = "risc0")))]
1417
use rsa::{pkcs8::DecodePublicKey, Pkcs1v15Sign, RsaPublicKey};
1518

1619
#[guests_macro::proving_entrypoint]

0 commit comments

Comments
 (0)