Quantum Secure Tunneling Protocol 1.0.0.0a (A1)
A three-party quantum secure encrypted tunneling protocol
|
QSTP key exchange functions. More...
Go to the source code of this file.
Data Structures | |
struct | qstp_kex_client_state |
The QSTP client state structure. More... | |
struct | qstp_kex_server_state |
The QSTP server state structure. More... | |
Typedefs | |
typedef struct qstp_kex_client_state | qstp_kex_client_state |
typedef struct qstp_kex_server_state | qstp_kex_server_state |
Functions | |
qstp_errors | qstp_kex_server_key_exchange (qstp_kex_server_state *kss, qstp_connection_state *cns) |
Run the network server version of the key exchange. | |
qstp_errors | qstp_kex_client_key_exchange (qstp_kex_client_state *kcs, qstp_connection_state *cns) |
Run the network client version of the key exchange. | |
QSTP key exchange functions.
This header defines internal functions and state structures used for performing the key exchange in the Quantum Secure Tunneling Protocol (QSTP). The key exchange is a one-way process in which the client receives cryptographic parameters from the server that are used to establish a secure tunnel.
The key exchange mechanism in QSTP is responsible for:
The following state structures are defined:
qstp_kex_client_state:
Used by the client during the key exchange, it stores the session token hash, the server certificate serial number, the server's asymmetric signature verification key, and an expiration timestamp.qstp_kex_server_state:
Used by the server during the key exchange, it holds pointers to the server's private and public asymmetric cipher keys, a certificate serial number (serving as the key identity), a session token hash, the server's private signing key, the local public verification key, and an expiration timestamp.The following internal (non-exportable) functions are declared:
qstp_kex_server_key_exchange:
Executes the server-side operations of the key exchange by processing the client's request, verifying the cryptographic parameters, and updating the connection state.qstp_kex_client_key_exchange:
Executes the client-side operations of the key exchange by processing the server's response, extracting the cryptographic parameters, and ensuring the key exchange completes successfully.qstp_errors qstp_kex_client_key_exchange | ( | qstp_kex_client_state * | kcs, |
qstp_connection_state * | cns ) |
Run the network client version of the key exchange.
This internal function executes the client-side key exchange. It processes the response from the server, extracts the session token hash, server certificate serial number, and the server's public verification key, and verifies the expiration timestamp to ensure the key exchange is valid.
kcs | A pointer to the client key exchange state structure (qstp_kex_client_state ). |
cns | A pointer to the QSTP connection state structure. |
qstp_errors
indicating the success or failure of the key exchange. qstp_errors qstp_kex_server_key_exchange | ( | qstp_kex_server_state * | kss, |
qstp_connection_state * | cns ) |
Run the network server version of the key exchange.
This internal function performs the server-side key exchange. It processes the client's key exchange request by using the server key exchange state. The function validates the received session token hash, certificate serial number, and updates the QSTP connection state accordingly.
kss | A pointer to the server key exchange state structure (qstp_kex_server_state ). |
cns | A pointer to the QSTP connection state structure. |
qstp_errors
indicating the outcome of the key exchange.