Skip to content

Commit

Permalink
pad pass keys
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Jul 7, 2024
1 parent 9c15ea9 commit 926e947
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/pss.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,17 +281,20 @@ mod test {
// tAboUGBxTDq3ZroNism3DaMIbKPyYrAqhKov1h5V
// -----END RSA PRIVATE KEY-----

let bits = 512;
RsaPrivateKey::from_components(
Odd::new(BoxedUint::from_be_hex("9353930466774385905609975137998169297361893554149986716853295022578535724979677252958524466350471210367835187480748268864277464700638583474144061408845077", bits).unwrap()).unwrap(),
65537,
BoxedUint::from_be_hex("7266398431328116344057699379749222532279343923819063639497049039389899328538543087657733766554155839834519529439851673014800261285757759040931985506583861", bits).unwrap(),
vec![
BoxedUint::from_be_hex("98920366548084643601728869055592650835572950932266967461790948584315647051443",bits).unwrap(),
BoxedUint::from_be_hex("94560208308847015747498523884063394671606671904944666360068158221458669711639", bits).unwrap()
],
let n= BoxedUint::from_be_hex("0000009353930466774385905609975137998169297361893554149986716853295022578535724979677252958524466350471210367835187480748268864277464700638583474144061408845077", 640).unwrap();
let d= BoxedUint::from_be_hex("0000007266398431328116344057699379749222532279343923819063639497049039389899328538543087657733766554155839834519529439851673014800261285757759040931985506583861", 640).unwrap();
let p = BoxedUint::from_be_hex(
"00098920366548084643601728869055592650835572950932266967461790948584315647051443",
320,
)
.unwrap()
.unwrap();
let q = BoxedUint::from_be_hex(
"00094560208308847015747498523884063394671606671904944666360068158221458669711639",
320,
)
.unwrap();

RsaPrivateKey::from_components(Odd::new(n).unwrap(), 65537, d, vec![p, q]).unwrap()
}

#[test]
Expand Down

0 comments on commit 926e947

Please sign in to comment.