mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
e07ec02470
All the elliptic curve implementations had a long list of private methods which were all stored in a single .cpp file. Now we simply use static methods instead.
23 lines
611 B
C++
23 lines
611 B
C++
/*
|
|
* Copyright (c) 2022, stelar7 <dudedbz@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/ByteBuffer.h>
|
|
#include <LibCrypto/Curves/EllipticCurve.h>
|
|
|
|
namespace Crypto::Curves {
|
|
|
|
class X448 : public EllipticCurve {
|
|
public:
|
|
size_t key_size() override { return 56; }
|
|
ErrorOr<ByteBuffer> generate_private_key() override;
|
|
ErrorOr<ByteBuffer> generate_public_key(ReadonlyBytes a) override;
|
|
ErrorOr<ByteBuffer> compute_coordinate(ReadonlyBytes a, ReadonlyBytes b) override;
|
|
ErrorOr<ByteBuffer> derive_premaster_key(ReadonlyBytes shared_point) override;
|
|
};
|
|
|
|
}
|