Skip to content

Commit

Permalink
Remove the legacy RSA implementation
Browse files Browse the repository at this point in the history
To avoid code duplication, use the superboring emulation layer instead.

This will allow us to easily move other cryptographic primitives
to using BoringSSL.
  • Loading branch information
jedisct1 committed Dec 17, 2023
1 parent b99737d commit fb59a72
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1,275 deletions.
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ zeroize = "1.7.0"
boring = "4.2.0"

[target.'cfg(any(target_arch = "wasm32", target_arch = "wasm64"))'.dependencies]
rsa = "0.8.2"
spki = "0.6.0"
superboring = "0.1.0"

[dev-dependencies]
benchmark-simple = "0.1.8"
Expand Down
8 changes: 0 additions & 8 deletions src/algorithms/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,11 @@ mod es256;
mod es256k;
mod es384;
mod hmac;

#[cfg(not(any(feature = "pure-rust", target_arch = "wasm32", target_arch = "wasm64")))]
mod rsa;
#[cfg(any(feature = "pure-rust", target_arch = "wasm32", target_arch = "wasm64"))]
mod rsa_legacy;

pub use self::eddsa::*;
pub use self::es256::*;
pub use self::es256k::*;
pub use self::es384::*;
pub use self::hmac::*;

#[cfg(not(any(feature = "pure-rust", target_arch = "wasm32", target_arch = "wasm64")))]
pub use self::rsa::*;
#[cfg(any(feature = "pure-rust", target_arch = "wasm32", target_arch = "wasm64"))]
pub use self::rsa_legacy::*;
3 changes: 3 additions & 0 deletions src/algorithms/rsa.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#[cfg(any(feature = "pure-rust", target_arch = "wasm32", target_arch = "wasm64"))]
use superboring as boring;

use boring::bn::BigNum;
use boring::hash::MessageDigest;
use boring::pkey::{PKey, Private, Public};
Expand Down
Loading

0 comments on commit fb59a72

Please sign in to comment.