1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:57:45 +00:00

LibCrypto: Rename UnsignedBigInteger APIs to match their actions

This commit is contained in:
AnotherTest 2020-04-27 19:05:17 +04:30 committed by Andreas Kling
parent e366416d51
commit adab43987d
5 changed files with 62 additions and 62 deletions

View file

@ -129,11 +129,11 @@ public:
do {
p = NumberTheory::random_big_prime(bits / 2);
q = NumberTheory::random_big_prime(bits / 2);
lambda = NumberTheory::LCM(p.sub(1), q.sub(1));
lambda = NumberTheory::LCM(p.minus(1), q.minus(1));
dbg() << "checking combination p=" << p << ", q=" << q << ", lambda=" << lambda.length();
} while (!(NumberTheory::GCD(e, lambda) == 1));
auto n = p.multiply(q);
auto n = p.multiplied_by(q);
auto d = NumberTheory::ModularInverse(e, lambda);
dbg() << "Your keys are Pub{n=" << n << ", e=" << e << "} and Priv{n=" << n << ", d=" << d << "}";