print all keys immediately after generating
This commit is contained in:
parent
c9e5bef814
commit
eb014e6d32
1 changed files with 4 additions and 5 deletions
|
@ -152,19 +152,18 @@ fn main() {
|
|||
.expect("key length must be usize");
|
||||
|
||||
let p1: BigUint = thread_rng().gen_prime_exact(n, Some(PrimalityTestConfig::strict()));
|
||||
let p2: BigUint = thread_rng().gen_prime_exact(n, Some(PrimalityTestConfig::strict()));
|
||||
|
||||
println!("p1 ({b} bits): {p1}", b = p1.bits());
|
||||
|
||||
let p2: BigUint = thread_rng().gen_prime_exact(n, Some(PrimalityTestConfig::strict()));
|
||||
println!("p2 ({b} bits): {p2}", b = p1.bits());
|
||||
|
||||
let pair_a = generate_key_pair(&p1, &p2)
|
||||
.expect("failed to generate key pair a");
|
||||
println!("private key A: {}", pair_a.private);
|
||||
println!("public key A: {}", pair_a.public);
|
||||
|
||||
let pair_b = generate_key_pair(&p1, &p2)
|
||||
.expect("failed to generate key pair b");
|
||||
|
||||
println!("private key A: {}", pair_a.private);
|
||||
println!("public key A: {}", pair_a.public);
|
||||
println!("private key B: {}", pair_b.private);
|
||||
println!("public key B: {}", pair_b.public);
|
||||
|
||||
|
|
Loading…
Reference in a new issue