|
Leancrypto 1.6.0
Post-Quantum Cryptographic Library
|
Go to the source code of this file.
Macros | |
| #define | LC_ALG_STATUS_AES_GCM (LC_ALG_STATUS_TYPE_AEAD | LC_ALG_STATUS_FLAG_AES_GCM) |
| #define | LC_ALG_STATUS_ASCON_AEAD_128 (LC_ALG_STATUS_TYPE_AEAD | LC_ALG_STATUS_FLAG_ASCON_AEAD_128) |
| #define | LC_ALG_STATUS_ASCON_KECCAK (LC_ALG_STATUS_TYPE_AEAD | LC_ALG_STATUS_FLAG_ASCON_KECCAK) |
| #define | LC_ALG_STATUS_CHACHA20_POLY1305 (LC_ALG_STATUS_TYPE_AEAD | LC_ALG_STATUS_FLAG_CHACHA20_POLY1305) |
| #define | LC_ALG_STATUS_CSHAKE_CRYPT (LC_ALG_STATUS_TYPE_AEAD | LC_ALG_STATUS_FLAG_CSHAKE_CRYPT) |
| #define | LC_ALG_STATUS_HASH_CRYPT (LC_ALG_STATUS_TYPE_AEAD | LC_ALG_STATUS_FLAG_HASH_CRYPT) |
| #define | LC_ALG_STATUS_KMAC_CRYPT (LC_ALG_STATUS_TYPE_AEAD | LC_ALG_STATUS_FLAG_KMAC_CRYPT) |
| #define | LC_ALG_STATUS_SYM_HMAC (LC_ALG_STATUS_TYPE_AEAD | LC_ALG_STATUS_FLAG_SYM_HMAC) |
| #define | LC_ALG_STATUS_SYM_KMAC (LC_ALG_STATUS_TYPE_AEAD | LC_ALG_STATUS_FLAG_SYM_KMAC) |
| #define | LC_ALG_STATUS_HQC_KEYGEN (LC_ALG_STATUS_TYPE_KEM_PQC | LC_ALG_STATUS_FLAG_HQC_KEYGEN) |
| #define | LC_ALG_STATUS_HQC_ENC (LC_ALG_STATUS_TYPE_KEM_PQC | LC_ALG_STATUS_FLAG_HQC_ENC) |
| #define | LC_ALG_STATUS_HQC_DEC (LC_ALG_STATUS_TYPE_KEM_PQC | LC_ALG_STATUS_FLAG_HQC_DEC) |
| #define | LC_ALG_STATUS_MLKEM_KEYGEN (LC_ALG_STATUS_TYPE_KEM_PQC | LC_ALG_STATUS_FLAG_MLKEM_KEYGEN) |
| #define | LC_ALG_STATUS_MLKEM_ENC (LC_ALG_STATUS_TYPE_KEM_PQC | LC_ALG_STATUS_FLAG_MLKEM_ENC) |
| #define | LC_ALG_STATUS_MLKEM_DEC (LC_ALG_STATUS_TYPE_KEM_PQC | LC_ALG_STATUS_FLAG_MLKEM_DEC) |
| #define | LC_ALG_STATUS_MLKEM_ENC_KDF (LC_ALG_STATUS_TYPE_KEM_PQC | LC_ALG_STATUS_FLAG_MLKEM_ENC_KDF) |
| #define | LC_ALG_STATUS_MLKEM_DEC_KDF (LC_ALG_STATUS_TYPE_KEM_PQC | LC_ALG_STATUS_FLAG_MLKEM_DEC_KDF) |
| #define | LC_ALG_STATUS_X25519_KEYGEN (LC_ALG_STATUS_TYPE_KEM_CLASSIC | LC_ALG_STATUS_FLAG_X25519_KEYGEN) |
| #define | LC_ALG_STATUS_X25519_SS (LC_ALG_STATUS_TYPE_KEM_CLASSIC | LC_ALG_STATUS_FLAG_X25519_SS) |
| #define | LC_ALG_STATUS_X448_KEYGEN (LC_ALG_STATUS_TYPE_KEM_CLASSIC | LC_ALG_STATUS_FLAG_X448_KEYGEN) |
| #define | LC_ALG_STATUS_X448_SS (LC_ALG_STATUS_TYPE_KEM_CLASSIC | LC_ALG_STATUS_FLAG_X448_SS) |
| #define | LC_ALG_STATUS_MLDSA_KEYGEN (LC_ALG_STATUS_TYPE_SIG_PQC | LC_ALG_STATUS_FLAG_MLDSA_KEYGEN) |
| #define | LC_ALG_STATUS_MLDSA_SIGGEN (LC_ALG_STATUS_TYPE_SIG_PQC | LC_ALG_STATUS_FLAG_MLDSA_SIGGEN) |
| #define | LC_ALG_STATUS_MLDSA_SIGVER (LC_ALG_STATUS_TYPE_SIG_PQC | LC_ALG_STATUS_FLAG_MLDSA_SIGVER) |
| #define | LC_ALG_STATUS_SLHDSA_KEYGEN (LC_ALG_STATUS_TYPE_SIG_PQC | LC_ALG_STATUS_FLAG_SLHDSA_KEYGEN) |
| #define | LC_ALG_STATUS_SLHDSA_SIGGEN (LC_ALG_STATUS_TYPE_SIG_PQC | LC_ALG_STATUS_FLAG_SLHDSA_SIGGEN) |
| #define | LC_ALG_STATUS_SLHDSA_SIGVER (LC_ALG_STATUS_TYPE_SIG_PQC | LC_ALG_STATUS_FLAG_SLHDSA_SIGVER) |
| #define | LC_ALG_STATUS_ED25519_KEYGEN (LC_ALG_STATUS_TYPE_SIG_CLASSIC | LC_ALG_STATUS_FLAG_ED25519_KEYGEN) |
| #define | LC_ALG_STATUS_ED25519_SIGGEN (LC_ALG_STATUS_TYPE_SIG_CLASSIC | LC_ALG_STATUS_FLAG_ED25519_SIGGEN) |
| #define | LC_ALG_STATUS_ED25519_SIGVER (LC_ALG_STATUS_TYPE_SIG_CLASSIC | LC_ALG_STATUS_FLAG_ED25519_SIGVER) |
| #define | LC_ALG_STATUS_ED448_KEYGEN (LC_ALG_STATUS_TYPE_SIG_CLASSIC | LC_ALG_STATUS_FLAG_ED448_KEYGEN) |
| #define | LC_ALG_STATUS_ED448_SIGGEN (LC_ALG_STATUS_TYPE_SIG_CLASSIC | LC_ALG_STATUS_FLAG_ED448_SIGGEN) |
| #define | LC_ALG_STATUS_ED448_SIGVER (LC_ALG_STATUS_TYPE_SIG_CLASSIC | LC_ALG_STATUS_FLAG_ED448_SIGVER) |
| #define | LC_ALG_STATUS_CHACHA20_DRNG (LC_ALG_STATUS_TYPE_RNG | LC_ALG_STATUS_FLAG_CHACHA20_DRNG) |
| #define | LC_ALG_STATUS_CSHAKE_DRBG (LC_ALG_STATUS_TYPE_RNG | LC_ALG_STATUS_FLAG_CSHAKE_DRBG) |
| #define | LC_ALG_STATUS_HASH_DRBG (LC_ALG_STATUS_TYPE_RNG | LC_ALG_STATUS_FLAG_HASH_DRBG) |
| #define | LC_ALG_STATUS_HMAC_DRBG (LC_ALG_STATUS_TYPE_RNG | LC_ALG_STATUS_FLAG_HMAC_DRBG) |
| #define | LC_ALG_STATUS_KMAC_DRBG (LC_ALG_STATUS_TYPE_RNG | LC_ALG_STATUS_FLAG_KMAC_DRBG) |
| #define | LC_ALG_STATUS_XDRBG128 (LC_ALG_STATUS_TYPE_RNG | LC_ALG_STATUS_FLAG_XDRBG128) |
| #define | LC_ALG_STATUS_XDRBG256 (LC_ALG_STATUS_TYPE_RNG | LC_ALG_STATUS_FLAG_XDRBG256) |
| #define | LC_ALG_STATUS_XDRBG512 (LC_ALG_STATUS_TYPE_RNG | LC_ALG_STATUS_FLAG_XDRBG512) |
| #define | LC_ALG_STATUS_ASCON256 (LC_ALG_STATUS_TYPE_DIGEST | LC_ALG_STATUS_FLAG_ASCON256) |
| #define | LC_ALG_STATUS_ASCONXOF (LC_ALG_STATUS_TYPE_DIGEST | LC_ALG_STATUS_FLAG_ASCONXOF) |
| #define | LC_ALG_STATUS_SHA256 (LC_ALG_STATUS_TYPE_DIGEST | LC_ALG_STATUS_FLAG_SHA256) |
| #define | LC_ALG_STATUS_SHA512 (LC_ALG_STATUS_TYPE_DIGEST | LC_ALG_STATUS_FLAG_SHA512) |
| #define | LC_ALG_STATUS_SHA3 (LC_ALG_STATUS_TYPE_DIGEST | LC_ALG_STATUS_FLAG_SHA3) |
| #define | LC_ALG_STATUS_SHAKE (LC_ALG_STATUS_TYPE_DIGEST | LC_ALG_STATUS_FLAG_SHAKE) |
| #define | LC_ALG_STATUS_SHAKE512 (LC_ALG_STATUS_TYPE_DIGEST | LC_ALG_STATUS_FLAG_SHAKE512) |
| #define | LC_ALG_STATUS_CSHAKE (LC_ALG_STATUS_TYPE_DIGEST | LC_ALG_STATUS_FLAG_CSHAKE) |
| #define | LC_ALG_STATUS_KMAC (LC_ALG_STATUS_TYPE_DIGEST | LC_ALG_STATUS_FLAG_KMAC) |
| #define | LC_ALG_STATUS_HMAC (LC_ALG_STATUS_TYPE_DIGEST | LC_ALG_STATUS_FLAG_HMAC) |
| #define | LC_ALG_STATUS_AES_CBC (LC_ALG_STATUS_TYPE_SYM | LC_ALG_STATUS_FLAG_AES_CBC) |
| #define | LC_ALG_STATUS_AES_CTR (LC_ALG_STATUS_TYPE_SYM | LC_ALG_STATUS_FLAG_AES_CTR) |
| #define | LC_ALG_STATUS_AES_KW (LC_ALG_STATUS_TYPE_SYM | LC_ALG_STATUS_FLAG_AES_KW) |
| #define | LC_ALG_STATUS_AES_XTS (LC_ALG_STATUS_TYPE_SYM | LC_ALG_STATUS_FLAG_AES_XTS) |
| #define | LC_ALG_STATUS_CHACHA20 (LC_ALG_STATUS_TYPE_SYM | LC_ALG_STATUS_FLAG_CHACHA20) |
| #define | LC_ALG_STATUS_HKDF (LC_ALG_STATUS_TYPE_AUX | LC_ALG_STATUS_FLAG_HKDF) |
| #define | LC_ALG_STATUS_CTR_KDF (LC_ALG_STATUS_TYPE_AUX | LC_ALG_STATUS_FLAG_CTR_KDF) |
| #define | LC_ALG_STATUS_DPI_KDF (LC_ALG_STATUS_TYPE_AUX | LC_ALG_STATUS_FLAG_DPI_KDF) |
| #define | LC_ALG_STATUS_FB_KDF (LC_ALG_STATUS_TYPE_AUX | LC_ALG_STATUS_FLAG_FB_KDF) |
| #define | LC_ALG_STATUS_PBKDF2 (LC_ALG_STATUS_TYPE_AUX | LC_ALG_STATUS_FLAG_PBKDF2) |
| #define | LC_ALG_STATUS_LIB (LC_ALG_STATUS_TYPE_AUX | LC_ALG_STATUS_FLAG_LIB) |
Enumerations | |
| enum | lc_alg_status_val { lc_alg_status_unknown = 0 , lc_alg_status_fips_approved = (1 << 1) , lc_alg_status_self_test_passed = (1 << 2) , lc_alg_status_self_test_failed = (1 << 3) } |
| enum | lc_alg_status_result { lc_alg_status_result_pending = 0x0 , lc_alg_status_result_ongoing = 0x1 , lc_alg_status_result_passed = 0x3 , lc_alg_status_result_failed = 0x7 } |
Functions | |
| void | lc_rerun_selftests (void) |
| (Re-)run the self tests | |
| void | lc_rerun_one_selftest (uint64_t flag) |
| (re-)run a self test for one algorithm | |
| enum lc_alg_status_val | lc_alg_status (uint64_t algorithm) |
| Return status information about algorithm type. | |
| void | lc_fips_integrity_checker (void) |
| Re-run the FIPS 140 integrity test. | |
| int | lc_status (char *outbuf, size_t outlen) |
| Status information about leancrypto. | |
| enum lc_alg_status_result | lc_status_get_result (uint64_t algorithm) |
| Return the self test status for the algorithm. | |
| int | lc_alg_disable_selftests (void) |
| Disable all algorithm startup self tests. | |
| #define LC_ALG_STATUS_AES_CBC (LC_ALG_STATUS_TYPE_SYM | LC_ALG_STATUS_FLAG_AES_CBC) |
Symmetric Algorithm reference: AES-CBC
Definition at line 373 of file lc_status.h.
| #define LC_ALG_STATUS_AES_CTR (LC_ALG_STATUS_TYPE_SYM | LC_ALG_STATUS_FLAG_AES_CTR) |
Symmetric Algorithm reference: AES-CTR
Definition at line 376 of file lc_status.h.
| #define LC_ALG_STATUS_AES_GCM (LC_ALG_STATUS_TYPE_AEAD | LC_ALG_STATUS_FLAG_AES_GCM) |
AEAD Algorithm reference: AES-GCM
Definition at line 218 of file lc_status.h.
| #define LC_ALG_STATUS_AES_KW (LC_ALG_STATUS_TYPE_SYM | LC_ALG_STATUS_FLAG_AES_KW) |
Symmetric Algorithm reference: AES-KW
Definition at line 379 of file lc_status.h.
| #define LC_ALG_STATUS_AES_XTS (LC_ALG_STATUS_TYPE_SYM | LC_ALG_STATUS_FLAG_AES_XTS) |
Symmetric Algorithm reference: AES-CBC
Definition at line 382 of file lc_status.h.
| #define LC_ALG_STATUS_ASCON256 (LC_ALG_STATUS_TYPE_DIGEST | LC_ALG_STATUS_FLAG_ASCON256) |
Digest reference: Ascon 256
Definition at line 345 of file lc_status.h.
| #define LC_ALG_STATUS_ASCON_AEAD_128 (LC_ALG_STATUS_TYPE_AEAD | LC_ALG_STATUS_FLAG_ASCON_AEAD_128) |
AEAD Algorithm reference: ASCON-AEAD128
Definition at line 221 of file lc_status.h.
| #define LC_ALG_STATUS_ASCON_KECCAK (LC_ALG_STATUS_TYPE_AEAD | LC_ALG_STATUS_FLAG_ASCON_KECCAK) |
AEAD Algorithm reference: ASCON-KECCAK
Definition at line 224 of file lc_status.h.
| #define LC_ALG_STATUS_ASCONXOF (LC_ALG_STATUS_TYPE_DIGEST | LC_ALG_STATUS_FLAG_ASCONXOF) |
Digest reference: Ascon XOF
Definition at line 348 of file lc_status.h.
| #define LC_ALG_STATUS_CHACHA20 (LC_ALG_STATUS_TYPE_SYM | LC_ALG_STATUS_FLAG_CHACHA20) |
Symmetric Algorithm reference: AES-CBC
Definition at line 385 of file lc_status.h.
| #define LC_ALG_STATUS_CHACHA20_DRNG (LC_ALG_STATUS_TYPE_RNG | LC_ALG_STATUS_FLAG_CHACHA20_DRNG) |
Random Number Generator reference: ChaCha20 DRNG
Definition at line 320 of file lc_status.h.
| #define LC_ALG_STATUS_CHACHA20_POLY1305 (LC_ALG_STATUS_TYPE_AEAD | LC_ALG_STATUS_FLAG_CHACHA20_POLY1305) |
AEAD Algorithm reference: ChaCha20-Poly1305
Definition at line 227 of file lc_status.h.
| #define LC_ALG_STATUS_CSHAKE (LC_ALG_STATUS_TYPE_DIGEST | LC_ALG_STATUS_FLAG_CSHAKE) |
Digest reference: cSHAKE
Definition at line 365 of file lc_status.h.
| #define LC_ALG_STATUS_CSHAKE_CRYPT (LC_ALG_STATUS_TYPE_AEAD | LC_ALG_STATUS_FLAG_CSHAKE_CRYPT) |
AEAD Algorithm reference: cSHAKE AEAD
Definition at line 230 of file lc_status.h.
| #define LC_ALG_STATUS_CSHAKE_DRBG (LC_ALG_STATUS_TYPE_RNG | LC_ALG_STATUS_FLAG_CSHAKE_DRBG) |
Random Number Generator reference: cSHAKE DRBG
Definition at line 323 of file lc_status.h.
| #define LC_ALG_STATUS_CTR_KDF (LC_ALG_STATUS_TYPE_AUX | LC_ALG_STATUS_FLAG_CTR_KDF) |
Auxiliary information: SP800-108 Counter KDF
Definition at line 391 of file lc_status.h.
| #define LC_ALG_STATUS_DPI_KDF (LC_ALG_STATUS_TYPE_AUX | LC_ALG_STATUS_FLAG_DPI_KDF) |
Auxiliary information: SP800-108 Double-Pipeline KDF
Definition at line 394 of file lc_status.h.
| #define LC_ALG_STATUS_ED25519_KEYGEN (LC_ALG_STATUS_TYPE_SIG_CLASSIC | LC_ALG_STATUS_FLAG_ED25519_KEYGEN) |
Signature Algorithm reference: ED-25519 Key Generation
Definition at line 301 of file lc_status.h.
| #define LC_ALG_STATUS_ED25519_SIGGEN (LC_ALG_STATUS_TYPE_SIG_CLASSIC | LC_ALG_STATUS_FLAG_ED25519_SIGGEN) |
Signature Algorithm reference: ED-25519 Key Signature Generation
Definition at line 304 of file lc_status.h.
| #define LC_ALG_STATUS_ED25519_SIGVER (LC_ALG_STATUS_TYPE_SIG_CLASSIC | LC_ALG_STATUS_FLAG_ED25519_SIGVER) |
Signature Algorithm reference: ED-25519 Key Signature Verification
Definition at line 307 of file lc_status.h.
| #define LC_ALG_STATUS_ED448_KEYGEN (LC_ALG_STATUS_TYPE_SIG_CLASSIC | LC_ALG_STATUS_FLAG_ED448_KEYGEN) |
Signature Algorithm reference: ED-448 Key Generation
Definition at line 310 of file lc_status.h.
| #define LC_ALG_STATUS_ED448_SIGGEN (LC_ALG_STATUS_TYPE_SIG_CLASSIC | LC_ALG_STATUS_FLAG_ED448_SIGGEN) |
Signature Algorithm reference: ED-448 Key Signature Generation
Definition at line 313 of file lc_status.h.
| #define LC_ALG_STATUS_ED448_SIGVER (LC_ALG_STATUS_TYPE_SIG_CLASSIC | LC_ALG_STATUS_FLAG_ED448_SIGVER) |
Signature Algorithm reference: ED-448 Key Signature Verification
Definition at line 316 of file lc_status.h.
| #define LC_ALG_STATUS_FB_KDF (LC_ALG_STATUS_TYPE_AUX | LC_ALG_STATUS_FLAG_FB_KDF) |
Auxiliary information: SP800-108 Feedback KDF
Definition at line 397 of file lc_status.h.
| #define LC_ALG_STATUS_HASH_CRYPT (LC_ALG_STATUS_TYPE_AEAD | LC_ALG_STATUS_FLAG_HASH_CRYPT) |
AEAD Algorithm reference: Hash AEAD
Definition at line 233 of file lc_status.h.
| #define LC_ALG_STATUS_HASH_DRBG (LC_ALG_STATUS_TYPE_RNG | LC_ALG_STATUS_FLAG_HASH_DRBG) |
Random Number Generator reference: SP800-90A Hash DRBG
Definition at line 326 of file lc_status.h.
| #define LC_ALG_STATUS_HKDF (LC_ALG_STATUS_TYPE_AUX | LC_ALG_STATUS_FLAG_HKDF) |
Auxiliary information: HKDF
Definition at line 389 of file lc_status.h.
| #define LC_ALG_STATUS_HMAC (LC_ALG_STATUS_TYPE_DIGEST | LC_ALG_STATUS_FLAG_HMAC) |
Digest reference: HMAC
Definition at line 370 of file lc_status.h.
| #define LC_ALG_STATUS_HMAC_DRBG (LC_ALG_STATUS_TYPE_RNG | LC_ALG_STATUS_FLAG_HMAC_DRBG) |
Random Number Generator reference: SP800-90A HMAC DRBG
Definition at line 329 of file lc_status.h.
| #define LC_ALG_STATUS_HQC_DEC (LC_ALG_STATUS_TYPE_KEM_PQC | LC_ALG_STATUS_FLAG_HQC_DEC) |
KEM Algorithm reference: HQC Decapsulation
Definition at line 252 of file lc_status.h.
| #define LC_ALG_STATUS_HQC_ENC (LC_ALG_STATUS_TYPE_KEM_PQC | LC_ALG_STATUS_FLAG_HQC_ENC) |
KEM Algorithm reference: HQC Encapsulation
Definition at line 249 of file lc_status.h.
| #define LC_ALG_STATUS_HQC_KEYGEN (LC_ALG_STATUS_TYPE_KEM_PQC | LC_ALG_STATUS_FLAG_HQC_KEYGEN) |
KEM Algorithm reference: HQC Key Generation
Definition at line 246 of file lc_status.h.
| #define LC_ALG_STATUS_KMAC (LC_ALG_STATUS_TYPE_DIGEST | LC_ALG_STATUS_FLAG_KMAC) |
Digest reference: KMAC
Definition at line 368 of file lc_status.h.
| #define LC_ALG_STATUS_KMAC_CRYPT (LC_ALG_STATUS_TYPE_AEAD | LC_ALG_STATUS_FLAG_KMAC_CRYPT) |
AEAD Algorithm reference: KMAC AEAD
Definition at line 236 of file lc_status.h.
| #define LC_ALG_STATUS_KMAC_DRBG (LC_ALG_STATUS_TYPE_RNG | LC_ALG_STATUS_FLAG_KMAC_DRBG) |
Random Number Generator reference: KMAC DRBG
Definition at line 332 of file lc_status.h.
| #define LC_ALG_STATUS_LIB (LC_ALG_STATUS_TYPE_AUX | LC_ALG_STATUS_FLAG_LIB) |
Auxiliary information: Library health status
Definition at line 403 of file lc_status.h.
| #define LC_ALG_STATUS_MLDSA_KEYGEN (LC_ALG_STATUS_TYPE_SIG_PQC | LC_ALG_STATUS_FLAG_MLDSA_KEYGEN) |
Signature Algorithm reference: ML-DSA Key Generation
Definition at line 283 of file lc_status.h.
| #define LC_ALG_STATUS_MLDSA_SIGGEN (LC_ALG_STATUS_TYPE_SIG_PQC | LC_ALG_STATUS_FLAG_MLDSA_SIGGEN) |
Signature Algorithm reference: ML-DSA Key Signature Generation
Definition at line 286 of file lc_status.h.
| #define LC_ALG_STATUS_MLDSA_SIGVER (LC_ALG_STATUS_TYPE_SIG_PQC | LC_ALG_STATUS_FLAG_MLDSA_SIGVER) |
Signature Algorithm reference: ML-DSA Key Signature Verification
Definition at line 289 of file lc_status.h.
| #define LC_ALG_STATUS_MLKEM_DEC (LC_ALG_STATUS_TYPE_KEM_PQC | LC_ALG_STATUS_FLAG_MLKEM_DEC) |
KEM Algorithm reference: ML-KEM Decapsulation
Definition at line 261 of file lc_status.h.
| #define LC_ALG_STATUS_MLKEM_DEC_KDF (LC_ALG_STATUS_TYPE_KEM_PQC | LC_ALG_STATUS_FLAG_MLKEM_DEC_KDF) |
KEM Algorithm reference: ML-KEM Decapsulation with KDF
Definition at line 267 of file lc_status.h.
| #define LC_ALG_STATUS_MLKEM_ENC (LC_ALG_STATUS_TYPE_KEM_PQC | LC_ALG_STATUS_FLAG_MLKEM_ENC) |
KEM Algorithm reference: ML-KEM Encapsulation
Definition at line 258 of file lc_status.h.
| #define LC_ALG_STATUS_MLKEM_ENC_KDF (LC_ALG_STATUS_TYPE_KEM_PQC | LC_ALG_STATUS_FLAG_MLKEM_ENC_KDF) |
KEM Algorithm reference: ML-KEM Encapsulation with KDF
Definition at line 264 of file lc_status.h.
| #define LC_ALG_STATUS_MLKEM_KEYGEN (LC_ALG_STATUS_TYPE_KEM_PQC | LC_ALG_STATUS_FLAG_MLKEM_KEYGEN) |
KEM Algorithm reference: ML-KEM Key Generation
Definition at line 255 of file lc_status.h.
| #define LC_ALG_STATUS_PBKDF2 (LC_ALG_STATUS_TYPE_AUX | LC_ALG_STATUS_FLAG_PBKDF2) |
Auxiliary information: SP800-132 PBKDF2
Definition at line 400 of file lc_status.h.
| #define LC_ALG_STATUS_SHA256 (LC_ALG_STATUS_TYPE_DIGEST | LC_ALG_STATUS_FLAG_SHA256) |
Digest reference: SHA-256
Definition at line 351 of file lc_status.h.
| #define LC_ALG_STATUS_SHA3 (LC_ALG_STATUS_TYPE_DIGEST | LC_ALG_STATUS_FLAG_SHA3) |
Digest reference: SHA-3
Definition at line 357 of file lc_status.h.
| #define LC_ALG_STATUS_SHA512 (LC_ALG_STATUS_TYPE_DIGEST | LC_ALG_STATUS_FLAG_SHA512) |
Digest reference: SHA-512
Definition at line 354 of file lc_status.h.
| #define LC_ALG_STATUS_SHAKE (LC_ALG_STATUS_TYPE_DIGEST | LC_ALG_STATUS_FLAG_SHAKE) |
Digest reference: SHAKE
Definition at line 359 of file lc_status.h.
| #define LC_ALG_STATUS_SHAKE512 (LC_ALG_STATUS_TYPE_DIGEST | LC_ALG_STATUS_FLAG_SHAKE512) |
Digest reference: SHAKE512
Definition at line 362 of file lc_status.h.
| #define LC_ALG_STATUS_SLHDSA_KEYGEN (LC_ALG_STATUS_TYPE_SIG_PQC | LC_ALG_STATUS_FLAG_SLHDSA_KEYGEN) |
Signature Algorithm reference: SLH-DSA Key Generation
Definition at line 292 of file lc_status.h.
| #define LC_ALG_STATUS_SLHDSA_SIGGEN (LC_ALG_STATUS_TYPE_SIG_PQC | LC_ALG_STATUS_FLAG_SLHDSA_SIGGEN) |
Signature Algorithm reference: SLH-DSA Key Signature Generation
Definition at line 295 of file lc_status.h.
| #define LC_ALG_STATUS_SLHDSA_SIGVER (LC_ALG_STATUS_TYPE_SIG_PQC | LC_ALG_STATUS_FLAG_SLHDSA_SIGVER) |
Signature Algorithm reference: SLH-DSA Key Signature Verification
Definition at line 298 of file lc_status.h.
| #define LC_ALG_STATUS_SYM_HMAC (LC_ALG_STATUS_TYPE_AEAD | LC_ALG_STATUS_FLAG_SYM_HMAC) |
AEAD Algorithm reference: symmetric algorithm + HMAC
Definition at line 239 of file lc_status.h.
| #define LC_ALG_STATUS_SYM_KMAC (LC_ALG_STATUS_TYPE_AEAD | LC_ALG_STATUS_FLAG_SYM_KMAC) |
AEAD Algorithm reference: symmetric algorithm + KMAC
Definition at line 242 of file lc_status.h.
| #define LC_ALG_STATUS_X25519_KEYGEN (LC_ALG_STATUS_TYPE_KEM_CLASSIC | LC_ALG_STATUS_FLAG_X25519_KEYGEN) |
KEM Algorithm reference: X25515 Key Generation
Definition at line 270 of file lc_status.h.
| #define LC_ALG_STATUS_X25519_SS (LC_ALG_STATUS_TYPE_KEM_CLASSIC | LC_ALG_STATUS_FLAG_X25519_SS) |
KEM Algorithm reference: X25515 Shared Secret
Definition at line 273 of file lc_status.h.
| #define LC_ALG_STATUS_X448_KEYGEN (LC_ALG_STATUS_TYPE_KEM_CLASSIC | LC_ALG_STATUS_FLAG_X448_KEYGEN) |
KEM Algorithm reference: X25515 Key Generation
Definition at line 276 of file lc_status.h.
| #define LC_ALG_STATUS_X448_SS (LC_ALG_STATUS_TYPE_KEM_CLASSIC | LC_ALG_STATUS_FLAG_X448_SS) |
KEM Algorithm reference: X25515 Shared Secret
Definition at line 279 of file lc_status.h.
| #define LC_ALG_STATUS_XDRBG128 (LC_ALG_STATUS_TYPE_RNG | LC_ALG_STATUS_FLAG_XDRBG128) |
Random Number Generator reference: Ascon XOF XDRBG128
Definition at line 335 of file lc_status.h.
| #define LC_ALG_STATUS_XDRBG256 (LC_ALG_STATUS_TYPE_RNG | LC_ALG_STATUS_FLAG_XDRBG256) |
Random Number Generator reference: SHAKE XDRBG256
Definition at line 338 of file lc_status.h.
| #define LC_ALG_STATUS_XDRBG512 (LC_ALG_STATUS_TYPE_RNG | LC_ALG_STATUS_FLAG_XDRBG512) |
Random Number Generator reference: SHAKE XDRBG512
Definition at line 341 of file lc_status.h.
| enum lc_alg_status_result |
Definition at line 206 of file lc_status.h.
| enum lc_alg_status_val |
| Enumerator | |
|---|---|
| lc_alg_status_unknown | |
| lc_alg_status_fips_approved | |
| lc_alg_status_self_test_passed | |
| lc_alg_status_self_test_failed | |
Definition at line 47 of file lc_status.h.
| 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.
| enum lc_alg_status_val lc_alg_status | ( | uint64_t | algorithm | ) |
Return status information about algorithm type.
| [in] | algorithm | Algorithm reference of one of the LC_ALG_STATUS_* flags |
| void lc_fips_integrity_checker | ( | void | ) |
Re-run the FIPS 140 integrity test.
| 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. |