/* * Copyright (c) 2022, Michiel Visser * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include namespace Crypto::Curves { class EllipticCurve { public: virtual size_t key_size() = 0; virtual ErrorOr generate_private_key() = 0; virtual ErrorOr generate_public_key(ReadonlyBytes a) = 0; virtual ErrorOr compute_coordinate(ReadonlyBytes scalar_bytes, ReadonlyBytes point_bytes) = 0; virtual ErrorOr derive_premaster_key(ReadonlyBytes shared_point) = 0; virtual ~EllipticCurve() = default; }; }