Home
last modified time | relevance | path

Searched refs:type (Results 1 – 25 of 139) sorted by relevance

123456

/mbedtls/library/
A Dlms.c66 #define MERKLE_TREE_NODE_AM(type) ((size_t) 1 << (MBEDTLS_LMS_H_TREE_HEIGHT(type) + 1u)) argument
67 #define MERKLE_TREE_LEAF_NODE_AM(type) ((size_t) 1 << MBEDTLS_LMS_H_TREE_HEIGHT(type)) argument
238 mbedtls_lms_algorithm_type_t type; in mbedtls_lms_import_public_key() local
242 if (type != MBEDTLS_LMS_SHA256_M32_H10) { in mbedtls_lms_import_public_key()
245 ctx->params.type = type; in mbedtls_lms_import_public_key()
262 MBEDTLS_LMS_M_NODE_BYTES(ctx->params.type)); in mbedtls_lms_import_public_key()
316 if (ctx->params.type in mbedtls_lms_verify()
359 ots_params.type = ctx->params.otstype; in mbedtls_lms_verify()
564 if (type != MBEDTLS_LMS_SHA256_M32_H10) { in mbedtls_lms_generate_private_key()
576 ctx->params.type = type; in mbedtls_lms_generate_private_key()
[all …]
A Dlmots.c231 MBEDTLS_LMOTS_N_HASH_LEN(params->type)); in hash_digit_array()
400 ctx->params.type = (mbedtls_lmots_algorithm_type_t) in mbedtls_lmots_import_public_key()
417 MBEDTLS_LMOTS_N_HASH_LEN(ctx->params.type)); in mbedtls_lmots_import_public_key()
447 MBEDTLS_LMOTS_N_HASH_LEN(ctx->params.type)); in mbedtls_lmots_export_public_key()
473 if (sig_size != MBEDTLS_LMOTS_SIG_LEN(params->type) || in mbedtls_lmots_calculate_public_key_candidate()
500 *out_len = MBEDTLS_LMOTS_N_HASH_LEN(params->type); in mbedtls_lmots_calculate_public_key_candidate()
521 if (ctx->params.type != MBEDTLS_LMOTS_SHA256_N32_W8) { in mbedtls_lmots_verify()
581 if (type != MBEDTLS_LMOTS_SHA256_N32_W8) { in mbedtls_lmots_generate_private_key()
585 ctx->params.type = type; in mbedtls_lmots_generate_private_key()
762 * MBEDTLS_LMOTS_N_HASH_LEN(ctx->params.type)); in mbedtls_lmots_sign()
[all …]
A Dpsa_crypto_ecp.c91 psa_key_type_t type, size_t curve_bits, in mbedtls_psa_ecp_load_representation() argument
101 if (PSA_KEY_TYPE_IS_PUBLIC_KEY(type) && in mbedtls_psa_ecp_load_representation()
160 if (PSA_KEY_TYPE_IS_PUBLIC_KEY(type)) { in mbedtls_psa_ecp_load_representation()
228 if (PSA_KEY_TYPE_ECC_GET_FAMILY(attributes->type) == in mbedtls_psa_ecp_import_key()
238 status = mbedtls_psa_ecp_export_key(attributes->type, in mbedtls_psa_ecp_import_key()
259 if (PSA_KEY_TYPE_IS_PUBLIC_KEY(type)) { in mbedtls_psa_ecp_export_key()
299 attributes->type, attributes->bits, in mbedtls_psa_ecp_export_public_key()
307 PSA_KEY_TYPE_ECC_GET_FAMILY(attributes->type)), in mbedtls_psa_ecp_export_public_key()
328 attributes->type); in mbedtls_psa_ecp_generate_key()
529 if (!PSA_KEY_TYPE_IS_ECC_KEY_PAIR(attributes->type) || in mbedtls_psa_key_agreement_ecdh()
[all …]
A Dpk_wrap.c54 return type == MBEDTLS_PK_RSA || in rsa_can_do()
493 .type = MBEDTLS_PK_RSA,
1114 .type = MBEDTLS_PK_ECKEY,
1157 .type = MBEDTLS_PK_ECKEY_DH,
1239 .type = MBEDTLS_PK_ECDSA,
1281 return type == MBEDTLS_PK_RSA; in rsa_alt_can_do()
1383 .type = MBEDTLS_PK_RSA_ALT,
1431 .type = MBEDTLS_PK_OPAQUE,
1474 psa_key_type_t type; in rsa_opaque_decrypt() local
1511 psa_key_type_t type; in rsa_opaque_sign_wrap() local
[all …]
A Dpsa_crypto_rsa.c60 psa_key_type_t type, const uint8_t *data, size_t data_length, in mbedtls_psa_rsa_load_representation() argument
73 if (PSA_KEY_TYPE_IS_KEY_PAIR(type)) { in mbedtls_psa_rsa_load_representation()
119 status = mbedtls_psa_rsa_load_representation(attributes->type, in mbedtls_psa_rsa_import_key()
133 status = mbedtls_psa_rsa_export_key(attributes->type, in mbedtls_psa_rsa_import_key()
151 psa_status_t mbedtls_psa_rsa_export_key(psa_key_type_t type, in mbedtls_psa_rsa_export_key() argument
163 if (PSA_KEY_TYPE_IS_KEY_PAIR(type)) { in mbedtls_psa_rsa_export_key()
199 attributes->type, key_buffer, key_buffer_size, &rsa); in mbedtls_psa_rsa_export_public_key()
270 status = mbedtls_psa_rsa_export_key(attributes->type, in mbedtls_psa_rsa_generate_key()
328 status = mbedtls_psa_rsa_load_representation(attributes->type, in mbedtls_psa_rsa_sign_hash()
539 if (PSA_KEY_TYPE_IS_RSA(attributes->type)) { in mbedtls_psa_asymmetric_encrypt()
[all …]
A Dlmots.h27 #define MBEDTLS_LMOTS_PUBLIC_KEY_LEN(type) (MBEDTLS_LMOTS_TYPE_LEN + \ argument
30 MBEDTLS_LMOTS_N_HASH_LEN(type))
35 #define MBEDTLS_LMOTS_SIG_SIGNATURE_OFFSET(type) (MBEDTLS_LMOTS_SIG_C_RANDOM_OFFSET + \ argument
36 MBEDTLS_LMOTS_C_RANDOM_VALUE_LEN(type))
226 mbedtls_lmots_algorithm_type_t type,
A Dpsa_crypto_storage.h276 psa_crypto_transaction_type_t type; member
285 psa_crypto_transaction_type_t type; member
304 psa_crypto_transaction_type_t type) in psa_crypto_prepare_transaction() argument
306 psa_crypto_transaction.unknown.type = type; in psa_crypto_prepare_transaction()
A Dmd.c68 #define MD_INFO(type, out_size, block_size) type, out_size, block_size, argument
70 #define MD_INFO(type, out_size, block_size) type, out_size, argument
194 switch (info->type) { in psa_alg_of_md()
273 switch (ctx->md_info->type) { in mbedtls_md_free()
358 switch (src->md_info->type) { in mbedtls_md_clone()
448 switch (md_info->type) { in mbedtls_md_setup()
527 switch (ctx->md_info->type) { in mbedtls_md_starts()
586 switch (ctx->md_info->type) { in mbedtls_md_update()
644 switch (ctx->md_info->type) { in mbedtls_md_finish()
702 switch (md_info->type) { in mbedtls_md()
[all …]
A Dpk.c165 psa_key_type_t type; in mbedtls_pk_setup_opaque() local
174 type = psa_get_key_type(&attributes); in mbedtls_pk_setup_opaque()
240 return ctx->pk_info->can_do(type); in mbedtls_pk_can_do()
283 mbedtls_pk_type_t type; in mbedtls_pk_can_do_ext() local
286 type = MBEDTLS_PK_ECKEY; in mbedtls_pk_can_do_ext()
289 type = MBEDTLS_PK_RSA; in mbedtls_pk_can_do_ext()
291 type = MBEDTLS_PK_RSASSA_PSS; in mbedtls_pk_can_do_ext()
300 switch (type) { in mbedtls_pk_can_do_ext()
1116 if (!mbedtls_pk_can_do(ctx, type)) { in mbedtls_pk_verify_ext()
1120 if (type != MBEDTLS_PK_RSASSA_PSS) { in mbedtls_pk_verify_ext()
[all …]
A Dpsa_crypto.c613 switch (type) { in psa_validate_unstructured_key_bit_size()
742 psa_key_type_t type = attributes->type; in psa_import_key_into_slot() local
1458 psa_key_type_t type = attributes->type; in psa_export_key_internal() local
1531 psa_key_type_t type = attributes->type; in psa_export_public_key_internal() local
1534 (PSA_KEY_TYPE_IS_RSA(type) || PSA_KEY_TYPE_IS_ECC(type) || in psa_export_public_key_internal()
2025 if (attributes->type != slot->attr.type) { in psa_validate_optional_attributes()
2200 actual_attributes.type = source_slot->attr.type; in psa_copy_key()
7822 if (PSA_KEY_TYPE_IS_RSA(type) && PSA_KEY_TYPE_IS_KEY_PAIR(type)) { in psa_validate_key_type_and_size_for_key_generation()
7846 if (PSA_KEY_TYPE_IS_DH(type) && PSA_KEY_TYPE_IS_KEY_PAIR(type)) { in psa_validate_key_type_and_size_for_key_generation()
7865 psa_key_type_t type = attributes->type; in psa_generate_key_internal() local
[all …]
/mbedtls/include/mbedtls/
A Dlms.h33 #define MBEDTLS_LMOTS_N_HASH_LEN(type) ((type) == MBEDTLS_LMOTS_SHA256_N32_W8 ? 32u : 0) argument
37 #define MBEDTLS_LMOTS_P_SIG_DIGIT_COUNT(type) ((type) == MBEDTLS_LMOTS_SHA256_N32_W8 ? 34u : 0) argument
38 #define MBEDTLS_LMOTS_C_RANDOM_VALUE_LEN(type) (MBEDTLS_LMOTS_N_HASH_LEN(type)) argument
40 #define MBEDTLS_LMOTS_SIG_LEN(type) (MBEDTLS_LMOTS_TYPE_LEN + \ argument
43 MBEDTLS_LMOTS_N_HASH_LEN(type)))
47 #define MBEDTLS_LMS_H_TREE_HEIGHT(type) ((type) == MBEDTLS_LMS_SHA256_M32_H10 ? 10u : 0) argument
52 #define MBEDTLS_LMS_M_NODE_BYTES(type) ((type) == MBEDTLS_LMS_SHA256_M32_H10 ? 32 : 0) argument
55 #define MBEDTLS_LMS_SIG_LEN(type, otstype) (MBEDTLS_LMOTS_Q_LEAF_ID_LEN + \ argument
61 #define MBEDTLS_LMS_PUBLIC_KEY_LEN(type) (MBEDTLS_LMS_TYPE_LEN + \ argument
64 MBEDTLS_LMS_M_NODE_BYTES(type))
[all …]
/mbedtls/tests/suites/
A Dtest_suite_psa_crypto_storage_format.current.data107 save type: AES 128-bit
135 save type: AES 128-bit, CCM
143 save type: AES 128-bit, CFB
187 save type: AES 192-bit
267 save type: AES 256-bit
347 save type: ARIA 128-bit
419 save type: ARIA 192-bit
491 save type: ARIA 256-bit
799 save type: DES 64-bit
815 save type: DES 128-bit
[all …]
A Dtest_suite_psa_crypto_storage_format.v0.data195 read type: AES 128-bit
223 read type: AES 128-bit, CCM
231 read type: AES 128-bit, CFB
275 read type: AES 192-bit
355 read type: AES 256-bit
435 read type: ARIA 128-bit
507 read type: ARIA 192-bit
579 read type: ARIA 256-bit
887 read type: DES 64-bit
903 read type: DES 128-bit
[all …]
A Dtest_suite_psa_crypto_not_supported.generated.data363 PSA import ECC_KEY_PAIR(SECP_K1) 192-bit type not supported
371 PSA import ECC_KEY_PAIR(SECP_K1) 225-bit type not supported
379 PSA import ECC_KEY_PAIR(SECP_K1) 256-bit type not supported
435 PSA import ECC_KEY_PAIR(SECP_R1) 224-bit type not supported
443 PSA import ECC_KEY_PAIR(SECP_R1) 256-bit type not supported
451 PSA import ECC_KEY_PAIR(SECP_R1) 384-bit type not supported
459 PSA import ECC_KEY_PAIR(SECP_R1) 521-bit type not supported
531 PSA import ECC_KEY_PAIR(SECP_R2) 160-bit type not supported
555 PSA import ECC_KEY_PAIR(SECT_K1) 163-bit type not supported
563 PSA import ECC_KEY_PAIR(SECT_K1) 233-bit type not supported
[all …]
A Dtest_suite_psa_crypto_metadata.function174 TEST_EQUAL(PSA_KEY_TYPE_IS_ASYMMETRIC(type),
178 (PSA_KEY_TYPE_IS_ECC(type) &&
181 (PSA_KEY_TYPE_IS_ECC(type) &&
184 (PSA_KEY_TYPE_IS_DH(type) &&
187 (PSA_KEY_TYPE_IS_DH(type) &&
190 TEST_PARITY(type);
628 psa_key_type_t type = type_arg;
640 TEST_EQUAL(PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR(type), type);
649 TEST_EQUAL(PSA_KEY_TYPE_KEY_PAIR_OF_PUBLIC_KEY(type), type);
657 psa_key_type_t type = type_arg;
[all …]
A Dtest_suite_lms.data189 LMS negative test (invalid lms type) #1
191 # LMOTS type (0x4) but an invalid LMS type (0x5), and should fail.
194 LMS negative test (invalid lms type) #2
196 # LMOTS type (0x4) but an invalid LMS type (0x7), and should fail.
201 # invalid LMOTS type (0x3) but a valid LMS type (0x6), and should fail.
206 # invalid LMOTS type (0x5) but a valid LMS type (0x6), and should fail.
231 LMS key import no LMS type test
237 LMS key import no LMOTS type test
243 LMS key import invalid LMS type test #1
248 LMS key import invalid LMS type test #2
[all …]
/mbedtls/include/psa/
A Dcrypto_values.h379 #define PSA_KEY_TYPE_IS_VENDOR_DEFINED(type) \ argument
380 (((type) & PSA_KEY_TYPE_VENDOR_FLAG) != 0)
386 #define PSA_KEY_TYPE_IS_UNSTRUCTURED(type) \ argument
412 #define PSA_KEY_TYPE_KEY_PAIR_OF_PUBLIC_KEY(type) \ argument
413 ((type) | PSA_KEY_TYPE_CATEGORY_FLAG_PAIR)
424 #define PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR(type) \ argument
425 ((type) & ~PSA_KEY_TYPE_CATEGORY_FLAG_PAIR)
731 #define PSA_KEY_TYPE_DH_GET_FAMILY(type) \ argument
732 ((psa_dh_family_t) (PSA_KEY_TYPE_IS_DH(type) ? \
744 #define PSA_GET_KEY_TYPE_BLOCK_SIZE_EXPONENT(type) \ argument
[all …]
/mbedtls/tests/scripts/
A Dgenerate_server9_bad_saltlen.py34 parser.add_argument('--ca-name', type=str, required=True,
36 parser.add_argument('--ca-password', type=str,
38 parser.add_argument('--csr', type=str, required=True,
40 parser.add_argument('--openssl-extfile', type=str,
42 parser.add_argument('--anounce_saltlen', type=auto_int,
44 parser.add_argument('--actual_saltlen', type=auto_int,
46 parser.add_argument('--output', type=str, required=True)
A Dgenerate_test_cert_macros.py39 parser.add_argument('--string', type=macro_define_type, action=MacroDefineAction,
41 parser.add_argument('--binary', type=macro_define_type, action=MacroDefineAction,
44 parser.add_argument('--password', type=macro_define_type, action=MacroDefineAction,
46 parser.add_argument('--output', type=str, required=True)
/mbedtls/programs/test/
A Dudp_proxy.c480 const char *type; member
499 p->way, p->type, p->len); in print_packet()
502 p->way, p->type, p->len, why); in print_packet()
538 strcmp(p->type, "ClientHello") == 0) { in send_packet()
545 strcmp(p->type, "CID") == 0 && in send_packet()
562 strcmp(p->type, "ApplicationData") == 0) { in send_packet()
587 strcmp(p->type, "ApplicationData") != 0 && in send_packet()
600 strcmp(p->type, "ApplicationData") == 0) { in send_packet()
685 cur.type = msg_type(cur.buf, cur.len); in handle_message()
723 strcmp(cur.type, "CID") != 0 && in handle_message()
[all …]
/mbedtls/programs/cipher/
A Dcipher_aead_demo.c121 mbedtls_cipher_type_t type; in aead_prepare() local
123 type = MBEDTLS_CIPHER_AES_128_GCM; in aead_prepare()
126 type = MBEDTLS_CIPHER_AES_256_GCM; in aead_prepare()
129 type = MBEDTLS_CIPHER_AES_128_GCM; in aead_prepare()
132 type = MBEDTLS_CIPHER_CHACHA20_POLY1305; in aead_prepare()
141 mbedtls_cipher_info_from_type(type))); in aead_prepare()
159 mbedtls_cipher_type_t type = mbedtls_cipher_get_type(ctx); in aead_info() local
160 const mbedtls_cipher_info_t *info = mbedtls_cipher_info_from_type(type); in aead_info()
/mbedtls/tests/src/
A Dpsa_exercise_key.c48 psa_key_type_t type; in check_key_attributes_sanity() local
59 type = psa_get_key_type(&attributes); in check_key_attributes_sanity()
93 TEST_ASSERT(type != 0); in check_key_attributes_sanity()
96 if (PSA_KEY_TYPE_IS_UNSTRUCTURED(type)) { in check_key_attributes_sanity()
101 if (PSA_KEY_TYPE_IS_ECC(type)) { in check_key_attributes_sanity()
103 } else if (PSA_KEY_TYPE_IS_RSA(type)) { in check_key_attributes_sanity()
844 psa_key_type_t type, size_t bits, in mbedtls_test_psa_exported_key_sanity_check() argument
849 if (PSA_KEY_TYPE_IS_UNSTRUCTURED(type)) { in mbedtls_test_psa_exported_key_sanity_check()
854 if (type == PSA_KEY_TYPE_RSA_KEY_PAIR) { in mbedtls_test_psa_exported_key_sanity_check()
972 if (PSA_KEY_TYPE_IS_DH_PUBLIC_KEY(type) || PSA_KEY_TYPE_IS_DH_KEY_PAIR(type)) { in mbedtls_test_psa_exported_key_sanity_check()
[all …]
/mbedtls/tests/src/drivers/
A Dtest_driver_key_management.c273 psa_key_type_t type = psa_get_key_type(attributes); in mbedtls_test_transparent_import_key() local
282 if (PSA_KEY_TYPE_IS_ECC(type)) { in mbedtls_test_transparent_import_key()
299 } else if (PSA_KEY_TYPE_IS_RSA(type)) { in mbedtls_test_transparent_import_key()
316 } else if (PSA_KEY_TYPE_IS_DH(type)) { in mbedtls_test_transparent_import_key()
340 (void) type; in mbedtls_test_transparent_import_key()
373 if (PSA_KEY_TYPE_IS_UNSTRUCTURED(type)) { in mbedtls_test_opaque_import_key()
389 } else if (PSA_KEY_TYPE_IS_ECC(type)) { in mbedtls_test_opaque_import_key()
411 } else if (PSA_KEY_TYPE_IS_RSA(type)) { in mbedtls_test_opaque_import_key()
518 if (PSA_KEY_TYPE_IS_UNSTRUCTURED(type) || in mbedtls_test_opaque_export_key()
519 PSA_KEY_TYPE_IS_RSA(type) || in mbedtls_test_opaque_export_key()
[all …]
/mbedtls/scripts/mbedtls_dev/
A Dpsa_storage.py106 type: Exprable, #pylint: disable=redefined-builtin
114 self.type = as_expr(type) #type: Expr
156 self.lifetime, self.type, self.bits,
182 type=0x2400, bits=128,
193 type='PSA_KEY_TYPE_RAW_DATA', bits=length*8,
201 key = Key(type=0x1001, bits=8,
/mbedtls/programs/x509/
A Dcert_req.c259 cur->node.type = MBEDTLS_X509_SAN_RFC822_NAME; in main()
261 cur->node.type = MBEDTLS_X509_SAN_UNIFORM_RESOURCE_IDENTIFIER; in main()
263 cur->node.type = MBEDTLS_X509_SAN_DNS_NAME; in main()
266 cur->node.type = MBEDTLS_X509_SAN_IP_ADDRESS; in main()
276 cur->node.type = MBEDTLS_X509_SAN_DIRECTORY_NAME; in main()
292 if (cur->node.type == MBEDTLS_X509_SAN_RFC822_NAME || in main()
293 cur->node.type == MBEDTLS_X509_SAN_UNIFORM_RESOURCE_IDENTIFIER || in main()
294 cur->node.type == MBEDTLS_X509_SAN_DNS_NAME) { in main()

Completed in 192 milliseconds

123456