Sourcemeta Core 0.0.0
Loading...
Searching...
No Matches
crypto_ecdh.h
1#ifndef SOURCEMETA_CORE_CRYPTO_ECDH_H_
2#define SOURCEMETA_CORE_CRYPTO_ECDH_H_
3
4#ifndef SOURCEMETA_CORE_CRYPTO_EXPORT
5#include <sourcemeta/core/crypto_export.h>
6#endif
7
8#include <sourcemeta/core/crypto_sign.h>
9#include <sourcemeta/core/crypto_verify.h>
10
11#include <cstddef> // std::size_t
12#include <optional> // std::optional
13#include <string> // std::string
14#include <string_view> // std::string_view
15
16namespace sourcemeta::core {
17
32auto SOURCEMETA_CORE_CRYPTO_EXPORT ecdh_derive(const PrivateKey &private_key,
33 const PublicKey &public_key)
34 -> std::optional<std::string>;
35
53auto SOURCEMETA_CORE_CRYPTO_EXPORT kdf_concat(
54 const std::string_view shared_secret, const std::string_view algorithm_id,
55 const std::string_view party_u_info, const std::string_view party_v_info,
56 const std::size_t derived_key_bytes) -> std::optional<std::string>;
57
58} // namespace sourcemeta::core
59
60#endif
Definition crypto_sign.h:33
Definition crypto_verify.h:62
auto SOURCEMETA_CORE_CRYPTO_EXPORT kdf_concat(const std::string_view shared_secret, const std::string_view algorithm_id, const std::string_view party_u_info, const std::string_view party_v_info, const std::size_t derived_key_bytes) -> std::optional< std::string >
auto SOURCEMETA_CORE_CRYPTO_EXPORT ecdh_derive(const PrivateKey &private_key, const PublicKey &public_key) -> std::optional< std::string >