Crate libcrux_hacl

Source
Expand description

§HACL Sys

Bindings to HACL C code

Structs§

EverCrypt_AEAD_state_s_s
Hacl_HMAC_DRBG_state_s
Hacl_Hash_Blake2b_Simd256_block_state_t_s
Hacl_Hash_Blake2b_Simd256_state_t_s
Hacl_Hash_Blake2b_block_state_t_s
Hacl_Hash_Blake2b_state_t_s
Hacl_Hash_Blake2s_Simd128_block_state_t_s
Hacl_Hash_Blake2s_Simd128_state_t_s
Hacl_Hash_Blake2s_block_state_t_s
Hacl_Hash_Blake2s_state_t_s
Hacl_Hash_SHA3_hash_buf_s
Hacl_Hash_SHA3_state_t_s
Hacl_Streaming_MD_state_32_s
Hacl_Streaming_MD_state_64_s

Constants§

Hacl_Streaming_Types_InvalidAlgorithm
Hacl_Streaming_Types_InvalidLength
Hacl_Streaming_Types_MaximumLengthExceeded
Hacl_Streaming_Types_Success
Spec_Agile_AEAD_AES128_CCM
Spec_Agile_AEAD_AES128_CCM8
Spec_Agile_AEAD_AES128_GCM
Spec_Agile_AEAD_AES256_CCM
Spec_Agile_AEAD_AES256_CCM8
Spec_Agile_AEAD_AES256_GCM
Spec_Agile_AEAD_CHACHA20_POLY1305
Spec_FFDHE_FFDHE2048
Spec_FFDHE_FFDHE3072
Spec_FFDHE_FFDHE4096
Spec_FFDHE_FFDHE6144
Spec_FFDHE_FFDHE8192
Spec_Hash_Definitions_Blake2B
Spec_Hash_Definitions_Blake2S
Spec_Hash_Definitions_MD5
Spec_Hash_Definitions_SHA1
Spec_Hash_Definitions_SHA2_224
Spec_Hash_Definitions_SHA2_256
Spec_Hash_Definitions_SHA2_384
Spec_Hash_Definitions_SHA2_512
Spec_Hash_Definitions_SHA3_224
Spec_Hash_Definitions_SHA3_256
Spec_Hash_Definitions_SHA3_384
Spec_Hash_Definitions_SHA3_512
Spec_Hash_Definitions_Shake128
Spec_Hash_Definitions_Shake256

Functions§

EverCrypt_AEAD_alg_of_state
Return the algorithm used in the AEAD state.
EverCrypt_AEAD_create_in
Create the required AEAD state for the algorithm.
EverCrypt_AEAD_decrypt
Verify the authenticity of ad || cipher and decrypt cipher into dst.
EverCrypt_AEAD_decrypt_expand
EverCrypt_AEAD_decrypt_expand_aes128_gcm
EverCrypt_AEAD_decrypt_expand_aes128_gcm_no_check
WARNING: this function doesn’t perform any dynamic hardware check. You MUST make sure your hardware supports the implementation of AESGCM. Besides, this function was not designed for cross-compilation: if you compile it on a system which doesn’t support Vale, it will compile it to a function which makes the program exit.
EverCrypt_AEAD_decrypt_expand_aes256_gcm
EverCrypt_AEAD_decrypt_expand_aes256_gcm_no_check
WARNING: this function doesn’t perform any dynamic hardware check. You MUST make sure your hardware supports the implementation of AESGCM. Besides, this function was not designed for cross-compilation: if you compile it on a system which doesn’t support Vale, it will compile it to a function which makes the program exit.
EverCrypt_AEAD_decrypt_expand_chacha20_poly1305
EverCrypt_AEAD_encrypt
Encrypt and authenticate a message (plain) with associated data (ad).
EverCrypt_AEAD_encrypt_expand
EverCrypt_AEAD_encrypt_expand_aes128_gcm
EverCrypt_AEAD_encrypt_expand_aes128_gcm_no_check
WARNING: this function doesn’t perform any dynamic hardware check. You MUST make sure your hardware supports the implementation of AESGCM. Besides, this function was not designed for cross-compilation: if you compile it on a system which doesn’t support Vale, it will compile it to a function which makes the program exit.
EverCrypt_AEAD_encrypt_expand_aes256_gcm
EverCrypt_AEAD_encrypt_expand_aes256_gcm_no_check
WARNING: this function doesn’t perform any dynamic hardware check. You MUST make sure your hardware supports the implementation of AESGCM. Besides, this function was not designed for cross-compilation: if you compile it on a system which doesn’t support Vale, it will compile it to a function which makes the program exit.
EverCrypt_AEAD_encrypt_expand_chacha20_poly1305
EverCrypt_AEAD_free
Cleanup and free the AEAD state.
EverCrypt_AEAD_uu___is_Ek
Both encryption and decryption require a state that holds the key. The state may be reused as many times as desired.
EverCrypt_AutoConfig2_disable_adx
EverCrypt_AutoConfig2_disable_aesni
EverCrypt_AutoConfig2_disable_avx
EverCrypt_AutoConfig2_disable_avx2
EverCrypt_AutoConfig2_disable_avx512
EverCrypt_AutoConfig2_disable_bmi2
EverCrypt_AutoConfig2_disable_movbe
EverCrypt_AutoConfig2_disable_pclmulqdq
EverCrypt_AutoConfig2_disable_rdrand
EverCrypt_AutoConfig2_disable_shaext
EverCrypt_AutoConfig2_disable_sse
EverCrypt_AutoConfig2_has_adx
EverCrypt_AutoConfig2_has_aesni
EverCrypt_AutoConfig2_has_avx
EverCrypt_AutoConfig2_has_avx2
EverCrypt_AutoConfig2_has_avx512
EverCrypt_AutoConfig2_has_bmi2
EverCrypt_AutoConfig2_has_movbe
EverCrypt_AutoConfig2_has_pclmulqdq
EverCrypt_AutoConfig2_has_rdrand
EverCrypt_AutoConfig2_has_shaext
EverCrypt_AutoConfig2_has_sse
EverCrypt_AutoConfig2_has_vec128
EverCrypt_AutoConfig2_has_vec256
EverCrypt_AutoConfig2_init
EverCrypt_AutoConfig2_recall
Hacl_AEAD_Chacha20Poly1305_Simd128_decrypt
Decrypt a ciphertext input with key key.
Hacl_AEAD_Chacha20Poly1305_Simd128_encrypt
Encrypt a message input with key key.
Hacl_AEAD_Chacha20Poly1305_Simd256_decrypt
Decrypt a ciphertext input with key key.
Hacl_AEAD_Chacha20Poly1305_Simd256_encrypt
Encrypt a message input with key key.
Hacl_AEAD_Chacha20Poly1305_decrypt
Decrypt a ciphertext input with key key.
Hacl_AEAD_Chacha20Poly1305_encrypt
Encrypt a message input with key key.
Hacl_Curve25519_51_ecdh
Execute the diffie-hellmann key exchange.
Hacl_Curve25519_51_scalarmult
Compute the scalar multiple of a point.
Hacl_Curve25519_51_secret_to_public
Calculate a public point from a secret/private key.
Hacl_Curve25519_64_ecdh
Execute the diffie-hellmann key exchange.
Hacl_Curve25519_64_scalarmult
Compute the scalar multiple of a point.
Hacl_Curve25519_64_secret_to_public
Calculate a public point from a secret/private key.
Hacl_Ed25519_expand_keys
Compute the expanded keys for an Ed25519 signature.
Hacl_Ed25519_secret_to_public
Compute the public key from the private key.
Hacl_Ed25519_sign
Create an Ed25519 signature.
Hacl_Ed25519_sign_expanded
Create an Ed25519 signature with the (precomputed) expanded keys.
Hacl_Ed25519_verify
Verify an Ed25519 signature.
Hacl_HKDF_expand_blake2b_32
Expand pseudorandom key to desired length.
Hacl_HKDF_expand_blake2s_32
Expand pseudorandom key to desired length.
Hacl_HKDF_expand_sha2_256
Expand pseudorandom key to desired length.
Hacl_HKDF_expand_sha2_384
Expand pseudorandom key to desired length.
Hacl_HKDF_expand_sha2_512
Expand pseudorandom key to desired length.
Hacl_HKDF_extract_blake2b_32
Extract a fixed-length pseudorandom key from input keying material.
Hacl_HKDF_extract_blake2s_32
Extract a fixed-length pseudorandom key from input keying material.
Hacl_HKDF_extract_sha2_256
Extract a fixed-length pseudorandom key from input keying material.
Hacl_HKDF_extract_sha2_384
Extract a fixed-length pseudorandom key from input keying material.
Hacl_HKDF_extract_sha2_512
Extract a fixed-length pseudorandom key from input keying material.
Hacl_HMAC_DRBG_create_in
Create a DRBG state.
Hacl_HMAC_DRBG_free
Hacl_HMAC_DRBG_generate
Generate output.
Hacl_HMAC_DRBG_instantiate
Instantiate the DRBG.
Hacl_HMAC_DRBG_min_length
Return the minimal entropy input length of the desired hash function.
Hacl_HMAC_DRBG_reseed
Reseed the DRBG.
Hacl_HMAC_DRBG_uu___is_State
Hacl_HMAC_compute_blake2b_32
Write the HMAC-BLAKE2b MAC of a message (data) by using a key (key) into dst.
Hacl_HMAC_compute_blake2s_32
Write the HMAC-BLAKE2s MAC of a message (data) by using a key (key) into dst.
Hacl_HMAC_compute_sha1
Write the HMAC-SHA-1 MAC of a message (data) by using a key (key) into dst.
Hacl_HMAC_compute_sha2_256
Write the HMAC-SHA-2-256 MAC of a message (data) by using a key (key) into dst.
Hacl_HMAC_compute_sha2_384
Write the HMAC-SHA-2-384 MAC of a message (data) by using a key (key) into dst.
Hacl_HMAC_compute_sha2_512
Write the HMAC-SHA-2-512 MAC of a message (data) by using a key (key) into dst.
Hacl_Hash_Blake2b_Simd256_digest
Finish function when there is no key
Hacl_Hash_Blake2b_Simd256_free
Free state function when there is no key
Hacl_Hash_Blake2b_Simd256_hash_with_key
Write the BLAKE2b digest of message input using key key into output.
Hacl_Hash_Blake2b_Simd256_malloc
State allocation function when there is no key
Hacl_Hash_Blake2b_Simd256_reset
Re-initialization function when there is no key
Hacl_Hash_Blake2b_Simd256_update
Update function when there is no key; 0 = success, 1 = max length exceeded
Hacl_Hash_Blake2b_digest
Finish function when there is no key
Hacl_Hash_Blake2b_free
Free state function when there is no key
Hacl_Hash_Blake2b_hash_with_key
Write the BLAKE2b digest of message input using key key into output.
Hacl_Hash_Blake2b_malloc
State allocation function when there is no key
Hacl_Hash_Blake2b_reset
Re-initialization function when there is no key
Hacl_Hash_Blake2b_update
Update function when there is no key; 0 = success, 1 = max length exceeded
Hacl_Hash_Blake2s_Simd128_digest
Finish function when there is no key
Hacl_Hash_Blake2s_Simd128_free
Free state function when there is no key
Hacl_Hash_Blake2s_Simd128_hash_with_key
Write the BLAKE2s digest of message input using key key into output.
Hacl_Hash_Blake2s_Simd128_malloc
State allocation function when there is no key
Hacl_Hash_Blake2s_Simd128_reset
Re-initialization function when there is no key
Hacl_Hash_Blake2s_Simd128_update
Update function when there is no key; 0 = success, 1 = max length exceeded
Hacl_Hash_Blake2s_digest
Finish function when there is no key
Hacl_Hash_Blake2s_free
Free state function when there is no key
Hacl_Hash_Blake2s_hash_with_key
Write the BLAKE2s digest of message input using key key into output.
Hacl_Hash_Blake2s_malloc
State allocation function when there is no key
Hacl_Hash_Blake2s_reset
Re-initialization function when there is no key
Hacl_Hash_Blake2s_update
Update function when there is no key; 0 = success, 1 = max length exceeded
Hacl_Hash_SHA1_copy
Hacl_Hash_SHA1_digest
Hacl_Hash_SHA1_free
Hacl_Hash_SHA1_hash
Hacl_Hash_SHA1_malloc
Hacl_Hash_SHA1_reset
Hacl_Hash_SHA1_update
0 = success, 1 = max length exceeded
Hacl_Hash_SHA2_copy_256
Copies the state passed as argument into a newly allocated state (deep copy). The state is to be freed by calling free_256. Cloning the state this way is useful, for instance, if your control-flow diverges and you need to feed more (different) data into the hash in each branch.
Hacl_Hash_SHA2_copy_512
Copies the state passed as argument into a newly allocated state (deep copy). The state is to be freed by calling free_512. Cloning the state this way is useful, for instance, if your control-flow diverges and you need to feed more (different) data into the hash in each branch.
Hacl_Hash_SHA2_digest_224
Write the resulting hash into output, an array of 28 bytes. The state remains valid after a call to digest_224, meaning the user may feed more data into the hash via update_224.
Hacl_Hash_SHA2_digest_256
Write the resulting hash into output, an array of 32 bytes. The state remains valid after a call to digest_256, meaning the user may feed more data into the hash via update_256. (The digest_256 function operates on an internal copy of the state and therefore does not invalidate the client-held state p.)
Hacl_Hash_SHA2_digest_384
Write the resulting hash into output, an array of 48 bytes. The state remains valid after a call to digest_384, meaning the user may feed more data into the hash via update_384.
Hacl_Hash_SHA2_digest_512
Write the resulting hash into output, an array of 64 bytes. The state remains valid after a call to digest_512, meaning the user may feed more data into the hash via update_512. (The digest_512 function operates on an internal copy of the state and therefore does not invalidate the client-held state p.)
Hacl_Hash_SHA2_free_224
Hacl_Hash_SHA2_free_256
Free a state allocated with malloc_256.
Hacl_Hash_SHA2_free_384
Hacl_Hash_SHA2_free_512
Free a state allocated with malloc_512.
Hacl_Hash_SHA2_hash_224
Hash input, of len input_len, into output, an array of 28 bytes.
Hacl_Hash_SHA2_hash_256
Hash input, of len input_len, into output, an array of 32 bytes.
Hacl_Hash_SHA2_hash_384
Hash input, of len input_len, into output, an array of 48 bytes.
Hacl_Hash_SHA2_hash_512
Hash input, of len input_len, into output, an array of 64 bytes.
Hacl_Hash_SHA2_malloc_224
Hacl_Hash_SHA2_malloc_256
Allocate initial state for the SHA2_256 hash. The state is to be freed by calling free_256.
Hacl_Hash_SHA2_malloc_384
Hacl_Hash_SHA2_malloc_512
Hacl_Hash_SHA2_reset_224
Hacl_Hash_SHA2_reset_256
Reset an existing state to the initial hash state with empty data.
Hacl_Hash_SHA2_reset_384
Hacl_Hash_SHA2_reset_512
Hacl_Hash_SHA2_update_224
Hacl_Hash_SHA2_update_256
Feed an arbitrary amount of data into the hash. This function returns 0 for success, or 1 if the combined length of all of the data passed to update_256 (since the last call to reset_256) exceeds 2^61-1 bytes.
Hacl_Hash_SHA2_update_384
Hacl_Hash_SHA2_update_512
Feed an arbitrary amount of data into the hash. This function returns 0 for success, or 1 if the combined length of all of the data passed to update_512 (since the last call to reset_512) exceeds 2^125-1 bytes.
Hacl_Hash_SHA3_absorb_inner
Hacl_Hash_SHA3_block_len
Hacl_Hash_SHA3_copy
Hacl_Hash_SHA3_digest
Hacl_Hash_SHA3_free
Hacl_Hash_SHA3_get_alg
Hacl_Hash_SHA3_hash_len
Hacl_Hash_SHA3_is_shake
Hacl_Hash_SHA3_keccak
Hacl_Hash_SHA3_malloc
Hacl_Hash_SHA3_reset
Hacl_Hash_SHA3_sha3_224
Hacl_Hash_SHA3_sha3_256
Hacl_Hash_SHA3_sha3_384
Hacl_Hash_SHA3_sha3_512
Hacl_Hash_SHA3_shake128_hacl
Hacl_Hash_SHA3_shake256_hacl
Hacl_Hash_SHA3_squeeze
Hacl_Hash_SHA3_squeeze0
Hacl_Hash_SHA3_update
Hacl_P256_compressed_to_raw
Convert a public key from compressed to its raw form.
Hacl_P256_dh_initiator
Compute the public key from the private key.
Hacl_P256_dh_responder
Execute the diffie-hellmann key exchange.
Hacl_P256_ecdsa_sign_p256_sha2
Create an ECDSA signature using SHA2-256.
Hacl_P256_ecdsa_sign_p256_sha384
Create an ECDSA signature using SHA2-384.
Hacl_P256_ecdsa_sign_p256_sha512
Create an ECDSA signature using SHA2-512.
Hacl_P256_ecdsa_sign_p256_without_hash
Create an ECDSA signature WITHOUT hashing first.
Hacl_P256_ecdsa_verif_p256_sha2
Verify an ECDSA signature using SHA2-256.
Hacl_P256_ecdsa_verif_p256_sha384
Verify an ECDSA signature using SHA2-384.
Hacl_P256_ecdsa_verif_p256_sha512
Verify an ECDSA signature using SHA2-512.
Hacl_P256_ecdsa_verif_without_hash
Verify an ECDSA signature WITHOUT hashing first.
Hacl_P256_raw_to_compressed
Convert a public key from raw to its compressed form.
Hacl_P256_raw_to_uncompressed
Convert a public key from raw to its uncompressed form.
Hacl_P256_uncompressed_to_raw
Convert a public key from uncompressed to its raw form.
Hacl_P256_validate_private_key
Private key validation.
Hacl_P256_validate_public_key
Public key validation.
Hacl_RSAPSS_mgf_hash
The mask generation function defined in the Public Key Cryptography Standard #1 (https://www.ietf.org/rfc/rfc2437.txt Section 10.2.1)
Hacl_RSAPSS_new_rsapss_load_pkey
Load a public key from key parts.
Hacl_RSAPSS_new_rsapss_load_skey
Load a secret key from key parts.
Hacl_RSAPSS_rsapss_pkey_verify
Verify the signature sgnt of a message msg.
Hacl_RSAPSS_rsapss_sign
Sign a message msg and write the signature to sgnt.
Hacl_RSAPSS_rsapss_skey_sign
Sign a message msg and write the signature to sgnt.
Hacl_RSAPSS_rsapss_verify
Verify the signature sgnt of a message msg.
hacl_free

Type Aliases§

EverCrypt_AEAD_state_s
EverCrypt_Error_error_code
Hacl_HMAC_DRBG_state
Hacl_HMAC_DRBG_supported_alg
Hacl_Hash_Blake2b_Simd256_block_state_t
Hacl_Hash_Blake2b_Simd256_state_t
Hacl_Hash_Blake2b_block_state_t
Hacl_Hash_Blake2b_state_t
Hacl_Hash_Blake2s_Simd128_block_state_t
Hacl_Hash_Blake2s_Simd128_state_t
Hacl_Hash_Blake2s_block_state_t
Hacl_Hash_Blake2s_state_t
Hacl_Hash_SHA1_state_t
Hacl_Hash_SHA2_state_t_224
Hacl_Hash_SHA2_state_t_256
Hacl_Hash_SHA2_state_t_384
Hacl_Hash_SHA2_state_t_512
Hacl_Hash_SHA3_hash_buf
Hacl_Hash_SHA3_state_t
Hacl_Streaming_MD_state_32
Hacl_Streaming_MD_state_64
Hacl_Streaming_Types_error_code
Lib_IntVector_Intrinsics_vec128
Lib_IntVector_Intrinsics_vec256
Spec_Agile_AEAD_alg
Spec_FFDHE_ffdhe_alg
Spec_Hash_Definitions_hash_alg
__m128i
__m256i