DKTP: Dual Key Tunneling Protocol 1.0.0.0a (A1)
A quantum secure dual-key encrypted tunneling protocol
kex.h
Go to the documentation of this file.
1/* 2025 Quantum Resistant Cryptographic Solutions Corporation
2 * All Rights Reserved.
3 *
4 * NOTICE: This software and all accompanying materials are the exclusive
5 * property of Quantum Resistant Cryptographic Solutions Corporation (QRCS).
6 * The intellectual and technical concepts contained within this implementation
7 * are proprietary to QRCS and its authorized licensors and are protected under
8 * applicable U.S. and international copyright, patent, and trade secret laws.
9 *
10 * CRYPTOGRAPHIC STANDARDS:
11 * - This software includes implementations of cryptographic algorithms such as
12 * SHA3, AES, and others. These algorithms are public domain or standardized
13 * by organizations such as NIST and are NOT the property of QRCS.
14 * - However, all source code, optimizations, and implementations in this library
15 * are original works of QRCS and are protected under this license.
16 *
17 * RESTRICTIONS:
18 * - Redistribution, modification, or unauthorized distribution of this software,
19 * in whole or in part, is strictly prohibited.
20 * - This software is provided for non-commercial, educational, and research
21 * purposes only. Commercial use in any form is expressly forbidden.
22 * - Licensing and authorized distribution are solely at the discretion of QRCS.
23 * - Any use of this software implies acceptance of these restrictions.
24 *
25 * DISCLAIMER:
26 * This software is provided "as is," without warranty of any kind, express or
27 * implied, including but not limited to warranties of merchantability or fitness
28 * for a particular purpose. QRCS disclaims all liability for any direct, indirect,
29 * incidental, or consequential damages resulting from the use or misuse of this software.
30 *
31 * FULL LICENSE:
32 * This software is subject to the **Quantum Resistant Cryptographic Solutions
33 * Proprietary License (QRCS-PL)**. The complete license terms are included
34 * in the LICENSE.txt file distributed with this software.
35 *
36 * Written by: John G. Underhill
37 * Contact: contact@qrcscorp.ca
38 */
39
40#ifndef DKTP_KEX_H
41#define DKTP_KEX_H
42
43#include "dktp.h"
44
66
100
124
141
158
176bool dktp_kex_test(void);
177
178#endif
DKTP support header Common defined parameters and functions of the DKTP client and server implementat...
#define DKTP_ASYMMETRIC_SIGNING_KEY_SIZE
The byte size of the asymmetric signature signing-key array.
Definition dktp.h:411
#define DKTP_SECRET_SIZE
The size of the shared secret for each channel.
Definition dktp.h:310
dktp_errors
The DKTP error values.
Definition dktp.h:760
#define DKTP_ASYMMETRIC_VERIFY_KEY_SIZE
The byte size of the asymmetric signature verification-key array.
Definition dktp.h:417
#define DKTP_HASH_SIZE
The 512-bit hash function size.
Definition dktp.h:154
#define DKTP_ASYMMETRIC_ENCAPSULATION_KEY_SIZE
The byte size of the asymmetric cipher public-key array.
Definition dktp.h:405
#define DKTP_ASYMMETRIC_DECAPSULATION_KEY_SIZE
The byte size of the asymmetric cipher private-key array.
Definition dktp.h:399
#define DKTP_KEYID_SIZE
The DKTP key identity size.
Definition dktp.h:253
dktp_errors dktp_kex_client_key_exchange(dktp_kex_client_state *kcs, dktp_connection_state *cns)
Execute the client-side key exchange.
Definition kex.c:860
dktp_errors dktp_kex_server_key_exchange(dktp_kex_server_state *kss, dktp_connection_state *cns)
Execute the server-side key exchange.
Definition kex.c:1110
bool dktp_kex_test(void)
Run internal tests for the key exchange functions.
Definition kex.c:1349
The DKTP socket connection state structure.
Definition dktp.h:902
Internal state for the Duplex key exchange (client-side).
Definition kex.h:87
uint8_t enckey[DKTP_ASYMMETRIC_ENCAPSULATION_KEY_SIZE]
Definition kex.h:91
uint8_t pssr[DKTP_SECRET_SIZE]
Definition kex.h:93
uint8_t secl[DKTP_SECRET_SIZE]
Definition kex.h:96
uint8_t schash[DKTP_HASH_SIZE]
Definition kex.h:89
uint64_t expiration
Definition kex.h:98
uint8_t keyid[DKTP_KEYID_SIZE]
Definition kex.h:88
uint8_t verkey[DKTP_ASYMMETRIC_VERIFY_KEY_SIZE]
Definition kex.h:97
uint8_t deckey[DKTP_ASYMMETRIC_DECAPSULATION_KEY_SIZE]
Definition kex.h:90
uint8_t pssl[DKTP_SECRET_SIZE]
Definition kex.h:92
uint8_t sigkey[DKTP_ASYMMETRIC_SIGNING_KEY_SIZE]
Definition kex.h:95
uint8_t rverkey[DKTP_ASYMMETRIC_VERIFY_KEY_SIZE]
Definition kex.h:94
Internal state for the Duplex key exchange (server-side).
Definition kex.h:112
uint8_t enckey[DKTP_ASYMMETRIC_ENCAPSULATION_KEY_SIZE]
Definition kex.h:116
uint8_t pssr[DKTP_SECRET_SIZE]
Definition kex.h:118
uint8_t schash[DKTP_HASH_SIZE]
Definition kex.h:114
uint64_t expiration
Definition kex.h:122
uint8_t keyid[DKTP_KEYID_SIZE]
Definition kex.h:113
uint8_t verkey[DKTP_ASYMMETRIC_VERIFY_KEY_SIZE]
Definition kex.h:121
uint8_t deckey[DKTP_ASYMMETRIC_DECAPSULATION_KEY_SIZE]
Definition kex.h:115
uint8_t pssl[DKTP_SECRET_SIZE]
Definition kex.h:117
uint8_t sigkey[DKTP_ASYMMETRIC_SIGNING_KEY_SIZE]
Definition kex.h:120
uint8_t rverkey[DKTP_ASYMMETRIC_VERIFY_KEY_SIZE]
Definition kex.h:119