|
Leancrypto 1.7.2
Post-Quantum Cryptographic Library
|
Functions | |
| void | lc_rerun_selftests (void) |
| (Re-)run the self tests More... | |
| void | lc_rerun_one_selftest (uint64_t flag) |
| (re-)run a self test for one algorithm More... | |
| enum lc_alg_status_val | lc_lib_alg_status (void) |
| Return status information about library itself. More... | |
| void | lc_fips_integrity_checker (void) |
| Re-run the FIPS 140 integrity test. More... | |
| int | lc_status (char *outbuf, size_t outlen) |
| Status information about leancrypto. More... | |
| enum lc_alg_status_result | lc_status_get_result (uint64_t algorithm) |
| Return the self test status for the algorithm. More... | |
| int | lc_alg_disable_selftests (void) |
| Disable all algorithm startup self tests. More... | |
Concept of status in leancrypto
The library maintains a status for each algorithm indicating the information given in lc_alg_status_val. For each algorithm type, a query function is provided that returns the respective inforamtion.
The status information can be obtained with the different lc_<type>_ctx_alg_status and lc_<type>_alg_status functions.
| int lc_alg_disable_selftests | ( | void | ) |
Disable all algorithm startup self tests.
At runtime, before the first use of any algorithm, an algorithm-spedific self test is performed to verify that the cryptographic algorithm operates correctly. With this API call, the caller can prevent the execution of all future algorithm self tests.
This call effectively marks all self tests as passed. If a self test failed before this API call for a given algorithm, the algorithm will remain in failure mode.
| void lc_fips_integrity_checker | ( | void | ) |
Re-run the FIPS 140 integrity test.
| enum lc_alg_status_val lc_lib_alg_status | ( | void | ) |
Return status information about library itself.
| void lc_rerun_one_selftest | ( | uint64_t | flag | ) |
(re-)run a self test for one algorithm
| [in] | flag | Algorithm reference of one of the LC_ALG_STATUS_* flagsc |
| void lc_rerun_selftests | ( | void | ) |
(Re-)run the self tests
If the self tests were already executed for a given algorithm, they are triggered again.
This API is only allowed to be used in non-FIPS mode. This is due to the requirements of FIPS that when triggering a rerun, e.g. after a failure, all self tests have to be executed immediately instead of lazily. This is not implemented.
| int lc_status | ( | char * | outbuf, |
| size_t | outlen | ||
| ) |
Status information about leancrypto.
| [in] | outbuf | Buffer to be filled with status information, allocated by caller |
| [in] | outlen | Size of the output buffer |
| enum lc_alg_status_result lc_status_get_result | ( | uint64_t | algorithm | ) |
Return the self test status for the algorithm.
| [in] | algorithm | Specify the algorithm(s) for which the self test status shall be returned. |