---
title: llarp/crypto/constants.hpp

---

# llarp/crypto/constants.hpp



## Attributes

|                | Name           |
| -------------- | -------------- |
| constexpr uint32_t | **[PUBKEYSIZE](Files/constants_8hpp.md#variable-pubkeysize)**  |
| constexpr uint32_t | **[SECKEYSIZE](Files/constants_8hpp.md#variable-seckeysize)**  |
| constexpr uint32_t | **[NONCESIZE](Files/constants_8hpp.md#variable-noncesize)**  |
| constexpr uint32_t | **[SHAREDKEYSIZE](Files/constants_8hpp.md#variable-sharedkeysize)**  |
| constexpr uint32_t | **[HASHSIZE](Files/constants_8hpp.md#variable-hashsize)**  |
| constexpr uint32_t | **[SHORTHASHSIZE](Files/constants_8hpp.md#variable-shorthashsize)**  |
| constexpr uint32_t | **[HMACSECSIZE](Files/constants_8hpp.md#variable-hmacsecsize)**  |
| constexpr uint32_t | **[SIGSIZE](Files/constants_8hpp.md#variable-sigsize)**  |
| constexpr uint32_t | **[TUNNONCESIZE](Files/constants_8hpp.md#variable-tunnoncesize)**  |
| constexpr uint32_t | **[HMACSIZE](Files/constants_8hpp.md#variable-hmacsize)**  |
| constexpr uint32_t | **[PATHIDSIZE](Files/constants_8hpp.md#variable-pathidsize)**  |
| constexpr uint32_t | **[PQ_CIPHERTEXTSIZE](Files/constants_8hpp.md#variable-pq-ciphertextsize)**  |
| constexpr uint32_t | **[PQ_PUBKEYSIZE](Files/constants_8hpp.md#variable-pq-pubkeysize)**  |
| constexpr uint32_t | **[PQ_SECRETKEYSIZE](Files/constants_8hpp.md#variable-pq-secretkeysize)**  |
| constexpr uint32_t | **[PQ_KEYPAIRSIZE](Files/constants_8hpp.md#variable-pq-keypairsize)**  |



## Attributes Documentation

### variable PUBKEYSIZE

```cpp
static constexpr uint32_t PUBKEYSIZE = 32;
```


### variable SECKEYSIZE

```cpp
static constexpr uint32_t SECKEYSIZE = 64;
```


### variable NONCESIZE

```cpp
static constexpr uint32_t NONCESIZE = 24;
```


### variable SHAREDKEYSIZE

```cpp
static constexpr uint32_t SHAREDKEYSIZE = 32;
```


### variable HASHSIZE

```cpp
static constexpr uint32_t HASHSIZE = 64;
```


### variable SHORTHASHSIZE

```cpp
static constexpr uint32_t SHORTHASHSIZE = 32;
```


### variable HMACSECSIZE

```cpp
static constexpr uint32_t HMACSECSIZE = 32;
```


### variable SIGSIZE

```cpp
static constexpr uint32_t SIGSIZE = 64;
```


### variable TUNNONCESIZE

```cpp
static constexpr uint32_t TUNNONCESIZE = 32;
```


### variable HMACSIZE

```cpp
static constexpr uint32_t HMACSIZE = 32;
```


### variable PATHIDSIZE

```cpp
static constexpr uint32_t PATHIDSIZE = 16;
```


### variable PQ_CIPHERTEXTSIZE

```cpp
static constexpr uint32_t PQ_CIPHERTEXTSIZE =  1047;
```


### variable PQ_PUBKEYSIZE

```cpp
static constexpr uint32_t PQ_PUBKEYSIZE =  1218;
```


### variable PQ_SECRETKEYSIZE

```cpp
static constexpr uint32_t PQ_SECRETKEYSIZE =  1600;
```


### variable PQ_KEYPAIRSIZE

```cpp
static constexpr uint32_t PQ_KEYPAIRSIZE = (PQ_SECRETKEYSIZE + PQ_PUBKEYSIZE);
```



## Source code

```cpp
#pragma once

#include <cstdint>

#include <libntrup/ntru.h>

static constexpr uint32_t PUBKEYSIZE = 32;
static constexpr uint32_t SECKEYSIZE = 64;
static constexpr uint32_t NONCESIZE = 24;
static constexpr uint32_t SHAREDKEYSIZE = 32;
static constexpr uint32_t HASHSIZE = 64;
static constexpr uint32_t SHORTHASHSIZE = 32;
static constexpr uint32_t HMACSECSIZE = 32;
static constexpr uint32_t SIGSIZE = 64;
static constexpr uint32_t TUNNONCESIZE = 32;
static constexpr uint32_t HMACSIZE = 32;
static constexpr uint32_t PATHIDSIZE = 16;

static constexpr uint32_t PQ_CIPHERTEXTSIZE = crypto_kem_CIPHERTEXTBYTES;
static constexpr uint32_t PQ_PUBKEYSIZE = crypto_kem_PUBLICKEYBYTES;
static constexpr uint32_t PQ_SECRETKEYSIZE = crypto_kem_SECRETKEYBYTES;
static constexpr uint32_t PQ_KEYPAIRSIZE = (PQ_SECRETKEYSIZE + PQ_PUBKEYSIZE);
```


-------------------------------

Updated on 2023-04-27 at 04:17:17 +0000
