OpenTTD Source  20240919-master-gdf0233f4c2
network_crypto_internal.h File Reference
#include "network_crypto.h"

Go to the source code of this file.

Data Structures

struct  X25519Key
 Container for a X25519 key that is automatically crypto-wiped when destructed. More...
 
struct  X25519PublicKey
 Container for a X25519 public key. More...
 
struct  X25519SecretKey
 Container for a X25519 secret key. More...
 
struct  X25519Nonce
 Container for a X25519 nonce that is automatically crypto-wiped when destructed. More...
 
class  X25519DerivedKeys
 Container for the keys that derived from the X25519 key exchange mechanism. More...
 
class  X25519AuthenticationHandler
 Base for handlers using a X25519 key exchange to perform authentication. More...
 
class  X25519KeyExchangeOnlyClientHandler
 Client side handler for using X25519 without actual authentication. More...
 
class  X25519KeyExchangeOnlyServerHandler
 Server side handler for using X25519 without actual authentication. More...
 
class  X25519PAKEClientHandler
 Client side handler for using X25519 with a password-authenticated key exchange. More...
 
class  X25519PAKEServerHandler
 Server side handler for using X25519 with a password-authenticated key exchange. More...
 
class  X25519AuthorizedKeyClientHandler
 Handler for clients using a X25519 key exchange to perform authentication via a set of authorized (public) keys of clients. More...
 
class  X25519AuthorizedKeyServerHandler
 Handler for servers using a X25519 key exchange to perform authentication via a set of authorized (public) keys of clients. More...
 
class  CombinedAuthenticationClientHandler
 Handler for combining a number of authentication handlers, where the failure of one of the handlers will retry with another handler. More...
 
class  CombinedAuthenticationServerHandler
 Handler for combining a number of authentication handlers, where the failure of one of the handlers will retry with another handler. More...
 

Typedefs

using X25519Mac = std::array< uint8_t, X25519_MAC_SIZE >
 Container for a X25519 message authentication code.
 
using X25519KeyExchangeMessage = std::array< uint8_t, X25519_KEY_EXCHANGE_MESSAGE_SIZE >
 Container for a X25519 key exchange message.
 

Enumerations

enum  X25519KeyExchangeSide { X25519KeyExchangeSide::CLIENT, X25519KeyExchangeSide::SERVER }
 The side of the key exchange. More...
 

Variables

constexpr size_t X25519_KEY_SIZE = 32
 The number of bytes the public and secret keys are in X25519.
 
constexpr size_t X25519_NONCE_SIZE = 24
 The number of bytes the nonces are in X25519.
 
constexpr size_t X25519_MAC_SIZE = 16
 The number of bytes the message authentication codes are in X25519.
 
constexpr size_t X25519_KEY_EXCHANGE_MESSAGE_SIZE = 8
 The number of bytes the (random) payload of the authentication message has.
 

Detailed Description

Internal bits to the crypto of the network handling.

Definition in file network_crypto_internal.h.

Enumeration Type Documentation

◆ X25519KeyExchangeSide

enum X25519KeyExchangeSide
strong

The side of the key exchange.

Enumerator
CLIENT 

We are the client.

SERVER 

We are the server.

Definition at line 52 of file network_crypto_internal.h.