DKTP: Dual Key Tunneling Protocol 1.0.0.0a (A1)
A quantum secure dual-key encrypted tunneling protocol
|
DKTP Key Exchange Functions. More...
#include "dktp.h"
Go to the source code of this file.
Data Structures | |
struct | dktp_kex_client_state |
Internal state for the Duplex key exchange (client-side). More... | |
struct | dktp_kex_server_state |
Internal state for the Duplex key exchange (server-side). More... |
Typedefs | |
typedef struct dktp_kex_client_state | dktp_kex_client_state |
typedef struct dktp_kex_server_state | dktp_kex_server_state |
Functions | |
dktp_errors | dktp_kex_server_key_exchange (dktp_kex_server_state *kss, dktp_connection_state *cns) |
Execute the server-side key exchange. | |
dktp_errors | dktp_kex_client_key_exchange (dktp_kex_client_state *kcs, dktp_connection_state *cns) |
Execute the client-side key exchange. | |
bool | dktp_kex_test (void) |
Run internal tests for the key exchange functions. |
DKTP Key Exchange Functions.
This header file contains the internal key exchange functions for the Dual Key Tunneling Protocol (DKTP).
The file defines internal state structures for both the client and server roles in the key exchange. These structures encapsulate various cryptographic parameters such as key identities, session token hashes, asymmetric keys (for encryption, signing, and verification), shared secrets, and session expiration times.
The following internal (non-exportable) functions are declared:
dktp_kex_server_key_exchange:
Executes the server-side Duplex key exchange.dktp_kex_client_key_exchange:
Executes the client-side Duplex key exchange.dktp_kex_simplex_server_key_exchange:
Executes the server-side Simplex key exchange.dktp_kex_simplex_client_key_exchange:
Executes the client-side Simplex key exchange.dktp_kex_test:
Runs a suite of internal tests to validate the correctness of the key exchange operations.dktp_errors dktp_kex_client_key_exchange | ( | dktp_kex_client_state * | kcs, |
dktp_connection_state * | cns ) |
Execute the client-side key exchange.
This function initiates and completes the key exchange from the client side. It processes the server's response, computes the shared secret, and updates the DKTP connection state with the derived cryptographic parameters.
kcs | A pointer to the client key exchange state structure. |
cns | A pointer to the current DKTP connection state. |
dktp_errors
representing the result of the key exchange operation.dktp_errors dktp_kex_server_key_exchange | ( | dktp_kex_server_state * | kss, |
dktp_connection_state * | cns ) |
Execute the server-side key exchange.
This function processes an incoming key exchange request on the server side. It uses the server key exchange state (dktp_kex_server_state
) to verify client credentials, exchange the necessary asymmetric keys, and update the DKTP connection state accordingly.
kss | A pointer to the server key exchange state structure. |
cns | A pointer to the current DKTP connection state. |
dktp_errors
indicating the outcome of the key exchange process.bool dktp_kex_test | ( | void | ) |
Run internal tests for the key exchange functions.
This function executes a suite of internal tests designed to validate the correct operation of the DKTP key exchange mechanisms. The tests include:
The function returns true if all internal tests pass, confirming the reliability and correctness of the key exchange implementation.