/* * Copyright (c) 2022, stelar7 * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace Crypto::Curves { class X25519 : public EllipticCurve { public: size_t key_size() override { return 32; } ErrorOr generate_private_key() override; ErrorOr generate_public_key(ReadonlyBytes a) override; ErrorOr compute_coordinate(ReadonlyBytes a, ReadonlyBytes b) override; ErrorOr derive_premaster_key(ReadonlyBytes shared_point) override; }; }