From 89b3fec597f4ebfcbd71c8010de137f28ed56853 Mon Sep 17 00:00:00 2001 From: Justin Smith Date: Thu, 12 Dec 2024 08:32:56 -0500 Subject: [PATCH 01/14] Update headers for FIPS bindings --- aws-lc-fips-sys/include/rust_wrapper.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/aws-lc-fips-sys/include/rust_wrapper.h b/aws-lc-fips-sys/include/rust_wrapper.h index 8574f705d44..68504466384 100644 --- a/aws-lc-fips-sys/include/rust_wrapper.h +++ b/aws-lc-fips-sys/include/rust_wrapper.h @@ -26,6 +26,7 @@ #include "openssl/conf.h" #include "openssl/cpu.h" #include "openssl/crypto.h" +#include "openssl/ctrdrbg.h" #include "openssl/curve25519.h" #include "openssl/des.h" #include "openssl/dh.h" @@ -45,6 +46,7 @@ #include "openssl/hmac.h" #include "openssl/hpke.h" #include "openssl/hrss.h" +#include "openssl/kdf.h" #include "openssl/lhash.h" #include "openssl/md4.h" #include "openssl/md5.h" @@ -78,6 +80,7 @@ #include "openssl/x509.h" #include "openssl/x509_vfy.h" #include "openssl/x509v3.h" +#include "openssl/experimental/kem_deterministic_api.h" #if defined(AWS_LC_RUST_INCLUDE_SSL) #include "openssl/ssl.h" @@ -90,14 +93,6 @@ #define AWS_LC_FIPS_SYS_EXPORT __attribute__((visibility("default"))) #endif -// The TLS PRF API is exported in AWS-LC main branch, but in the current FIPS branch, this API is defined in a private header. -AWS_LC_FIPS_SYS_EXPORT int CRYPTO_tls1_prf(const EVP_MD *digest, - uint8_t *out, size_t out_len, - const uint8_t *secret, size_t secret_len, - const char *label, size_t label_len, - const uint8_t *seed1, size_t seed1_len, - const uint8_t *seed2, size_t seed2_len); - #define AWS_LC_WRAPPER_ADD_PREFIX(a, b) AWS_LC_WRAPPER_ADD_PREFIX_INNER(a, b) #define AWS_LC_WRAPPER_ADD_PREFIX_INNER(a, b) a ## _ ## b From 196f32a0171d8f3e01d0fe088e39eeca41bd8a2f Mon Sep 17 00:00:00 2001 From: aws-lc-fips-sys-bindings-generator Date: Thu, 12 Dec 2024 14:10:41 +0000 Subject: [PATCH 02/14] Symbols from macos-14-xlarge From 5803e40ba3c6e429631f96743d31969e4f607e8f Mon Sep 17 00:00:00 2001 From: aws-lc-fips-sys-bindings-generator Date: Thu, 12 Dec 2024 14:11:18 +0000 Subject: [PATCH 03/14] Symbols from ubuntu-latest From 9bf8fc4413a82eab6d0851ca20a497f43b7877e2 Mon Sep 17 00:00:00 2001 From: aws-lc-fips-sys-bindings-generator Date: Thu, 12 Dec 2024 14:13:55 +0000 Subject: [PATCH 04/14] Symbols for aarch64-unknown-linux-gnu From 80e1cedc136cd2084064536afc2a6547103111fa Mon Sep 17 00:00:00 2001 From: aws-lc-fips-sys-bindings-generator Date: Thu, 12 Dec 2024 14:13:01 +0000 Subject: [PATCH 05/14] Symbols from macos-13 From 13bb533aa67757bd6156a78dd72071ac017ff3c6 Mon Sep 17 00:00:00 2001 From: aws-lc-fips-sys-bindings-generator Date: Thu, 12 Dec 2024 14:14:41 +0000 Subject: [PATCH 06/14] Symbols for x86_64-unknown-linux-musl From f6d930e6a0305c2eaf96f02b86f7201e0a89f0c2 Mon Sep 17 00:00:00 2001 From: aws-lc-fips-sys-bindings-generator Date: Thu, 12 Dec 2024 14:15:22 +0000 Subject: [PATCH 07/14] Symbols for aarch64-unknown-linux-musl From 78570d5a1d41c5f062dfaa51c1a2fefd8a41740c Mon Sep 17 00:00:00 2001 From: aws-lc-fips-sys-bindings-generator Date: Thu, 12 Dec 2024 14:18:20 +0000 Subject: [PATCH 08/14] Generated headers From b68da1ed3a32e4df86b93c14b2ae1495194e4784 Mon Sep 17 00:00:00 2001 From: aws-lc-fips-sys-bindings-generator Date: Thu, 12 Dec 2024 14:21:53 +0000 Subject: [PATCH 09/14] Generated bindings from ubuntu-latest --- .../src/x86_64_unknown_linux_gnu_crypto.rs | 148 ++++++++++++++++-- 1 file changed, 132 insertions(+), 16 deletions(-) diff --git a/aws-lc-fips-sys/src/x86_64_unknown_linux_gnu_crypto.rs b/aws-lc-fips-sys/src/x86_64_unknown_linux_gnu_crypto.rs index 50c38098e2c..79b5c4cef91 100644 --- a/aws-lc-fips-sys/src/x86_64_unknown_linux_gnu_crypto.rs +++ b/aws-lc-fips-sys/src/x86_64_unknown_linux_gnu_crypto.rs @@ -762,6 +762,8 @@ pub const CONF_R_UNABLE_TO_CREATE_NEW_SECTION: i32 = 104; pub const CONF_R_VARIABLE_HAS_NO_VALUE: i32 = 105; pub const CONF_R_VARIABLE_EXPANSION_TOO_LONG: i32 = 106; pub const CONF_R_VARIABLE_EXPANSION_NOT_SUPPORTED: i32 = 107; +pub const CTR_DRBG_ENTROPY_LEN: i32 = 48; +pub const CTR_DRBG_MAX_GENERATE_LENGTH: i32 = 65536; pub const X25519_PRIVATE_KEY_LEN: i32 = 32; pub const X25519_PUBLIC_VALUE_LEN: i32 = 32; pub const X25519_SHARED_KEY_LEN: i32 = 32; @@ -3322,6 +3324,9 @@ pub const HRSS_CIPHERTEXT_BYTES: i32 = 1138; pub const HRSS_KEY_BYTES: i32 = 32; pub const HRSS_POLY3_BYTES: i32 = 140; pub const HRSS_PRIVATE_KEY_BYTES: i32 = 1452; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND: i32 = 0; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY: i32 = 1; +pub const EVP_PKEY_HKDEF_MODE_EXPAND_ONLY: i32 = 2; pub const MD4_CBLOCK: i32 = 64; pub const MD4_DIGEST_LENGTH: i32 = 16; pub const PKCS7_DETACHED: i32 = 64; @@ -13286,6 +13291,41 @@ extern "C" { #[link_name = "\u{1}aws_lc_fips_0_13_0_OPENSSL_no_config"] pub fn OPENSSL_no_config(); } +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_CTR_DRBG_new"] + pub fn CTR_DRBG_new( + entropy: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_CTR_DRBG_free"] + pub fn CTR_DRBG_free(state: *mut CTR_DRBG_STATE); +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_CTR_DRBG_reseed"] + pub fn CTR_DRBG_reseed( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_CTR_DRBG_generate"] + pub fn CTR_DRBG_generate( + drbg: *mut CTR_DRBG_STATE, + out: *mut u8, + out_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_CTR_DRBG_clear"] + pub fn CTR_DRBG_clear(drbg: *mut CTR_DRBG_STATE); +} extern "C" { #[link_name = "\u{1}aws_lc_fips_0_13_0_X25519_keypair"] pub fn X25519_keypair(out_public_value: *mut u8, out_private_key: *mut u8); @@ -17947,6 +17987,98 @@ extern "C" { in_: *const u8, ) -> ::std::os::raw::c_int; } +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_CRYPTO_tls1_prf"] + pub fn CRYPTO_tls1_prf( + digest: *const EVP_MD, + out: *mut u8, + out_len: usize, + secret: *const u8, + secret_len: usize, + label: *const ::std::os::raw::c_char, + label_len: usize, + seed1: *const u8, + seed1_len: usize, + seed2: *const u8, + seed2_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_SSKDF_digest"] + pub fn SSKDF_digest( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + info: *const u8, + info_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_SSKDF_hmac"] + pub fn SSKDF_hmac( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + info: *const u8, + info_len: usize, + salt: *const u8, + salt_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_KBKDF_ctr_hmac"] + pub fn KBKDF_ctr_hmac( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + info: *const u8, + info_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_EVP_PKEY_CTX_hkdf_mode"] + pub fn EVP_PKEY_CTX_hkdf_mode( + ctx: *mut EVP_PKEY_CTX, + mode: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_EVP_PKEY_CTX_set_hkdf_md"] + pub fn EVP_PKEY_CTX_set_hkdf_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_EVP_PKEY_CTX_set1_hkdf_key"] + pub fn EVP_PKEY_CTX_set1_hkdf_key( + ctx: *mut EVP_PKEY_CTX, + key: *const u8, + key_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_EVP_PKEY_CTX_set1_hkdf_salt"] + pub fn EVP_PKEY_CTX_set1_hkdf_salt( + ctx: *mut EVP_PKEY_CTX, + salt: *const u8, + salt_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_EVP_PKEY_CTX_add1_hkdf_info"] + pub fn EVP_PKEY_CTX_add1_hkdf_info( + ctx: *mut EVP_PKEY_CTX, + info: *const u8, + info_len: usize, + ) -> ::std::os::raw::c_int; +} extern "C" { #[link_name = "\u{1}aws_lc_fips_0_13_0_MD4_Init"] pub fn MD4_Init(md4: *mut MD4_CTX) -> ::std::os::raw::c_int; @@ -28226,22 +28358,6 @@ extern "C" { encrypted_bit: u8, ) -> ::std::os::raw::c_int; } -extern "C" { - #[link_name = "\u{1}aws_lc_fips_0_13_0_CRYPTO_tls1_prf"] - pub fn CRYPTO_tls1_prf( - digest: *const EVP_MD, - out: *mut u8, - out_len: usize, - secret: *const u8, - secret_len: usize, - label: *const ::std::os::raw::c_char, - label_len: usize, - seed1: *const u8, - seed1_len: usize, - seed2: *const u8, - seed2_len: usize, - ) -> ::std::os::raw::c_int; -} extern "C" { #[link_name = "\u{1}aws_lc_fips_0_13_0_ERR_GET_LIB_RUST"] pub fn ERR_GET_LIB_RUST(packed_error: u32) -> ::std::os::raw::c_int; From cf9d650a7781ba0802aa24a95861eca7d2c4e2e0 Mon Sep 17 00:00:00 2001 From: aws-lc-fips-sys-bindings-generator Date: Thu, 12 Dec 2024 14:21:41 +0000 Subject: [PATCH 10/14] Generated bindings from macos-14-xlarge --- .../src/aarch64_apple_darwin_crypto.rs | 148 ++++++++++++++++-- 1 file changed, 132 insertions(+), 16 deletions(-) diff --git a/aws-lc-fips-sys/src/aarch64_apple_darwin_crypto.rs b/aws-lc-fips-sys/src/aarch64_apple_darwin_crypto.rs index a25497cef3d..4bc18957072 100644 --- a/aws-lc-fips-sys/src/aarch64_apple_darwin_crypto.rs +++ b/aws-lc-fips-sys/src/aarch64_apple_darwin_crypto.rs @@ -762,6 +762,8 @@ pub const CONF_R_UNABLE_TO_CREATE_NEW_SECTION: i32 = 104; pub const CONF_R_VARIABLE_HAS_NO_VALUE: i32 = 105; pub const CONF_R_VARIABLE_EXPANSION_TOO_LONG: i32 = 106; pub const CONF_R_VARIABLE_EXPANSION_NOT_SUPPORTED: i32 = 107; +pub const CTR_DRBG_ENTROPY_LEN: i32 = 48; +pub const CTR_DRBG_MAX_GENERATE_LENGTH: i32 = 65536; pub const X25519_PRIVATE_KEY_LEN: i32 = 32; pub const X25519_PUBLIC_VALUE_LEN: i32 = 32; pub const X25519_SHARED_KEY_LEN: i32 = 32; @@ -3322,6 +3324,9 @@ pub const HRSS_CIPHERTEXT_BYTES: i32 = 1138; pub const HRSS_KEY_BYTES: i32 = 32; pub const HRSS_POLY3_BYTES: i32 = 140; pub const HRSS_PRIVATE_KEY_BYTES: i32 = 1452; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND: i32 = 0; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY: i32 = 1; +pub const EVP_PKEY_HKDEF_MODE_EXPAND_ONLY: i32 = 2; pub const MD4_CBLOCK: i32 = 64; pub const MD4_DIGEST_LENGTH: i32 = 16; pub const PKCS7_DETACHED: i32 = 64; @@ -13259,6 +13264,41 @@ extern "C" { #[link_name = "\u{1}_aws_lc_fips_0_13_0_OPENSSL_no_config"] pub fn OPENSSL_no_config(); } +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_CTR_DRBG_new"] + pub fn CTR_DRBG_new( + entropy: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_CTR_DRBG_free"] + pub fn CTR_DRBG_free(state: *mut CTR_DRBG_STATE); +} +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_CTR_DRBG_reseed"] + pub fn CTR_DRBG_reseed( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_CTR_DRBG_generate"] + pub fn CTR_DRBG_generate( + drbg: *mut CTR_DRBG_STATE, + out: *mut u8, + out_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_CTR_DRBG_clear"] + pub fn CTR_DRBG_clear(drbg: *mut CTR_DRBG_STATE); +} extern "C" { #[link_name = "\u{1}_aws_lc_fips_0_13_0_X25519_keypair"] pub fn X25519_keypair(out_public_value: *mut u8, out_private_key: *mut u8); @@ -17920,6 +17960,98 @@ extern "C" { in_: *const u8, ) -> ::std::os::raw::c_int; } +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_CRYPTO_tls1_prf"] + pub fn CRYPTO_tls1_prf( + digest: *const EVP_MD, + out: *mut u8, + out_len: usize, + secret: *const u8, + secret_len: usize, + label: *const ::std::os::raw::c_char, + label_len: usize, + seed1: *const u8, + seed1_len: usize, + seed2: *const u8, + seed2_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_SSKDF_digest"] + pub fn SSKDF_digest( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + info: *const u8, + info_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_SSKDF_hmac"] + pub fn SSKDF_hmac( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + info: *const u8, + info_len: usize, + salt: *const u8, + salt_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_KBKDF_ctr_hmac"] + pub fn KBKDF_ctr_hmac( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + info: *const u8, + info_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_EVP_PKEY_CTX_hkdf_mode"] + pub fn EVP_PKEY_CTX_hkdf_mode( + ctx: *mut EVP_PKEY_CTX, + mode: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_EVP_PKEY_CTX_set_hkdf_md"] + pub fn EVP_PKEY_CTX_set_hkdf_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_EVP_PKEY_CTX_set1_hkdf_key"] + pub fn EVP_PKEY_CTX_set1_hkdf_key( + ctx: *mut EVP_PKEY_CTX, + key: *const u8, + key_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_EVP_PKEY_CTX_set1_hkdf_salt"] + pub fn EVP_PKEY_CTX_set1_hkdf_salt( + ctx: *mut EVP_PKEY_CTX, + salt: *const u8, + salt_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_EVP_PKEY_CTX_add1_hkdf_info"] + pub fn EVP_PKEY_CTX_add1_hkdf_info( + ctx: *mut EVP_PKEY_CTX, + info: *const u8, + info_len: usize, + ) -> ::std::os::raw::c_int; +} extern "C" { #[link_name = "\u{1}_aws_lc_fips_0_13_0_MD4_Init"] pub fn MD4_Init(md4: *mut MD4_CTX) -> ::std::os::raw::c_int; @@ -28199,22 +28331,6 @@ extern "C" { encrypted_bit: u8, ) -> ::std::os::raw::c_int; } -extern "C" { - #[link_name = "\u{1}_aws_lc_fips_0_13_0_CRYPTO_tls1_prf"] - pub fn CRYPTO_tls1_prf( - digest: *const EVP_MD, - out: *mut u8, - out_len: usize, - secret: *const u8, - secret_len: usize, - label: *const ::std::os::raw::c_char, - label_len: usize, - seed1: *const u8, - seed1_len: usize, - seed2: *const u8, - seed2_len: usize, - ) -> ::std::os::raw::c_int; -} extern "C" { #[link_name = "\u{1}_aws_lc_fips_0_13_0_ERR_GET_LIB_RUST"] pub fn ERR_GET_LIB_RUST(packed_error: u32) -> ::std::os::raw::c_int; From b3938b63a3c70053cf45f7fc65c5a52e403656a8 Mon Sep 17 00:00:00 2001 From: aws-lc-fips-sys-bindings-generator Date: Thu, 12 Dec 2024 14:22:43 +0000 Subject: [PATCH 11/14] Generated bindings from macos-13 --- .../src/x86_64_apple_darwin_crypto.rs | 148 ++++++++++++++++-- 1 file changed, 132 insertions(+), 16 deletions(-) diff --git a/aws-lc-fips-sys/src/x86_64_apple_darwin_crypto.rs b/aws-lc-fips-sys/src/x86_64_apple_darwin_crypto.rs index 3f91233746b..117ab84b1c1 100644 --- a/aws-lc-fips-sys/src/x86_64_apple_darwin_crypto.rs +++ b/aws-lc-fips-sys/src/x86_64_apple_darwin_crypto.rs @@ -762,6 +762,8 @@ pub const CONF_R_UNABLE_TO_CREATE_NEW_SECTION: i32 = 104; pub const CONF_R_VARIABLE_HAS_NO_VALUE: i32 = 105; pub const CONF_R_VARIABLE_EXPANSION_TOO_LONG: i32 = 106; pub const CONF_R_VARIABLE_EXPANSION_NOT_SUPPORTED: i32 = 107; +pub const CTR_DRBG_ENTROPY_LEN: i32 = 48; +pub const CTR_DRBG_MAX_GENERATE_LENGTH: i32 = 65536; pub const X25519_PRIVATE_KEY_LEN: i32 = 32; pub const X25519_PUBLIC_VALUE_LEN: i32 = 32; pub const X25519_SHARED_KEY_LEN: i32 = 32; @@ -3322,6 +3324,9 @@ pub const HRSS_CIPHERTEXT_BYTES: i32 = 1138; pub const HRSS_KEY_BYTES: i32 = 32; pub const HRSS_POLY3_BYTES: i32 = 140; pub const HRSS_PRIVATE_KEY_BYTES: i32 = 1452; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND: i32 = 0; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY: i32 = 1; +pub const EVP_PKEY_HKDEF_MODE_EXPAND_ONLY: i32 = 2; pub const MD4_CBLOCK: i32 = 64; pub const MD4_DIGEST_LENGTH: i32 = 16; pub const PKCS7_DETACHED: i32 = 64; @@ -13251,6 +13256,41 @@ extern "C" { #[link_name = "\u{1}_aws_lc_fips_0_13_0_OPENSSL_no_config"] pub fn OPENSSL_no_config(); } +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_CTR_DRBG_new"] + pub fn CTR_DRBG_new( + entropy: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_CTR_DRBG_free"] + pub fn CTR_DRBG_free(state: *mut CTR_DRBG_STATE); +} +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_CTR_DRBG_reseed"] + pub fn CTR_DRBG_reseed( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_CTR_DRBG_generate"] + pub fn CTR_DRBG_generate( + drbg: *mut CTR_DRBG_STATE, + out: *mut u8, + out_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_CTR_DRBG_clear"] + pub fn CTR_DRBG_clear(drbg: *mut CTR_DRBG_STATE); +} extern "C" { #[link_name = "\u{1}_aws_lc_fips_0_13_0_X25519_keypair"] pub fn X25519_keypair(out_public_value: *mut u8, out_private_key: *mut u8); @@ -17912,6 +17952,98 @@ extern "C" { in_: *const u8, ) -> ::std::os::raw::c_int; } +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_CRYPTO_tls1_prf"] + pub fn CRYPTO_tls1_prf( + digest: *const EVP_MD, + out: *mut u8, + out_len: usize, + secret: *const u8, + secret_len: usize, + label: *const ::std::os::raw::c_char, + label_len: usize, + seed1: *const u8, + seed1_len: usize, + seed2: *const u8, + seed2_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_SSKDF_digest"] + pub fn SSKDF_digest( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + info: *const u8, + info_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_SSKDF_hmac"] + pub fn SSKDF_hmac( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + info: *const u8, + info_len: usize, + salt: *const u8, + salt_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_KBKDF_ctr_hmac"] + pub fn KBKDF_ctr_hmac( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + info: *const u8, + info_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_EVP_PKEY_CTX_hkdf_mode"] + pub fn EVP_PKEY_CTX_hkdf_mode( + ctx: *mut EVP_PKEY_CTX, + mode: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_EVP_PKEY_CTX_set_hkdf_md"] + pub fn EVP_PKEY_CTX_set_hkdf_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_EVP_PKEY_CTX_set1_hkdf_key"] + pub fn EVP_PKEY_CTX_set1_hkdf_key( + ctx: *mut EVP_PKEY_CTX, + key: *const u8, + key_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_EVP_PKEY_CTX_set1_hkdf_salt"] + pub fn EVP_PKEY_CTX_set1_hkdf_salt( + ctx: *mut EVP_PKEY_CTX, + salt: *const u8, + salt_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}_aws_lc_fips_0_13_0_EVP_PKEY_CTX_add1_hkdf_info"] + pub fn EVP_PKEY_CTX_add1_hkdf_info( + ctx: *mut EVP_PKEY_CTX, + info: *const u8, + info_len: usize, + ) -> ::std::os::raw::c_int; +} extern "C" { #[link_name = "\u{1}_aws_lc_fips_0_13_0_MD4_Init"] pub fn MD4_Init(md4: *mut MD4_CTX) -> ::std::os::raw::c_int; @@ -28191,22 +28323,6 @@ extern "C" { encrypted_bit: u8, ) -> ::std::os::raw::c_int; } -extern "C" { - #[link_name = "\u{1}_aws_lc_fips_0_13_0_CRYPTO_tls1_prf"] - pub fn CRYPTO_tls1_prf( - digest: *const EVP_MD, - out: *mut u8, - out_len: usize, - secret: *const u8, - secret_len: usize, - label: *const ::std::os::raw::c_char, - label_len: usize, - seed1: *const u8, - seed1_len: usize, - seed2: *const u8, - seed2_len: usize, - ) -> ::std::os::raw::c_int; -} extern "C" { #[link_name = "\u{1}_aws_lc_fips_0_13_0_ERR_GET_LIB_RUST"] pub fn ERR_GET_LIB_RUST(packed_error: u32) -> ::std::os::raw::c_int; From 7895ee7e99e0463208ee7d5541c7d0c0fdfb2289 Mon Sep 17 00:00:00 2001 From: aws-lc-fips-sys-bindings-generator Date: Thu, 12 Dec 2024 14:25:09 +0000 Subject: [PATCH 12/14] Generated bindings for aarch64-unknown-linux-musl --- .../src/aarch64_unknown_linux_musl_crypto.rs | 148 ++++++++++++++++-- 1 file changed, 132 insertions(+), 16 deletions(-) diff --git a/aws-lc-fips-sys/src/aarch64_unknown_linux_musl_crypto.rs b/aws-lc-fips-sys/src/aarch64_unknown_linux_musl_crypto.rs index 3567e35183b..86998e6c4d3 100644 --- a/aws-lc-fips-sys/src/aarch64_unknown_linux_musl_crypto.rs +++ b/aws-lc-fips-sys/src/aarch64_unknown_linux_musl_crypto.rs @@ -762,6 +762,8 @@ pub const CONF_R_UNABLE_TO_CREATE_NEW_SECTION: i32 = 104; pub const CONF_R_VARIABLE_HAS_NO_VALUE: i32 = 105; pub const CONF_R_VARIABLE_EXPANSION_TOO_LONG: i32 = 106; pub const CONF_R_VARIABLE_EXPANSION_NOT_SUPPORTED: i32 = 107; +pub const CTR_DRBG_ENTROPY_LEN: i32 = 48; +pub const CTR_DRBG_MAX_GENERATE_LENGTH: i32 = 65536; pub const X25519_PRIVATE_KEY_LEN: i32 = 32; pub const X25519_PUBLIC_VALUE_LEN: i32 = 32; pub const X25519_SHARED_KEY_LEN: i32 = 32; @@ -3322,6 +3324,9 @@ pub const HRSS_CIPHERTEXT_BYTES: i32 = 1138; pub const HRSS_KEY_BYTES: i32 = 32; pub const HRSS_POLY3_BYTES: i32 = 140; pub const HRSS_PRIVATE_KEY_BYTES: i32 = 1452; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND: i32 = 0; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY: i32 = 1; +pub const EVP_PKEY_HKDEF_MODE_EXPAND_ONLY: i32 = 2; pub const MD4_CBLOCK: i32 = 64; pub const MD4_DIGEST_LENGTH: i32 = 16; pub const PKCS7_DETACHED: i32 = 64; @@ -12984,6 +12989,41 @@ extern "C" { #[link_name = "\u{1}aws_lc_fips_0_13_0_OPENSSL_no_config"] pub fn OPENSSL_no_config(); } +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_CTR_DRBG_new"] + pub fn CTR_DRBG_new( + entropy: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_CTR_DRBG_free"] + pub fn CTR_DRBG_free(state: *mut CTR_DRBG_STATE); +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_CTR_DRBG_reseed"] + pub fn CTR_DRBG_reseed( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_CTR_DRBG_generate"] + pub fn CTR_DRBG_generate( + drbg: *mut CTR_DRBG_STATE, + out: *mut u8, + out_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_CTR_DRBG_clear"] + pub fn CTR_DRBG_clear(drbg: *mut CTR_DRBG_STATE); +} extern "C" { #[link_name = "\u{1}aws_lc_fips_0_13_0_X25519_keypair"] pub fn X25519_keypair(out_public_value: *mut u8, out_private_key: *mut u8); @@ -17645,6 +17685,98 @@ extern "C" { in_: *const u8, ) -> ::std::os::raw::c_int; } +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_CRYPTO_tls1_prf"] + pub fn CRYPTO_tls1_prf( + digest: *const EVP_MD, + out: *mut u8, + out_len: usize, + secret: *const u8, + secret_len: usize, + label: *const ::std::os::raw::c_char, + label_len: usize, + seed1: *const u8, + seed1_len: usize, + seed2: *const u8, + seed2_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_SSKDF_digest"] + pub fn SSKDF_digest( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + info: *const u8, + info_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_SSKDF_hmac"] + pub fn SSKDF_hmac( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + info: *const u8, + info_len: usize, + salt: *const u8, + salt_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_KBKDF_ctr_hmac"] + pub fn KBKDF_ctr_hmac( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + info: *const u8, + info_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_EVP_PKEY_CTX_hkdf_mode"] + pub fn EVP_PKEY_CTX_hkdf_mode( + ctx: *mut EVP_PKEY_CTX, + mode: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_EVP_PKEY_CTX_set_hkdf_md"] + pub fn EVP_PKEY_CTX_set_hkdf_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_EVP_PKEY_CTX_set1_hkdf_key"] + pub fn EVP_PKEY_CTX_set1_hkdf_key( + ctx: *mut EVP_PKEY_CTX, + key: *const u8, + key_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_EVP_PKEY_CTX_set1_hkdf_salt"] + pub fn EVP_PKEY_CTX_set1_hkdf_salt( + ctx: *mut EVP_PKEY_CTX, + salt: *const u8, + salt_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_EVP_PKEY_CTX_add1_hkdf_info"] + pub fn EVP_PKEY_CTX_add1_hkdf_info( + ctx: *mut EVP_PKEY_CTX, + info: *const u8, + info_len: usize, + ) -> ::std::os::raw::c_int; +} extern "C" { #[link_name = "\u{1}aws_lc_fips_0_13_0_MD4_Init"] pub fn MD4_Init(md4: *mut MD4_CTX) -> ::std::os::raw::c_int; @@ -27924,22 +28056,6 @@ extern "C" { encrypted_bit: u8, ) -> ::std::os::raw::c_int; } -extern "C" { - #[link_name = "\u{1}aws_lc_fips_0_13_0_CRYPTO_tls1_prf"] - pub fn CRYPTO_tls1_prf( - digest: *const EVP_MD, - out: *mut u8, - out_len: usize, - secret: *const u8, - secret_len: usize, - label: *const ::std::os::raw::c_char, - label_len: usize, - seed1: *const u8, - seed1_len: usize, - seed2: *const u8, - seed2_len: usize, - ) -> ::std::os::raw::c_int; -} extern "C" { #[link_name = "\u{1}aws_lc_fips_0_13_0_ERR_GET_LIB_RUST"] pub fn ERR_GET_LIB_RUST(packed_error: u32) -> ::std::os::raw::c_int; From a8b0075a3a7502af852df4dbbdfd029a145b22dc Mon Sep 17 00:00:00 2001 From: aws-lc-fips-sys-bindings-generator Date: Thu, 12 Dec 2024 14:25:14 +0000 Subject: [PATCH 13/14] Generated bindings for x86_64-unknown-linux-musl --- .../src/x86_64_unknown_linux_musl_crypto.rs | 148 ++++++++++++++++-- 1 file changed, 132 insertions(+), 16 deletions(-) diff --git a/aws-lc-fips-sys/src/x86_64_unknown_linux_musl_crypto.rs b/aws-lc-fips-sys/src/x86_64_unknown_linux_musl_crypto.rs index 847d575973e..d65b72e30b4 100644 --- a/aws-lc-fips-sys/src/x86_64_unknown_linux_musl_crypto.rs +++ b/aws-lc-fips-sys/src/x86_64_unknown_linux_musl_crypto.rs @@ -762,6 +762,8 @@ pub const CONF_R_UNABLE_TO_CREATE_NEW_SECTION: i32 = 104; pub const CONF_R_VARIABLE_HAS_NO_VALUE: i32 = 105; pub const CONF_R_VARIABLE_EXPANSION_TOO_LONG: i32 = 106; pub const CONF_R_VARIABLE_EXPANSION_NOT_SUPPORTED: i32 = 107; +pub const CTR_DRBG_ENTROPY_LEN: i32 = 48; +pub const CTR_DRBG_MAX_GENERATE_LENGTH: i32 = 65536; pub const X25519_PRIVATE_KEY_LEN: i32 = 32; pub const X25519_PUBLIC_VALUE_LEN: i32 = 32; pub const X25519_SHARED_KEY_LEN: i32 = 32; @@ -3322,6 +3324,9 @@ pub const HRSS_CIPHERTEXT_BYTES: i32 = 1138; pub const HRSS_KEY_BYTES: i32 = 32; pub const HRSS_POLY3_BYTES: i32 = 140; pub const HRSS_PRIVATE_KEY_BYTES: i32 = 1452; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND: i32 = 0; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY: i32 = 1; +pub const EVP_PKEY_HKDEF_MODE_EXPAND_ONLY: i32 = 2; pub const MD4_CBLOCK: i32 = 64; pub const MD4_DIGEST_LENGTH: i32 = 16; pub const PKCS7_DETACHED: i32 = 64; @@ -12976,6 +12981,41 @@ extern "C" { #[link_name = "\u{1}aws_lc_fips_0_13_0_OPENSSL_no_config"] pub fn OPENSSL_no_config(); } +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_CTR_DRBG_new"] + pub fn CTR_DRBG_new( + entropy: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_CTR_DRBG_free"] + pub fn CTR_DRBG_free(state: *mut CTR_DRBG_STATE); +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_CTR_DRBG_reseed"] + pub fn CTR_DRBG_reseed( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_CTR_DRBG_generate"] + pub fn CTR_DRBG_generate( + drbg: *mut CTR_DRBG_STATE, + out: *mut u8, + out_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_CTR_DRBG_clear"] + pub fn CTR_DRBG_clear(drbg: *mut CTR_DRBG_STATE); +} extern "C" { #[link_name = "\u{1}aws_lc_fips_0_13_0_X25519_keypair"] pub fn X25519_keypair(out_public_value: *mut u8, out_private_key: *mut u8); @@ -17637,6 +17677,98 @@ extern "C" { in_: *const u8, ) -> ::std::os::raw::c_int; } +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_CRYPTO_tls1_prf"] + pub fn CRYPTO_tls1_prf( + digest: *const EVP_MD, + out: *mut u8, + out_len: usize, + secret: *const u8, + secret_len: usize, + label: *const ::std::os::raw::c_char, + label_len: usize, + seed1: *const u8, + seed1_len: usize, + seed2: *const u8, + seed2_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_SSKDF_digest"] + pub fn SSKDF_digest( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + info: *const u8, + info_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_SSKDF_hmac"] + pub fn SSKDF_hmac( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + info: *const u8, + info_len: usize, + salt: *const u8, + salt_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_KBKDF_ctr_hmac"] + pub fn KBKDF_ctr_hmac( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + info: *const u8, + info_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_EVP_PKEY_CTX_hkdf_mode"] + pub fn EVP_PKEY_CTX_hkdf_mode( + ctx: *mut EVP_PKEY_CTX, + mode: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_EVP_PKEY_CTX_set_hkdf_md"] + pub fn EVP_PKEY_CTX_set_hkdf_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_EVP_PKEY_CTX_set1_hkdf_key"] + pub fn EVP_PKEY_CTX_set1_hkdf_key( + ctx: *mut EVP_PKEY_CTX, + key: *const u8, + key_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_EVP_PKEY_CTX_set1_hkdf_salt"] + pub fn EVP_PKEY_CTX_set1_hkdf_salt( + ctx: *mut EVP_PKEY_CTX, + salt: *const u8, + salt_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_EVP_PKEY_CTX_add1_hkdf_info"] + pub fn EVP_PKEY_CTX_add1_hkdf_info( + ctx: *mut EVP_PKEY_CTX, + info: *const u8, + info_len: usize, + ) -> ::std::os::raw::c_int; +} extern "C" { #[link_name = "\u{1}aws_lc_fips_0_13_0_MD4_Init"] pub fn MD4_Init(md4: *mut MD4_CTX) -> ::std::os::raw::c_int; @@ -27916,22 +28048,6 @@ extern "C" { encrypted_bit: u8, ) -> ::std::os::raw::c_int; } -extern "C" { - #[link_name = "\u{1}aws_lc_fips_0_13_0_CRYPTO_tls1_prf"] - pub fn CRYPTO_tls1_prf( - digest: *const EVP_MD, - out: *mut u8, - out_len: usize, - secret: *const u8, - secret_len: usize, - label: *const ::std::os::raw::c_char, - label_len: usize, - seed1: *const u8, - seed1_len: usize, - seed2: *const u8, - seed2_len: usize, - ) -> ::std::os::raw::c_int; -} extern "C" { #[link_name = "\u{1}aws_lc_fips_0_13_0_ERR_GET_LIB_RUST"] pub fn ERR_GET_LIB_RUST(packed_error: u32) -> ::std::os::raw::c_int; From 56bceec5f323cb536e32bab56083da84549fd260 Mon Sep 17 00:00:00 2001 From: aws-lc-fips-sys-bindings-generator Date: Thu, 12 Dec 2024 14:25:12 +0000 Subject: [PATCH 14/14] Generated bindings for aarch64-unknown-linux-gnu --- .../src/aarch64_unknown_linux_gnu_crypto.rs | 148 ++++++++++++++++-- 1 file changed, 132 insertions(+), 16 deletions(-) diff --git a/aws-lc-fips-sys/src/aarch64_unknown_linux_gnu_crypto.rs b/aws-lc-fips-sys/src/aarch64_unknown_linux_gnu_crypto.rs index d8264dd87f7..f224ca708c0 100644 --- a/aws-lc-fips-sys/src/aarch64_unknown_linux_gnu_crypto.rs +++ b/aws-lc-fips-sys/src/aarch64_unknown_linux_gnu_crypto.rs @@ -762,6 +762,8 @@ pub const CONF_R_UNABLE_TO_CREATE_NEW_SECTION: i32 = 104; pub const CONF_R_VARIABLE_HAS_NO_VALUE: i32 = 105; pub const CONF_R_VARIABLE_EXPANSION_TOO_LONG: i32 = 106; pub const CONF_R_VARIABLE_EXPANSION_NOT_SUPPORTED: i32 = 107; +pub const CTR_DRBG_ENTROPY_LEN: i32 = 48; +pub const CTR_DRBG_MAX_GENERATE_LENGTH: i32 = 65536; pub const X25519_PRIVATE_KEY_LEN: i32 = 32; pub const X25519_PUBLIC_VALUE_LEN: i32 = 32; pub const X25519_SHARED_KEY_LEN: i32 = 32; @@ -3322,6 +3324,9 @@ pub const HRSS_CIPHERTEXT_BYTES: i32 = 1138; pub const HRSS_KEY_BYTES: i32 = 32; pub const HRSS_POLY3_BYTES: i32 = 140; pub const HRSS_PRIVATE_KEY_BYTES: i32 = 1452; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND: i32 = 0; +pub const EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY: i32 = 1; +pub const EVP_PKEY_HKDEF_MODE_EXPAND_ONLY: i32 = 2; pub const MD4_CBLOCK: i32 = 64; pub const MD4_DIGEST_LENGTH: i32 = 16; pub const PKCS7_DETACHED: i32 = 64; @@ -13294,6 +13299,41 @@ extern "C" { #[link_name = "\u{1}aws_lc_fips_0_13_0_OPENSSL_no_config"] pub fn OPENSSL_no_config(); } +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_CTR_DRBG_new"] + pub fn CTR_DRBG_new( + entropy: *const u8, + personalization: *const u8, + personalization_len: usize, + ) -> *mut CTR_DRBG_STATE; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_CTR_DRBG_free"] + pub fn CTR_DRBG_free(state: *mut CTR_DRBG_STATE); +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_CTR_DRBG_reseed"] + pub fn CTR_DRBG_reseed( + drbg: *mut CTR_DRBG_STATE, + entropy: *const u8, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_CTR_DRBG_generate"] + pub fn CTR_DRBG_generate( + drbg: *mut CTR_DRBG_STATE, + out: *mut u8, + out_len: usize, + additional_data: *const u8, + additional_data_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_CTR_DRBG_clear"] + pub fn CTR_DRBG_clear(drbg: *mut CTR_DRBG_STATE); +} extern "C" { #[link_name = "\u{1}aws_lc_fips_0_13_0_X25519_keypair"] pub fn X25519_keypair(out_public_value: *mut u8, out_private_key: *mut u8); @@ -17955,6 +17995,98 @@ extern "C" { in_: *const u8, ) -> ::std::os::raw::c_int; } +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_CRYPTO_tls1_prf"] + pub fn CRYPTO_tls1_prf( + digest: *const EVP_MD, + out: *mut u8, + out_len: usize, + secret: *const u8, + secret_len: usize, + label: *const ::std::os::raw::c_char, + label_len: usize, + seed1: *const u8, + seed1_len: usize, + seed2: *const u8, + seed2_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_SSKDF_digest"] + pub fn SSKDF_digest( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + info: *const u8, + info_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_SSKDF_hmac"] + pub fn SSKDF_hmac( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + info: *const u8, + info_len: usize, + salt: *const u8, + salt_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_KBKDF_ctr_hmac"] + pub fn KBKDF_ctr_hmac( + out_key: *mut u8, + out_len: usize, + digest: *const EVP_MD, + secret: *const u8, + secret_len: usize, + info: *const u8, + info_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_EVP_PKEY_CTX_hkdf_mode"] + pub fn EVP_PKEY_CTX_hkdf_mode( + ctx: *mut EVP_PKEY_CTX, + mode: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_EVP_PKEY_CTX_set_hkdf_md"] + pub fn EVP_PKEY_CTX_set_hkdf_md( + ctx: *mut EVP_PKEY_CTX, + md: *const EVP_MD, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_EVP_PKEY_CTX_set1_hkdf_key"] + pub fn EVP_PKEY_CTX_set1_hkdf_key( + ctx: *mut EVP_PKEY_CTX, + key: *const u8, + key_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_EVP_PKEY_CTX_set1_hkdf_salt"] + pub fn EVP_PKEY_CTX_set1_hkdf_salt( + ctx: *mut EVP_PKEY_CTX, + salt: *const u8, + salt_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}aws_lc_fips_0_13_0_EVP_PKEY_CTX_add1_hkdf_info"] + pub fn EVP_PKEY_CTX_add1_hkdf_info( + ctx: *mut EVP_PKEY_CTX, + info: *const u8, + info_len: usize, + ) -> ::std::os::raw::c_int; +} extern "C" { #[link_name = "\u{1}aws_lc_fips_0_13_0_MD4_Init"] pub fn MD4_Init(md4: *mut MD4_CTX) -> ::std::os::raw::c_int; @@ -28234,22 +28366,6 @@ extern "C" { encrypted_bit: u8, ) -> ::std::os::raw::c_int; } -extern "C" { - #[link_name = "\u{1}aws_lc_fips_0_13_0_CRYPTO_tls1_prf"] - pub fn CRYPTO_tls1_prf( - digest: *const EVP_MD, - out: *mut u8, - out_len: usize, - secret: *const u8, - secret_len: usize, - label: *const ::std::os::raw::c_char, - label_len: usize, - seed1: *const u8, - seed1_len: usize, - seed2: *const u8, - seed2_len: usize, - ) -> ::std::os::raw::c_int; -} extern "C" { #[link_name = "\u{1}aws_lc_fips_0_13_0_ERR_GET_LIB_RUST"] pub fn ERR_GET_LIB_RUST(packed_error: u32) -> ::std::os::raw::c_int;