/mbedtls-development/library/ |
A D | pkcs12.c | 45 mbedtls_asn1_buf *salt, int *iterations ) in pkcs12_parse_pbe_params() argument 62 if( ( ret = mbedtls_asn1_get_tag( p, end, &salt->len, MBEDTLS_ASN1_OCTET_STRING ) ) != 0 ) in pkcs12_parse_pbe_params() 65 salt->p = *p; in pkcs12_parse_pbe_params() 66 *p += salt->len; in pkcs12_parse_pbe_params() 86 mbedtls_asn1_buf salt; in pkcs12_pbe_derive_key_iv() local 93 memset( &salt, 0, sizeof(mbedtls_asn1_buf) ); in pkcs12_pbe_derive_key_iv() 96 if( ( ret = pkcs12_parse_pbe_params( pbe_params, &salt, in pkcs12_pbe_derive_key_iv() 104 salt.p, salt.len, md_type, in pkcs12_pbe_derive_key_iv() 114 salt.p, salt.len, md_type, in pkcs12_pbe_derive_key_iv() 200 const unsigned char *salt, size_t saltlen, in mbedtls_pkcs12_derivation() argument [all …]
|
A D | hkdf.c | 28 int mbedtls_hkdf( const mbedtls_md_info_t *md, const unsigned char *salt, in mbedtls_hkdf() argument 36 ret = mbedtls_hkdf_extract( md, salt, salt_len, ikm, ikm_len, prk ); in mbedtls_hkdf() 50 const unsigned char *salt, size_t salt_len, in mbedtls_hkdf_extract() argument 56 if( salt == NULL ) in mbedtls_hkdf_extract() 72 salt = null_salt; in mbedtls_hkdf_extract() 76 return( mbedtls_md_hmac( md, salt, salt_len, ikm, ikm_len, prk ) ); in mbedtls_hkdf_extract()
|
A D | pkcs5.c | 54 mbedtls_asn1_buf *salt, int *iterations, in pkcs5_parse_pbkdf2_params() argument 74 if( ( ret = mbedtls_asn1_get_tag( &p, end, &salt->len, in pkcs5_parse_pbkdf2_params() 78 salt->p = p; in pkcs5_parse_pbkdf2_params() 79 p += salt->len; in pkcs5_parse_pbkdf2_params() 117 mbedtls_asn1_buf salt; in mbedtls_pkcs5_pbes2() local 150 &salt, &iterations, &keylen, in mbedtls_pkcs5_pbes2() 193 if( ( ret = mbedtls_pkcs5_pbkdf2_hmac( &md_ctx, pwd, pwdlen, salt.p, salt.len, in mbedtls_pkcs5_pbes2() 220 size_t plen, const unsigned char *salt, size_t slen, in mbedtls_pkcs5_pbkdf2_hmac() argument 248 if( ( ret = mbedtls_md_hmac_update( ctx, salt, slen ) ) != 0 ) in mbedtls_pkcs5_pbkdf2_hmac()
|
A D | rsa.c | 1766 unsigned char *salt = NULL; in rsa_rsassa_pss_sign() local 1837 salt = p; in rsa_rsassa_pss_sign() 1838 if( ( ret = f_rng( p_rng, salt, slen ) ) != 0 ) in rsa_rsassa_pss_sign() 1854 if( ( ret = mbedtls_md_update( &md_ctx, salt, slen ) ) != 0 ) in rsa_rsassa_pss_sign()
|
A D | psa_crypto.c | 3042 const uint8_t *salt, in psa_asymmetric_encrypt() argument 3054 (void) salt; in psa_asymmetric_encrypt() 3116 salt, salt_length, in psa_asymmetric_encrypt() 3151 const uint8_t *salt, in psa_asymmetric_decrypt() argument 3163 (void) salt; in psa_asymmetric_decrypt() 3226 salt, salt_length, in psa_asymmetric_decrypt()
|
A D | ssl_tls.c | 1161 unsigned char const *salt = handshake->randbytes; in ssl_compute_master() local 1182 salt = session_hash; in ssl_compute_master() 1214 salt, salt_len, in ssl_compute_master() 1241 lbl, salt, salt_len, in ssl_compute_master()
|
/mbedtls-development/tests/suites/ |
A D | test_suite_hkdf.function | 12 void test_hkdf( int md_alg, data_t *ikm, data_t *salt, data_t *info, 23 ret = mbedtls_hkdf( md, salt->x, salt->len, ikm->x, ikm->len, 38 unsigned char *salt = NULL; 50 salt = mbedtls_test_unhexify_alloc( hex_salt_string, &salt_len ); 53 ret = mbedtls_hkdf_extract( md, salt, salt_len, ikm, ikm_len, output_prk ); 60 mbedtls_free(salt); 106 unsigned char *salt = NULL; 120 output_ret = mbedtls_hkdf_extract( &fake_md_info, salt, salt_len,
|
A D | test_suite_pkcs1_v21.data | 387 RSASSA-PSS Signature RSA-1016, SHA-512: minimum salt size not met 391 RSASSA-PSS Signature RSA-520, SHA-512: no possible salt size 395 RSASSA-PSS Signature RSA-528, SHA-512: zero salt size 807 RSASSA-PSS verify ext, 512-bit key, empty salt, good signature 811 RSASSA-PSS verify ext, 512-bit key, empty salt, bad signature 815 RSASSA-PSS verify ext, 522-bit key, SHA-512, empty salt, good signature 823 RSASSA-PSS verify ext, 528-bit key, SHA-512, empty salt, good signature 835 RSASSA-PSS verify ext, 521-bit key, SHA-512, empty salt, bad signature 839 RSASSA-PSS verify ext, 521-bit key, SHA-256, empty salt, good signature 847 RSASSA-PSS verify ext, all-zero padding, automatic salt length [all …]
|
A D | test_suite_pkcs1_v21.function | 193 char * salt, data_t * result_str, int result ) 199 ((void) salt);
|
A D | test_suite_pkcs5.data | 137 PBES2 Decrypt (bad PBKDF2 params salt: not an octet string) 141 PBES2 Decrypt (bad PBKDF2 params salt: overlong)
|
A D | test_suite_psa_crypto_metadata.data | 209 Asymmetric signature: RSA PSS-any-salt SHA-256 245 Asymmetric signature: RSA PSS-any-salt with wildcard hash
|
A D | test_suite_pkcs1_v15.function | 326 int hash, data_t * message_str, char * salt, 333 ((void) salt);
|
A D | test_suite_psa_crypto.data | 3482 PSA import/exercise RSA keypair, PSS-any-salt-SHA-256 3678 PSA verify hash: RSA-1024 PSS-any-salt SHA-256, slen=0 3686 PSA verify hash: RSA-1024 PSS-any-salt SHA-256, slen=31 3694 PSA verify hash: RSA-1024 PSS-any-salt SHA-256, slen=32 3726 PSA verify hash: RSA-528 PSS-any-salt SHA-512, slen=0 3870 PSA sign/verify message: RSA PSS-any-salt SHA-256 4074 PSA encrypt: RSA PKCS#1 v1.5: salt not allowed 4162 PSA decrypt: RSA PKCS#1 v1.5: salt not allowed 4287 PSA key derivation: HKDF-SHA-256, RAW_DATA key as salt 4309 PSA key derivation: HKDF-SHA-256, salt after secret [all …]
|
/mbedtls-development/ChangeLog.d/ |
A D | psa_alg_rsa_pss.txt | 2 * Fix PSA_ALG_RSA_PSS verification accepting an arbitrary salt length. 3 This algorithm now accepts only the same salt length for verification 5 PSA_ALG_RSA_PSS_ANY_SALT to accept any salt length. Fixes #4946.
|
/mbedtls-development/include/mbedtls/ |
A D | hkdf.h | 68 int mbedtls_hkdf( const mbedtls_md_info_t *md, const unsigned char *salt, 98 const unsigned char *salt, size_t salt_len,
|
A D | pkcs5.h | 88 size_t plen, const unsigned char *salt, size_t slen,
|
A D | pkcs12.h | 102 const unsigned char *salt, size_t saltlen,
|
/mbedtls-development/include/psa/ |
A D | crypto.h | 3139 const uint8_t *salt, 3200 const uint8_t *salt,
|
/mbedtls-development/docs/ |
A D | getting_started.md | 560 with a given key, salt and info:** 564 1. Provide an optional salt with `psa_key_derivation_input_bytes()`. 575 derived from the key, salt and info provided: 584 static const unsigned char salt[] = { 633 salt, sizeof(salt)); 635 printf("Failed to input salt (extract)\n");
|
/mbedtls-development/ |
A D | ChangeLog | 275 signature with a specific salt length. This function allows to validate 1620 * Extend RSASSA-PSS signature to allow a smaller salt size. Previously, PSS 1621 signature always used a salt with the same length as the hash, and returned 1622 an error if this was not possible. Now the salt size may be up to two bytes 1873 when calling with a NULL salt and non-zero salt_len. Contributed by 4211 * Fixed incorrect behaviour in case of RSASSA-PSS with a salt length 4289 length salt lengths
|