Lines Matching refs:attr

676 	TEE_Result (*from_user)(void *attr, const void *buffer, size_t size);
677 TEE_Result (*to_user)(void *attr, struct ts_session *sess,
679 TEE_Result (*to_binary)(void *attr, void *data, size_t data_len,
681 bool (*from_binary)(void *attr, const void *data, size_t data_len,
683 TEE_Result (*from_obj)(void *attr, void *src_attr);
684 void (*free)(void *attr);
685 void (*clear)(void *attr);
720 static TEE_Result op_attr_secret_value_from_user(void *attr, const void *buffer, in op_attr_secret_value_from_user() argument
724 struct tee_cryp_obj_secret *key = attr; in op_attr_secret_value_from_user()
736 static TEE_Result op_attr_secret_value_to_user(void *attr, in op_attr_secret_value_to_user() argument
741 struct tee_cryp_obj_secret *key = attr; in op_attr_secret_value_to_user()
760 static TEE_Result op_attr_secret_value_to_binary(void *attr, void *data, in op_attr_secret_value_to_binary() argument
764 struct tee_cryp_obj_secret *key = attr; in op_attr_secret_value_to_binary()
781 static bool op_attr_secret_value_from_binary(void *attr, const void *data, in op_attr_secret_value_from_binary() argument
784 struct tee_cryp_obj_secret *key = attr; in op_attr_secret_value_from_binary()
803 static TEE_Result op_attr_secret_value_from_obj(void *attr, void *src_attr) in op_attr_secret_value_from_obj() argument
805 struct tee_cryp_obj_secret *key = attr; in op_attr_secret_value_from_obj()
815 static void op_attr_secret_value_clear(void *attr) in op_attr_secret_value_clear() argument
817 struct tee_cryp_obj_secret *key = attr; in op_attr_secret_value_clear()
823 static TEE_Result op_attr_bignum_from_user(void *attr, const void *buffer, in op_attr_bignum_from_user() argument
827 struct bignum **bn = attr; in op_attr_bignum_from_user()
841 static TEE_Result op_attr_bignum_to_user(void *attr, in op_attr_bignum_to_user() argument
846 struct bignum **bn = attr; in op_attr_bignum_to_user()
879 static TEE_Result op_attr_bignum_to_binary(void *attr, void *data, in op_attr_bignum_to_binary() argument
883 struct bignum **bn = attr; in op_attr_bignum_to_binary()
901 static bool op_attr_bignum_from_binary(void *attr, const void *data, in op_attr_bignum_from_binary() argument
904 struct bignum **bn = attr; in op_attr_bignum_from_binary()
918 static TEE_Result op_attr_bignum_from_obj(void *attr, void *src_attr) in op_attr_bignum_from_obj() argument
920 struct bignum **bn = attr; in op_attr_bignum_from_obj()
927 static void op_attr_bignum_clear(void *attr) in op_attr_bignum_clear() argument
929 struct bignum **bn = attr; in op_attr_bignum_clear()
934 static void op_attr_bignum_free(void *attr) in op_attr_bignum_free() argument
936 struct bignum **bn = attr; in op_attr_bignum_free()
941 static TEE_Result op_attr_value_from_user(void *attr, const void *buffer, in op_attr_value_from_user() argument
944 uint32_t *v = attr; in op_attr_value_from_user()
954 static TEE_Result op_attr_value_to_user(void *attr, in op_attr_value_to_user() argument
959 uint32_t *v = attr; in op_attr_value_to_user()
974 static TEE_Result op_attr_value_to_binary(void *attr, void *data, in op_attr_value_to_binary() argument
977 uint32_t *v = attr; in op_attr_value_to_binary()
982 static bool op_attr_value_from_binary(void *attr, const void *data, in op_attr_value_from_binary() argument
985 uint32_t *v = attr; in op_attr_value_from_binary()
990 static TEE_Result op_attr_value_from_obj(void *attr, void *src_attr) in op_attr_value_from_obj() argument
992 uint32_t *v = attr; in op_attr_value_from_obj()
999 static void op_attr_value_clear(void *attr) in op_attr_value_clear() argument
1001 uint32_t *v = attr; in op_attr_value_clear()
1006 static TEE_Result op_attr_25519_from_user(void *attr, const void *buffer, in op_attr_25519_from_user() argument
1009 uint8_t **key = attr; in op_attr_25519_from_user()
1017 static TEE_Result op_attr_25519_to_user(void *attr, in op_attr_25519_to_user() argument
1022 uint8_t **key = attr; in op_attr_25519_to_user()
1040 static TEE_Result op_attr_25519_to_binary(void *attr, void *data, in op_attr_25519_to_binary() argument
1044 uint8_t **key = attr; in op_attr_25519_to_binary()
1062 static bool op_attr_25519_from_binary(void *attr, const void *data, in op_attr_25519_from_binary() argument
1065 uint8_t **key = attr; in op_attr_25519_from_binary()
1082 static TEE_Result op_attr_25519_from_obj(void *attr, void *src_attr) in op_attr_25519_from_obj() argument
1084 uint8_t **key = attr; in op_attr_25519_from_obj()
1095 static void op_attr_25519_clear(void *attr) in op_attr_25519_clear() argument
1097 uint8_t **key = attr; in op_attr_25519_clear()
1104 static void op_attr_25519_free(void *attr) in op_attr_25519_free() argument
1106 uint8_t **key = attr; in op_attr_25519_free()
1108 op_attr_25519_clear(attr); in op_attr_25519_free()
1261 uint32_t attr) in set_attribute() argument
1263 int idx = tee_svc_cryp_obj_find_type_attr_idx(attr, props); in set_attribute()
1273 uint32_t attr) in get_attribute() argument
1275 int idx = tee_svc_cryp_obj_find_type_attr_idx(attr, props); in get_attribute()
1291 void *attr = NULL; in syscall_cryp_obj_get_attr() local
1326 attr = (uint8_t *)o->attr + type_props->type_attrs[idx].raw_offs; in syscall_cryp_obj_get_attr()
1327 return ops->to_user(attr, sess, buffer, size); in syscall_cryp_obj_get_attr()
1335 if (!o->attr) in tee_obj_attr_free()
1344 attr_ops[ta->ops_index].free((uint8_t *)o->attr + ta->raw_offs); in tee_obj_attr_free()
1353 if (!o->attr) in tee_obj_attr_clear()
1362 attr_ops[ta->ops_index].clear((uint8_t *)o->attr + in tee_obj_attr_clear()
1380 if (!o->attr) in tee_obj_attr_to_binary()
1388 void *attr = (uint8_t *)o->attr + ta->raw_offs; in tee_obj_attr_to_binary() local
1390 res = attr_ops[ta->ops_index].to_binary(attr, data, len, &offs); in tee_obj_attr_to_binary()
1410 if (!o->attr) in tee_obj_attr_from_binary()
1418 void *attr = (uint8_t *)o->attr + ta->raw_offs; in tee_obj_attr_from_binary() local
1420 if (!attr_ops[ta->ops_index].from_binary(attr, data, data_len, in tee_obj_attr_from_binary()
1434 void *attr; in tee_obj_attr_copy_from() local
1439 if (!o->attr) in tee_obj_attr_copy_from()
1449 attr = (uint8_t *)o->attr + ta->raw_offs; in tee_obj_attr_copy_from()
1450 src_attr = (uint8_t *)src->attr + ta->raw_offs; in tee_obj_attr_copy_from()
1451 res = attr_ops[ta->ops_index].from_obj(attr, src_attr); in tee_obj_attr_copy_from()
1506 attr = (uint8_t *)o->attr + ta->raw_offs; in tee_obj_attr_copy_from()
1507 src_attr = (uint8_t *)src->attr + in tee_obj_attr_copy_from()
1509 res = attr_ops[ta->ops_index].from_obj(attr, src_attr); in tee_obj_attr_copy_from()
1556 if (o->attr) in tee_obj_set_type()
1578 o->attr = calloc(1, type_props->alloc_size); in tee_obj_set_type()
1579 if (!o->attr) in tee_obj_set_type()
1586 res = crypto_acipher_alloc_rsa_public_key(o->attr, in tee_obj_set_type()
1590 res = crypto_acipher_alloc_rsa_keypair(o->attr, max_key_size); in tee_obj_set_type()
1593 res = crypto_acipher_alloc_dsa_public_key(o->attr, in tee_obj_set_type()
1597 res = crypto_acipher_alloc_dsa_keypair(o->attr, max_key_size); in tee_obj_set_type()
1600 res = crypto_acipher_alloc_dh_keypair(o->attr, max_key_size); in tee_obj_set_type()
1607 res = crypto_acipher_alloc_ecc_public_key(o->attr, obj_type, in tee_obj_set_type()
1615 res = crypto_acipher_alloc_ecc_keypair(o->attr, obj_type, in tee_obj_set_type()
1619 res = crypto_acipher_alloc_x25519_keypair(o->attr, in tee_obj_set_type()
1623 res = crypto_acipher_alloc_x448_keypair(o->attr, in tee_obj_set_type()
1627 res = crypto_acipher_alloc_ed25519_keypair(o->attr, in tee_obj_set_type()
1631 res = crypto_acipher_alloc_ed25519_public_key(o->attr, in tee_obj_set_type()
1636 struct tee_cryp_obj_secret *key = o->attr; in tee_obj_set_type()
1905 void *attr = NULL; in tee_svc_cryp_obj_populate_type() local
1917 attr = (uint8_t *)o->attr + in tee_svc_cryp_obj_populate_type()
1920 res = ops->from_user(attr, &attrs[n].content.value, in tee_svc_cryp_obj_populate_type()
1923 res = ops->from_user(attr, attrs[n].content.ref.buffer, in tee_svc_cryp_obj_populate_type()
1970 if (crypto_bignum_num_bits(*(struct bignum **)attr) > in tee_svc_cryp_obj_populate_type()
2129 struct rsa_keypair *key = o->attr; in tee_svc_obj_generate_key_rsa()
2169 res = crypto_acipher_gen_dsa_key(o->attr, key_size); in tee_svc_obj_generate_key_dsa()
2194 tee_dh_key = (struct dh_keypair *)o->attr; in tee_svc_obj_generate_key_dh()
2224 tee_ecc_key = (struct ecc_keypair *)o->attr; in tee_svc_obj_generate_key_ecc()
2255 tee_x25519_key = (struct montgomery_keypair *)o->attr; in tee_svc_obj_generate_key_x25519()
2282 tee_x448_key = (struct montgomery_keypair *)o->attr; in tee_svc_obj_generate_key_x448()
2310 key = o->attr; in tee_svc_obj_generate_key_ed25519()
2496 key = (struct tee_cryp_obj_secret *)o->attr; in syscall_obj_generate_key()
2999 key = (struct tee_cryp_obj_secret *)o->attr; in syscall_hash_init()
3219 key1 = o->attr; in syscall_cipher_init()
3226 struct tee_cryp_obj_secret *key2 = o->attr; in syscall_cipher_init()
3723 sk = so->attr; in syscall_cryp_derive_key()
3760 res = crypto_acipher_dh_shared_secret(ko->attr, in syscall_cryp_derive_key()
3776 uint32_t curve = ((struct ecc_keypair *)ko->attr)->curve; in syscall_cryp_derive_key()
3837 res = crypto_acipher_ecc_shared_secret(ko->attr, &key_public, in syscall_cryp_derive_key()
3855 struct tee_cryp_obj_secret *ik = ko->attr; in syscall_cryp_derive_key()
3885 struct tee_cryp_obj_secret *ss = ko->attr; in syscall_cryp_derive_key()
3914 struct tee_cryp_obj_secret *ss = ko->attr; in syscall_cryp_derive_key()
3960 res = crypto_acipher_sm2_kep_derive(ko->attr, /* key1 */ in syscall_cryp_derive_key()
3961 ko2->attr, /* key2 */ in syscall_cryp_derive_key()
4004 res = crypto_acipher_x25519_shared_secret(ko->attr, in syscall_cryp_derive_key()
4046 res = crypto_acipher_x448_shared_secret(ko->attr, in syscall_cryp_derive_key()
4104 key = o->attr; in syscall_authenc_init()
4480 res = crypto_acipher_rsanopad_encrypt(o->attr, src_data, in syscall_asymm_operate()
4486 res = crypto_acipher_rsanopad_decrypt(o->attr, src_data, in syscall_asymm_operate()
4502 res = crypto_acipher_sm2_pke_encrypt(o->attr, src_data, in syscall_asymm_operate()
4508 res = crypto_acipher_sm2_pke_decrypt(o->attr, src_data, in syscall_asymm_operate()
4554 res = crypto_acipher_rsaes_encrypt(cs->algo, o->attr, in syscall_asymm_operate()
4563 cs->algo, o->attr, label, label_len, in syscall_asymm_operate()
4593 res = crypto_acipher_rsassa_sign(cs->algo, o->attr, salt_len, in syscall_asymm_operate()
4603 res = crypto_acipher_dsa_sign(cs->algo, o->attr, src_data, in syscall_asymm_operate()
4610 res = tee_svc_obj_ed25519_sign(o->attr, src_data, src_len, in syscall_asymm_operate()
4623 res = crypto_acipher_ecc_sign(cs->algo, o->attr, src_data, in syscall_asymm_operate()
4718 res = crypto_acipher_rsassa_verify(cs->algo, o->attr, salt_len, in syscall_asymm_verify()
4731 struct dsa_public_key *key = o->attr; in syscall_asymm_verify()
4763 res = crypto_acipher_dsa_verify(cs->algo, o->attr, data, in syscall_asymm_verify()
4770 res = tee_svc_obj_ed25519_verify(o->attr, data, in syscall_asymm_verify()
4779 res = crypto_acipher_ecc_verify(cs->algo, o->attr, data, in syscall_asymm_verify()