Home
last modified time | relevance | path

Searched refs:keylen (Results 1 – 14 of 14) sorted by relevance

/mbedtls-3.5.0/library/
Dpem.c98 static int pem_pbkdf1(unsigned char *key, size_t keylen, in pem_pbkdf1() argument
132 if (keylen <= 16) { in pem_pbkdf1()
133 memcpy(key, md5sum, keylen); in pem_pbkdf1()
159 if (keylen < 32) { in pem_pbkdf1()
160 use_len = keylen - 16; in pem_pbkdf1()
172 static int pem_pbkdf1(unsigned char *key, size_t keylen, in pem_pbkdf1() argument
207 if (keylen <= 16) { in pem_pbkdf1()
208 memcpy(key, md5sum, keylen); in pem_pbkdf1()
244 if (keylen < 32) { in pem_pbkdf1()
245 use_len = keylen - 16; in pem_pbkdf1()
[all …]
Dpkparse.c716 size_t keylen) in pk_parse_key_pkcs1_der() argument
726 end = p + keylen; in pk_parse_key_pkcs1_der()
876 const unsigned char *key, size_t keylen, in pk_parse_key_sec1_der() argument
884 unsigned char *end = p + keylen; in pk_parse_key_sec1_der()
1009 const unsigned char *key, size_t keylen, in pk_parse_key_pkcs8_unencrypted_der() argument
1016 unsigned char *end = p + keylen; in pk_parse_key_pkcs8_unencrypted_der()
1111 unsigned char *key, size_t keylen, in pk_parse_key_pkcs8_encrypted_der() argument
1126 end = p + keylen; in pk_parse_key_pkcs8_encrypted_der()
1212 const unsigned char *key, size_t keylen, in mbedtls_pk_parse_key() argument
1223 if (keylen == 0) { in mbedtls_pk_parse_key()
[all …]
Dpkcs5.c59 int *keylen, mbedtls_md_type_t *md_type) in pkcs5_parse_pbkdf2_params() argument
95 if ((ret = mbedtls_asn1_get_int(&p, end, keylen)) != 0) { in pkcs5_parse_pbkdf2_params()
126 int ret, iterations = 0, keylen = 0; in mbedtls_pkcs5_pbes2() local
163 &salt, &iterations, &keylen, in mbedtls_pkcs5_pbes2()
186 keylen = cipher_info->key_bitlen / 8; in mbedtls_pkcs5_pbes2()
198 salt.len, iterations, keylen, in mbedtls_pkcs5_pbes2()
207 if ((ret = mbedtls_cipher_setkey(&cipher_ctx, key, 8 * keylen, in mbedtls_pkcs5_pbes2()
Dpkcs12.c96 unsigned char *key, size_t keylen, in pkcs12_pbe_derive_key_iv() argument
120 if ((ret = mbedtls_pkcs12_derivation(key, keylen, unipwd, pwdlen * 2 + 2, in pkcs12_pbe_derive_key_iv()
146 int ret, keylen = 0; in mbedtls_pkcs12_pbe() local
162 keylen = cipher_info->key_bitlen / 8; in mbedtls_pkcs12_pbe()
165 key, keylen, in mbedtls_pkcs12_pbe()
177 mbedtls_cipher_setkey(&cipher_ctx, key, 8 * keylen, in mbedtls_pkcs12_pbe()
Dmd.c822 int mbedtls_md_hmac_starts(mbedtls_md_context_t *ctx, const unsigned char *key, size_t keylen) in mbedtls_md_hmac_starts() argument
832 if (keylen > (size_t) ctx->md_info->block_size) { in mbedtls_md_hmac_starts()
836 if ((ret = mbedtls_md_update(ctx, key, keylen)) != 0) { in mbedtls_md_hmac_starts()
843 keylen = ctx->md_info->size; in mbedtls_md_hmac_starts()
853 mbedtls_xor(ipad, ipad, key, keylen); in mbedtls_md_hmac_starts()
854 mbedtls_xor(opad, opad, key, keylen); in mbedtls_md_hmac_starts()
926 const unsigned char *key, size_t keylen, in mbedtls_md_hmac() argument
943 if ((ret = mbedtls_md_hmac_starts(&ctx, key, keylen)) != 0) { in mbedtls_md_hmac()
Dcmac.c360 const unsigned char *key, size_t keylen, in mbedtls_cipher_cmac() argument
377 ret = mbedtls_cipher_cmac_starts(&ctx, key, keylen); in mbedtls_cipher_cmac()
Dssl_tls.c8242 size_t keylen; in ssl_tls12_populate_transform() local
8382 keylen = PSA_BITS_TO_BYTES(key_bits); in ssl_tls12_populate_transform()
8384 keylen = mbedtls_cipher_info_get_key_bitlen(cipher_info) / 8; in ssl_tls12_populate_transform()
8496 (unsigned) keylen, in ssl_tls12_populate_transform()
8507 key2 = keyblk + mac_key_len * 2 + keylen; in ssl_tls12_populate_transform()
8514 memcpy(transform->iv_enc, key2 + keylen, iv_copy_len); in ssl_tls12_populate_transform()
8515 memcpy(transform->iv_dec, key2 + keylen + iv_copy_len, in ssl_tls12_populate_transform()
8521 key1 = keyblk + mac_key_len * 2 + keylen; in ssl_tls12_populate_transform()
8529 memcpy(transform->iv_dec, key1 + keylen, iv_copy_len); in ssl_tls12_populate_transform()
8530 memcpy(transform->iv_enc, key1 + keylen + iv_copy_len, in ssl_tls12_populate_transform()
/mbedtls-3.5.0/programs/aes/
Dcrypt_and_hash.c76 size_t keylen, ilen, olen; in main() local
184 keylen = fread(key, 1, sizeof(key), fkey); in main()
189 keylen = 0; in main()
192 keylen < (int) sizeof(key)) { in main()
193 key[keylen++] = (unsigned char) n; in main()
197 keylen = strlen(argv[6]); in main()
199 if (keylen > (int) sizeof(key)) { in main()
200 keylen = (int) sizeof(key); in main()
203 memcpy(key, argv[6], keylen); in main()
295 if (mbedtls_md_update(&md_ctx, key, keylen) != 0) { in main()
[all …]
/mbedtls-3.5.0/include/mbedtls/
Dmd.h493 size_t keylen);
580 int mbedtls_md_hmac(const mbedtls_md_info_t *md_info, const unsigned char *key, size_t keylen,
Dcmac.h191 const unsigned char *key, size_t keylen,
Dpk.h831 const unsigned char *key, size_t keylen,
865 const unsigned char *key, size_t keylen);
/mbedtls-3.5.0/tests/src/test_helpers/
Dssl_helpers.c1100 size_t keylen, maclen, ivlen; in mbedtls_test_ssl_build_transforms() local
1125 keylen = cipher_info->key_bitlen / 8; in mbedtls_test_ssl_build_transforms()
1129 CHK((key0 = mbedtls_calloc(1, keylen + 1)) != NULL); in mbedtls_test_ssl_build_transforms()
1130 CHK((key1 = mbedtls_calloc(1, keylen + 1)) != NULL); in mbedtls_test_ssl_build_transforms()
1131 memset(key0, 0x1, keylen); in mbedtls_test_ssl_build_transforms()
1132 memset(key1, 0x2, keylen); in mbedtls_test_ssl_build_transforms()
1155 (keylen << 3 > INT_MAX) ? INT_MAX : (int) keylen << 3, in mbedtls_test_ssl_build_transforms()
1159 (keylen << 3 > INT_MAX) ? INT_MAX : (int) keylen << 3, in mbedtls_test_ssl_build_transforms()
1163 (keylen << 3 > INT_MAX) ? INT_MAX : (int) keylen << 3, in mbedtls_test_ssl_build_transforms()
1167 (keylen << 3 > INT_MAX) ? INT_MAX : (int) keylen << 3, in mbedtls_test_ssl_build_transforms()
/mbedtls-3.5.0/tests/suites/
Dtest_suite_pkcs5.data153 PBES2 Decrypt (OK, PBKDF2 params explicit keylen)
157 PBES2 Decrypt (bad PBKDF2 params explicit keylen: overlong)
/mbedtls-3.5.0/docs/architecture/psa-migration/
Dpsa-limitations.md171 OpenSSL picks saltlen = keylen - hashlen - 2 (tested with openssl 1.1.1f).
248 all using saltlen = keylen - hashlen - 2, except for server9-defaults which is
279 all using saltlen = keylen - hashlen - 2.
305 all using saltlen = keylen - hashlen - 2.