QSMP: Quantum Secure Messaging Protocol 1.3.0.0a (A3)
A quantum secure encrypted tunneling protocol
|
QSMP Key Exchange Functions. More...
Go to the source code of this file.
Data Structures | |
struct | qsmp_kex_duplex_client_state |
Internal state for the Duplex key exchange (client-side). More... | |
struct | qsmp_kex_duplex_server_state |
Internal state for the Duplex key exchange (server-side). More... | |
struct | qsmp_kex_simplex_client_state |
Internal state for the Simplex key exchange (client-side). More... | |
struct | qsmp_kex_simplex_server_state |
Internal state for the Simplex key exchange (server-side). More... | |
Functions | |
qsmp_errors | qsmp_kex_duplex_server_key_exchange (qsmp_kex_duplex_server_state *kss, qsmp_connection_state *cns) |
Execute the server-side Duplex key exchange. | |
qsmp_errors | qsmp_kex_duplex_client_key_exchange (qsmp_kex_duplex_client_state *kcs, qsmp_connection_state *cns) |
Execute the client-side Duplex key exchange. | |
qsmp_errors | qsmp_kex_simplex_server_key_exchange (qsmp_kex_simplex_server_state *kss, qsmp_connection_state *cns) |
Execute the server-side Simplex key exchange. | |
qsmp_errors | qsmp_kex_simplex_client_key_exchange (qsmp_kex_simplex_client_state *kcs, qsmp_connection_state *cns) |
Execute the client-side Simplex key exchange. | |
bool | qsmp_kex_test () |
Run internal tests for the key exchange functions. | |
QSMP Key Exchange Functions.
This header file contains the internal key exchange functions for the Quantum Secure Messaging Protocol (QSMP). QSMP supports two key exchange variants:
The file defines internal state structures for both the client and server roles in Duplex and Simplex key exchanges. 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:
qsmp_kex_duplex_server_key_exchange:
Executes the server-side Duplex key exchange.qsmp_kex_duplex_client_key_exchange:
Executes the client-side Duplex key exchange.qsmp_kex_simplex_server_key_exchange:
Executes the server-side Simplex key exchange.qsmp_kex_simplex_client_key_exchange:
Executes the client-side Simplex key exchange.qsmp_kex_test:
Runs a suite of internal tests to validate the correctness of the key exchange operations.qsmp_errors qsmp_kex_duplex_client_key_exchange | ( | qsmp_kex_duplex_client_state * | kcs, |
qsmp_connection_state * | cns ) |
Execute the client-side Duplex key exchange.
This function initiates and completes the Duplex key exchange from the client side. It processes the server's response, computes the shared secret, and updates the QSMP connection state with the derived cryptographic parameters.
kcs | A pointer to the duplex client key exchange state structure. |
cns | A pointer to the current QSMP connection state. |
qsmp_errors
representing the result of the key exchange operation.qsmp_errors qsmp_kex_duplex_server_key_exchange | ( | qsmp_kex_duplex_server_state * | kss, |
qsmp_connection_state * | cns ) |
Execute the server-side Duplex key exchange.
This function processes an incoming Duplex key exchange request on the server side. It uses the server key exchange state (qsmp_kex_duplex_server_state
) to verify client credentials, exchange the necessary asymmetric keys, and update the QSMP connection state accordingly.
kss | A pointer to the duplex server key exchange state structure. |
cns | A pointer to the current QSMP connection state. |
qsmp_errors
indicating the outcome of the key exchange process.qsmp_errors qsmp_kex_simplex_client_key_exchange | ( | qsmp_kex_simplex_client_state * | kcs, |
qsmp_connection_state * | cns ) |
Execute the client-side Simplex key exchange.
This function initiates and completes the Simplex key exchange from the client side. It exchanges the necessary cryptographic keys, verifies the server's identity using the remote verification key, and updates the QSMP connection state with the established session parameters.
kcs | A pointer to the simplex client key exchange state structure. |
cns | A pointer to the current QSMP connection state. |
qsmp_errors
representing the outcome of the key exchange process.qsmp_errors qsmp_kex_simplex_server_key_exchange | ( | qsmp_kex_simplex_server_state * | kss, |
qsmp_connection_state * | cns ) |
Execute the server-side Simplex key exchange.
This function handles the Simplex key exchange on the server side. It processes the client's connection request, validates the provided cryptographic material, and updates the QSMP connection state with the negotiated session parameters.
kss | A pointer to the simplex server key exchange state structure. |
cns | A pointer to the current QSMP connection state. |
qsmp_errors
indicating the success or failure of the key exchange.bool qsmp_kex_test | ( | ) |
Run internal tests for the key exchange functions.
This function executes a suite of internal tests designed to validate the correct operation of the QSMP 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.