| /mbedtls/library/ |
| A D | lms.c | 66 #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 D | lmots.c | 231 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 D | psa_crypto_ecp.c | 91 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 D | pk_wrap.c | 54 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 D | psa_crypto_rsa.c | 60 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 D | lmots.h | 27 #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 D | psa_crypto_storage.h | 276 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 D | md.c | 68 #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 D | pk.c | 165 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 D | psa_crypto.c | 613 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 D | lms.h | 33 #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 D | test_suite_psa_crypto_storage_format.current.data | 107 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 D | test_suite_psa_crypto_storage_format.v0.data | 195 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 D | test_suite_psa_crypto_not_supported.generated.data | 363 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 D | test_suite_psa_crypto_metadata.function | 174 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 D | test_suite_lms.data | 189 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 D | crypto_values.h | 379 #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 D | generate_server9_bad_saltlen.py | 34 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 D | generate_test_cert_macros.py | 39 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 D | udp_proxy.c | 480 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 D | cipher_aead_demo.c | 121 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 D | psa_exercise_key.c | 48 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 D | test_driver_key_management.c | 273 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 D | psa_storage.py | 106 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 D | cert_req.c | 259 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()
|