Skip to content

Commit

Permalink
Update rsa tests
Browse files Browse the repository at this point in the history
  • Loading branch information
0xphen committed Nov 7, 2023
1 parent 83c4aa8 commit e3c9f73
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rsa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ impl RSA {
let n: BigInt = (&p * &q).to_bigint().unwrap();

// Calculate Euler's totient function, phi(n), which is (p-1)*(q-1).
// ϕ(N) is multiplicative. Since N = p * q
// Hence: ϕ(p * q) = ϕ(p) * ϕ(q)
// ϕ(N) is multiplicative. Since N = p * q,
// hence ϕ(p * q) = ϕ(p) * ϕ(q)
let phi_n = (&p - 1) * (&q - 1);

// Create BigInt from the constant exponent.
Expand Down Expand Up @@ -70,7 +70,7 @@ mod tests {
use super::*;

#[test]
fn test_rsa() {
fn simple_test() {
let msg = BigInt::from(4i32);

let rsa = RSA::new();
Expand Down

0 comments on commit e3c9f73

Please sign in to comment.