mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-07 20:31:04 +03:00
LibCrypto: Move JacobianPoint into the curve cpp file
This commit is contained in:
parent
4efbb10a36
commit
6b5c6e7c03
Notes:
sideshowbarker
2024-07-17 00:49:59 +09:00
Author: https://github.com/msvisser Commit: https://github.com/SerenityOS/serenity/commit/6b5c6e7c03 Pull-request: https://github.com/SerenityOS/serenity/pull/21875 Issue: https://github.com/SerenityOS/serenity/issues/21211
@ -15,6 +15,12 @@
|
||||
|
||||
namespace Crypto::Curves {
|
||||
|
||||
struct JacobianPoint {
|
||||
u256 x { 0u };
|
||||
u256 y { 0u };
|
||||
u256 z { 0u };
|
||||
};
|
||||
|
||||
static constexpr u256 calculate_modular_inverse_mod_r(u256 value)
|
||||
{
|
||||
// Calculate the modular multiplicative inverse of value mod 2^256 using the extended euclidean algorithm
|
||||
|
@ -12,12 +12,6 @@
|
||||
|
||||
namespace Crypto::Curves {
|
||||
|
||||
struct JacobianPoint {
|
||||
u256 x { 0u };
|
||||
u256 y { 0u };
|
||||
u256 z { 0u };
|
||||
};
|
||||
|
||||
class SECP256r1 : public EllipticCurve {
|
||||
public:
|
||||
size_t key_size() override { return 1 + 2 * 32; }
|
||||
|
Loading…
Reference in New Issue
Block a user