lokinet/include/llarp/crypto.hpp

37 lines
1000 B
C++
Raw Normal View History

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);
const byte_t*
pq_keypair_to_public(const byte_t* keypair);
2018-06-10 14:05:48 +00:00
const byte_t*
pq_keypair_to_secret(const byte_t* keypair);
2018-06-10 14:05:48 +00:00
typedef AlignedBuffer< SHAREDKEYSIZE > SharedSecret;
typedef AlignedBuffer< 32 > KeyExchangeNonce;
2018-06-10 14:05:48 +00:00
typedef AlignedBuffer< PUBKEYSIZE > PubKey;
typedef AlignedBuffer< SECKEYSIZE > SecretKey;
typedef AlignedBuffer< SHORTHASHSIZE > ShortHash;
typedef AlignedBuffer< SIGSIZE > Signature;
typedef AlignedBuffer< TUNNONCESIZE > TunnelNonce;
typedef AlignedBuffer< NONCESIZE > SymmNonce;
typedef AlignedBuffer< 32 > SymmKey;
typedef AlignedBuffer< PQ_CIPHERTEXTSIZE + 1 > PQCipherBlock;
typedef AlignedBuffer< PQ_PUBKEYSIZE > PQPubKey;
typedef AlignedBuffer< PQ_KEYPAIRSIZE > PQKeyPair;
2018-07-09 03:34:29 +00:00
} // namespace llarp
2018-06-10 14:05:48 +00:00
#endif