mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 01:37:34 +00:00
LibCrypto: Parse and store all RSA private key components
This commit is contained in:
parent
dc1180d6b2
commit
15836cc865
5 changed files with 168 additions and 73 deletions
|
@ -10,6 +10,14 @@
|
|||
|
||||
namespace Crypto::NumberTheory {
|
||||
|
||||
UnsignedBigInteger Mod(UnsignedBigInteger const& a, UnsignedBigInteger const& b)
|
||||
{
|
||||
UnsignedBigInteger result;
|
||||
result.set_to(a);
|
||||
result.set_to(result.divided_by(b).remainder);
|
||||
return result;
|
||||
}
|
||||
|
||||
UnsignedBigInteger ModularInverse(UnsignedBigInteger const& a_, UnsignedBigInteger const& b)
|
||||
{
|
||||
if (b == 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue