2018-06-10 14:05:48 +00:00
|
|
|
#ifndef LLARP_CRYPTO_HPP
|
|
|
|
#define LLARP_CRYPTO_HPP
|
|
|
|
|
|
|
|
#include <llarp/crypto.h>
|
|
|
|
#include <llarp/mem.h>
|
|
|
|
#include <llarp/threadpool.h>
|
|
|
|
#include <llarp/aligned.hpp>
|
|
|
|
|
|
|
|
namespace llarp
|
|
|
|
{
|
|
|
|
const byte_t*
|
|
|
|
seckey_topublic(const byte_t* secret);
|
|
|
|
|
2018-08-13 23:22:31 +00:00
|
|
|
const byte_t*
|
|
|
|
pq_keypair_to_public(const byte_t* keypair);
|
2018-06-10 14:05:48 +00:00
|
|
|
|
2018-08-13 23:22:31 +00:00
|
|
|
const byte_t*
|
|
|
|
pq_keypair_to_secret(const byte_t* keypair);
|
2018-06-10 14:05:48 +00:00
|
|
|
|
2018-08-13 23:22:31 +00:00
|
|
|
typedef AlignedBuffer< SHAREDKEYSIZE > SharedSecret;
|
|
|
|
typedef AlignedBuffer< 32 > KeyExchangeNonce;
|
2018-06-10 14:05:48 +00:00
|
|
|
typedef AlignedBuffer< PUBKEYSIZE > PubKey;
|
2018-06-12 11:57:14 +00:00
|
|
|
typedef AlignedBuffer< SECKEYSIZE > SecretKey;
|
|
|
|
typedef AlignedBuffer< SHORTHASHSIZE > ShortHash;
|
|
|
|
typedef AlignedBuffer< SIGSIZE > Signature;
|
|
|
|
typedef AlignedBuffer< TUNNONCESIZE > TunnelNonce;
|
2018-08-13 23:22:31 +00:00
|
|
|
typedef AlignedBuffer< NONCESIZE > SymmNonce;
|
|
|
|
typedef AlignedBuffer< 32 > SymmKey;
|
2018-06-12 11:57:14 +00:00
|
|
|
|
2018-08-13 23:22:31 +00:00
|
|
|
typedef AlignedBuffer< PQ_CIPHERTEXTSIZE + 1 > PQCipherBlock;
|
|
|
|
typedef AlignedBuffer< PQ_PUBKEYSIZE > PQPubKey;
|
|
|
|
typedef AlignedBuffer< PQ_KEYPAIRSIZE > PQKeyPair;
|
2018-06-12 11:57:14 +00:00
|
|
|
|
2018-07-09 03:34:29 +00:00
|
|
|
} // namespace llarp
|
2018-06-10 14:05:48 +00:00
|
|
|
|
|
|
|
#endif
|