mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09:00

This was required only to support our custom TLS implementation, but does not serve any purpose other than forcing improper APIs.
22 lines
501 B
C++
22 lines
501 B
C++
/*
|
|
* Copyright (c) 2022, stelar7 <dudedbz@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/ByteBuffer.h>
|
|
|
|
namespace Crypto::Curves {
|
|
|
|
class X25519 {
|
|
public:
|
|
size_t key_size() { return 32; }
|
|
ErrorOr<ByteBuffer> generate_private_key();
|
|
ErrorOr<ByteBuffer> generate_public_key(ReadonlyBytes a);
|
|
ErrorOr<ByteBuffer> compute_coordinate(ReadonlyBytes a, ReadonlyBytes b);
|
|
ErrorOr<ByteBuffer> derive_premaster_key(ReadonlyBytes shared_point);
|
|
};
|
|
|
|
}
|