| /optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ |
| H 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 41 MBEDTLS_LMOTS_C_RANDOM_VALUE_LEN(type) + \ 42 (MBEDTLS_LMOTS_P_SIG_DIGIT_COUNT(type) * \ 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 [all …]
|
| /optee_os/core/pta/tests/ |
| H A D | invoke.c | 76 static TEE_Result test_entry_memref_null(uint32_t type, in test_entry_memref_null() argument 84 if (exp_pt != type) in test_entry_memref_null() 104 static TEE_Result test_entry_params(uint32_t type, TEE_Param p[TEE_NUM_PARAMS]) in test_entry_params() argument 110 if ((TEE_PARAM_TYPE_GET(type, 0) == TEE_PARAM_TYPE_VALUE_INOUT) && in test_entry_params() 111 (TEE_PARAM_TYPE_GET(type, 1) == TEE_PARAM_TYPE_NONE) && in test_entry_params() 112 (TEE_PARAM_TYPE_GET(type, 2) == TEE_PARAM_TYPE_NONE) && in test_entry_params() 113 (TEE_PARAM_TYPE_GET(type, 3) == TEE_PARAM_TYPE_NONE)) { in test_entry_params() 118 if ((TEE_PARAM_TYPE_GET(type, 0) == TEE_PARAM_TYPE_NONE) && in test_entry_params() 119 (TEE_PARAM_TYPE_GET(type, 1) == TEE_PARAM_TYPE_VALUE_INOUT) && in test_entry_params() 120 (TEE_PARAM_TYPE_GET(type, 2) == TEE_PARAM_TYPE_NONE) && in test_entry_params() [all …]
|
| /optee_os/lib/libmbedtls/mbedtls/library/ |
| H 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 68 #define MERKLE_TREE_INTERNAL_NODE_AM(type) ((unsigned int) \ argument 69 (1u << MBEDTLS_LMS_H_TREE_HEIGHT(type))) 105 memset(out, 0, MBEDTLS_LMS_M_NODE_BYTES(params->type)); in create_merkle_leaf_value() 136 status = psa_hash_finish(&op, out, MBEDTLS_LMS_M_NODE_BYTES(params->type), in create_merkle_leaf_value() 205 MBEDTLS_LMS_M_NODE_BYTES(params->type)); in create_merkle_internal_value() 211 MBEDTLS_LMS_M_NODE_BYTES(params->type)); in create_merkle_internal_value() 216 status = psa_hash_finish(&op, out, MBEDTLS_LMS_M_NODE_BYTES(params->type), in create_merkle_internal_value() 249 uint32_t type = MBEDTLS_GET_UINT32_BE(key, PUBLIC_KEY_TYPE_OFFSET); in mbedtls_lms_import_public_key() local [all …]
|
| H A D | lmots.c | 89 for (idx = 0; idx < MBEDTLS_LMOTS_N_HASH_LEN(params->type); idx++) { in lmots_checksum_calculate() 153 MBEDTLS_LMOTS_C_RANDOM_VALUE_LEN(params->type)); in create_digit_array_with_checksum() 164 MBEDTLS_LMOTS_N_HASH_LEN(params->type), in create_digit_array_with_checksum() 171 MBEDTLS_PUT_UINT16_BE(checksum, out, MBEDTLS_LMOTS_N_HASH_LEN(params->type)); in create_digit_array_with_checksum() 226 i_digit_idx < MBEDTLS_LMOTS_P_SIG_DIGIT_COUNT(params->type); in hash_digit_array() 230 &x_digit_array[i_digit_idx * MBEDTLS_LMOTS_N_HASH_LEN(params->type)], in hash_digit_array() 231 MBEDTLS_LMOTS_N_HASH_LEN(params->type)); in hash_digit_array() 273 MBEDTLS_LMOTS_N_HASH_LEN(params->type)); in hash_digit_array() 287 memcpy(&output[i_digit_idx * MBEDTLS_LMOTS_N_HASH_LEN(params->type)], in hash_digit_array() 288 tmp_hash, MBEDTLS_LMOTS_N_HASH_LEN(params->type)); in hash_digit_array() [all …]
|
| H 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,
|
| /optee_os/core/pta/ |
| H A D | apdu.c | 12 static TEE_Result get_apdu_type(uint32_t val, enum crypto_apdu_type *type) in get_apdu_type() argument 16 *type = CRYPTO_APDU_CASE_NO_HINT; in get_apdu_type() 19 *type = CRYPTO_APDU_CASE_1; in get_apdu_type() 22 *type = CRYPTO_APDU_CASE_2; in get_apdu_type() 25 *type = CRYPTO_APDU_CASE_2E; in get_apdu_type() 28 *type = CRYPTO_APDU_CASE_3; in get_apdu_type() 31 *type = CRYPTO_APDU_CASE_3E; in get_apdu_type() 34 *type = CRYPTO_APDU_CASE_4; in get_apdu_type() 37 *type = CRYPTO_APDU_CASE_4E; in get_apdu_type() 53 enum crypto_apdu_type type = CRYPTO_APDU_CASE_NO_HINT; in invoke_command() local [all …]
|
| H A D | stats.c | 21 static TEE_Result get_alloc_stats(uint32_t type, TEE_Param p[TEE_NUM_PARAMS]) in get_alloc_stats() argument 38 TEE_PARAM_TYPE_NONE) != type) { in get_alloc_stats() 113 static TEE_Result get_pager_stats(uint32_t type, TEE_Param p[TEE_NUM_PARAMS]) in get_pager_stats() argument 120 TEE_PARAM_TYPE_NONE) != type) { in get_pager_stats() 136 static TEE_Result get_memleak_stats(uint32_t type, in get_memleak_stats() argument 141 TEE_PARAM_TYPE_NONE, TEE_PARAM_TYPE_NONE) != type) in get_memleak_stats() 149 static TEE_Result get_user_ta_stats(uint32_t type, in get_user_ta_stats() argument 157 TEE_PARAM_TYPE_NONE) != type) in get_user_ta_stats() 171 static TEE_Result get_system_time(uint32_t type, in get_system_time() argument 181 TEE_PARAM_TYPE_NONE) != type) in get_system_time() [all …]
|
| /optee_os/lib/libmbedtls/mbedtls/include/psa/ |
| H 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 387 (((type) & PSA_KEY_TYPE_CATEGORY_MASK) == PSA_KEY_TYPE_CATEGORY_RAW || \ 388 ((type) & PSA_KEY_TYPE_CATEGORY_MASK) == PSA_KEY_TYPE_CATEGORY_SYMMETRIC) 391 #define PSA_KEY_TYPE_IS_ASYMMETRIC(type) \ argument 392 (((type) & PSA_KEY_TYPE_CATEGORY_MASK \ 396 #define PSA_KEY_TYPE_IS_PUBLIC_KEY(type) \ argument 397 (((type) & PSA_KEY_TYPE_CATEGORY_MASK) == PSA_KEY_TYPE_CATEGORY_PUBLIC_KEY) 400 #define PSA_KEY_TYPE_IS_KEY_PAIR(type) \ argument [all …]
|
| /optee_os/core/drivers/crypto/se050/adaptors/apis/ |
| H A D | apdu.c | 48 SE05x_TransientType_t type = kSE05x_TransientType_Transient; in set_rsa_public() local 53 type = kSE05x_TransientType_Persistent; in set_rsa_public() 76 (SE05x_INS_t)type, in set_rsa_public() 92 (SE05x_INS_t)type, in set_rsa_public() 107 SE05x_TransientType_t type = kSE05x_TransientType_Transient; in set_rsa_private_rsa() local 111 type = kSE05x_TransientType_Persistent; in set_rsa_private_rsa() 123 (SE05x_INS_t)type, in set_rsa_private_rsa() 139 (SE05x_INS_t)type, in set_rsa_private_rsa() 154 SE05x_TransientType_t type = kSE05x_TransientType_Transient; in set_rsa_private_rsa_crt() local 158 type = kSE05x_TransientType_Persistent; in set_rsa_private_rsa_crt() [all …]
|
| /optee_os/core/kernel/ |
| H A D | dt_driver.c | 33 enum dt_driver_type type; member 55 enum dt_driver_type type; member 102 static void assert_type_is_valid(enum dt_driver_type type) in assert_type_is_valid() argument 104 switch (type) { in assert_type_is_valid() 128 void *priv, enum dt_driver_type type) in dt_driver_register_provider() argument 134 assert_type_is_valid(type); in dt_driver_register_provider() 136 provider_cells = fdt_get_dt_driver_cells(fdt, nodeoffset, type); in dt_driver_register_provider() 155 prv->type = type; in dt_driver_register_provider() 166 static bool dt_driver_use_parent_controller(enum dt_driver_type type) in dt_driver_use_parent_controller() argument 168 switch (type) { in dt_driver_use_parent_controller() [all …]
|
| /optee_os/lib/libutee/ |
| H A D | tee_api_property.c | 77 enum user_ta_prop_type *type, in propget_get_ext_prop() argument 82 *type = ep->type; in propget_get_ext_prop() 83 switch (*type) { in propget_get_ext_prop() 143 enum user_ta_prop_type *type, in propget_get_property() argument 161 return propget_get_ext_prop(eps + n, type, in propget_get_property() 185 return propget_get_ext_prop(eps + idx, type, buf, len); in propget_get_property() 194 *type = prop_type; in propget_get_property() 204 enum user_ta_prop_type type = USER_TA_PROP_TYPE_INVALID; in TEE_GetPropertyAsString() local 224 res = propget_get_property(propsetOrEnumerator, name, &type, in TEE_GetPropertyAsString() 228 if (type == USER_TA_PROP_TYPE_BINARY_BLOCK) { in TEE_GetPropertyAsString() [all …]
|
| /optee_os/core/include/kernel/ |
| H A D | dt_driver.h | 71 enum dt_driver_type type; member 137 void *data, enum dt_driver_type type); 161 enum dt_driver_type type, 181 enum dt_driver_type type, 197 enum dt_driver_type type, 220 dt_driver_get_provider_by_node(int nodeoffset, enum dt_driver_type type); 226 dt_driver_get_provider_by_phandle(uint32_t phandle, enum dt_driver_type type); 252 enum dt_driver_type type); 264 enum dt_driver_type type);
|
| /optee_os/ta/pkcs11/src/ |
| H A D | attributes.h | 256 uint32_t type = 0; in get_key_type() local 257 uint32_t size = sizeof(type); in get_key_type() 259 if (get_attribute(head, PKCS11_CKA_KEY_TYPE, &type, &size)) in get_key_type() 262 return type; in get_key_type() 275 uint32_t type = 0; in get_certificate_type() local 277 if (get_u32_attribute(head, PKCS11_CKA_CERTIFICATE_TYPE, &type)) in get_certificate_type() 280 return type; in get_certificate_type() 292 uint32_t type = 0; in get_mechanism_type() local 293 uint32_t size = sizeof(type); in get_mechanism_type() 295 if (get_attribute(head, PKCS11_CKA_MECHANISM_TYPE, &type, &size)) in get_mechanism_type() [all …]
|
| /optee_os/core/lib/libtomcrypt/src/pk/asn1/der/sequence/ |
| H A D | der_encode_sequence_multi.c | 24 ltc_asn1_type type; in der_encode_sequence_multi() local 37 type = (ltc_asn1_type)va_arg(args, int); in der_encode_sequence_multi() 39 if (type == LTC_ASN1_EOL) { in der_encode_sequence_multi() 48 switch (type) { in der_encode_sequence_multi() 93 type = (ltc_asn1_type)va_arg(args, int); in der_encode_sequence_multi() 95 if (type == LTC_ASN1_EOL) { in der_encode_sequence_multi() 102 switch (type) { in der_encode_sequence_multi() 119 LTC_SET_ASN1(list, x++, type, data, size); in der_encode_sequence_multi()
|
| H A D | der_decode_sequence_multi.c | 26 ltc_asn1_type type; in s_der_decode_sequence_va() local 36 type = (ltc_asn1_type)va_arg(a1, int); in s_der_decode_sequence_va() 38 if (type == LTC_ASN1_EOL) { in s_der_decode_sequence_va() 47 switch (type) { in s_der_decode_sequence_va() 89 type = (ltc_asn1_type)va_arg(a2, int); in s_der_decode_sequence_va() 93 if (type == LTC_ASN1_EOL) { in s_der_decode_sequence_va() 97 switch (type) { in s_der_decode_sequence_va() 116 LTC_SET_ASN1(list, x++, type, data, size); in s_der_decode_sequence_va()
|
| H A D | der_decode_sequence_flexi.c | 73 if (l->type != LTC_ASN1_EOL) { in s_der_decode_sequence_flexi() 94 if (l->type == LTC_ASN1_CUSTOM_TYPE && l->klass == LTC_ASN1_CL_CONTEXT_SPECIFIC) { in s_der_decode_sequence_flexi() 102 if (l->type == LTC_ASN1_CUSTOM_TYPE) { in s_der_decode_sequence_flexi() 126 if (l->type != LTC_ASN1_BOOLEAN) { in s_der_decode_sequence_flexi() 145 if (l->type != LTC_ASN1_INTEGER) { in s_der_decode_sequence_flexi() 168 if (l->type != LTC_ASN1_BIT_STRING) { in s_der_decode_sequence_flexi() 191 if (l->type != LTC_ASN1_OCTET_STRING) { in s_der_decode_sequence_flexi() 214 if (l->type != LTC_ASN1_NULL) { in s_der_decode_sequence_flexi() 233 if (l->type != LTC_ASN1_OBJECT_IDENTIFIER) { in s_der_decode_sequence_flexi() 265 if (l->type != LTC_ASN1_UTF8_STRING) { in s_der_decode_sequence_flexi() [all …]
|
| /optee_os/core/lib/libtomcrypt/src/pk/ecc/ |
| H A D | ecc_get_key.c | 16 int ecc_get_key(unsigned char *out, unsigned long *outlen, int type, const ecc_key *key) in ecc_get_key() argument 26 compressed = type & PK_COMPRESSED ? 1 : 0; in ecc_get_key() 27 type &= ~PK_COMPRESSED; in ecc_get_key() 29 if (type == PK_PUBLIC) { in ecc_get_key() 34 else if (type == PK_PRIVATE) { in ecc_get_key() 35 …if (key->type != PK_PRIVATE) return CRYPT_PK_TYPE_M… in ecc_get_key()
|
| /optee_os/core/lib/libtomcrypt/src/pk/rsa/ |
| H A D | rsa_export.c | 20 int rsa_export(unsigned char *out, unsigned long *outlen, int type, const rsa_key *key) in rsa_export() argument 28 std = type & PK_STD; in rsa_export() 29 type &= ~PK_STD; in rsa_export() 31 if (type == PK_PRIVATE && key->type != PK_PRIVATE) { in rsa_export() 35 if (type == PK_PRIVATE) { in rsa_export() 53 if (type == PK_PUBLIC) { in rsa_export()
|
| /optee_os/lib/libutils/isoc/include/sys/ |
| H A D | queue.h | 89 #define LIST_HEAD(name, type) \ argument 91 struct type *lh_first; /* first element */ \ 97 #define LIST_ENTRY(type) \ argument 99 struct type *le_next; /* next element */ \ 100 struct type **le_prev; /* address of previous next element */ \ 185 #define SLIST_HEAD(name, type) \ argument 187 struct type *slh_first; /* first element */ \ 193 #define SLIST_ENTRY(type) \ argument 195 struct type *sle_next; /* next element */ \ 219 #define SLIST_REMOVE(head, elm, type, field) do { \ argument [all …]
|
| /optee_os/core/lib/libtomcrypt/src/misc/ssh/ |
| H A D | ssh_decode_sequence_multi.c | 24 ssh_data_type type; in ssh_decode_sequence_multi() local 40 while ((type = (ssh_data_type)va_arg(args, int)) != LTC_SSHDATA_EOL) { in ssh_decode_sequence_multi() 42 if (type == LTC_SSHDATA_STRING || in ssh_decode_sequence_multi() 43 type == LTC_SSHDATA_NAMELIST || in ssh_decode_sequence_multi() 44 type == LTC_SSHDATA_MPINT) in ssh_decode_sequence_multi() 55 switch (type) { in ssh_decode_sequence_multi() 96 switch (type) { in ssh_decode_sequence_multi()
|
| /optee_os/core/lib/libtomcrypt/src/pk/dsa/ |
| H A D | dsa_export.c | 20 int dsa_export(unsigned char *out, unsigned long *outlen, int type, const dsa_key *key) in dsa_export() argument 30 std = type & PK_STD; in dsa_export() 31 type &= ~PK_STD; in dsa_export() 33 if (type == PK_PRIVATE && key->type != PK_PRIVATE) { in dsa_export() 37 if (type == PK_PRIVATE) { in dsa_export() 59 if (type == PK_PUBLIC) { in dsa_export()
|
| /optee_os/core/lib/libtomcrypt/src/misc/padding/ |
| H A D | padding_depad.c | 21 enum padding_type type; in padding_depad() local 28 type = mode & LTC_PAD_MASK; in padding_depad() 30 if (type < LTC_PAD_ONE_AND_ZERO) { in padding_depad() 42 switch (type) { in padding_depad() 76 if (type == LTC_PAD_ZERO_ALWAYS) { in padding_depad()
|
| /optee_os/core/lib/libtomcrypt/src/pk/asn1/x509/ |
| H A D | x509_decode_public_key_from_certificate.c | 14 && ((l)->type == LTC_ASN1_SEQUENCE) \ 16 && ((l)->child->type == LTC_ASN1_OBJECT_IDENTIFIER) \ 18 && ((l)->next->type == LTC_ASN1_BIT_STRING) 64 if ((l->type == LTC_ASN1_SEQUENCE) && (l->child != NULL)) { in x509_decode_public_key_from_certificate() 66 if ((l->type == LTC_ASN1_SEQUENCE) && (l->child != NULL)) { in x509_decode_public_key_from_certificate() 81 if ((l->type == LTC_ASN1_SEQUENCE) in x509_decode_public_key_from_certificate()
|
| /optee_os/lib/libutee/include/ |
| H A D | arm64_user_sysreg.h | 15 #define DEFINE_REG_READ_FUNC_(reg, type, asmreg) \ argument 16 static inline __noprof type read_##reg(void) \ 24 #define DEFINE_REG_WRITE_FUNC_(reg, type, asmreg) \ argument 25 static inline __noprof void write_##reg(type val) \
|
| /optee_os/core/include/mm/ |
| H A D | core_mmu.h | 124 static inline const char *teecore_memtype_name(enum teecore_memtypes type) in teecore_memtype_name() argument 160 return names[type]; in teecore_memtype_name() 171 enum teecore_memtypes type; member 194 { .name = (_name), .type = (_type), .addr = (_addr), \ 200 { .name = (_name), .type = (_type), .lo_addr = (_addr), \ 207 #define register_phys_mem(type, addr, size) \ argument 208 __register_memory(#addr, (type), (addr), (size), \ 211 #define register_phys_mem_ul(type, addr, size) \ argument 212 __register_memory_ul(#addr, (type), (addr), (size), \ 216 #define register_phys_mem_pgdir(type, addr, size) \ argument [all …]
|