Lines Matching full:struct

86 TEE_Result crypto_storage_obj_del(struct tee_obj *obj);
94 struct bignum *crypto_bignum_allocate(size_t size_bits);
96 struct bignum *to);
97 size_t crypto_bignum_num_bytes(struct bignum *a);
98 size_t crypto_bignum_num_bits(struct bignum *a);
99 void crypto_bignum_bn2bin(const struct bignum *from, uint8_t *to);
100 void crypto_bignum_copy(struct bignum *to, const struct bignum *from);
101 void crypto_bignum_free(struct bignum **a);
102 void crypto_bignum_clear(struct bignum *a);
105 int32_t crypto_bignum_compare(struct bignum *a, struct bignum *b);
109 struct rsa_keypair {
110 struct bignum *e; /* Public exponent */
111 struct bignum *d; /* Private exponent */
112 struct bignum *n; /* Modulus */
115 struct bignum *p; /* N = pq */
116 struct bignum *q;
117 struct bignum *qp; /* 1/q mod p */
118 struct bignum *dp; /* d mod (p-1) */
119 struct bignum *dq; /* d mod (q-1) */
122 struct rsa_public_key {
123 struct bignum *e; /* Public exponent */
124 struct bignum *n; /* Modulus */
127 struct dsa_keypair {
128 struct bignum *g; /* Generator of subgroup (public) */
129 struct bignum *p; /* Prime number (public) */
130 struct bignum *q; /* Order of subgroup (public) */
131 struct bignum *y; /* Public key */
132 struct bignum *x; /* Private key */
135 struct dsa_public_key {
136 struct bignum *g; /* Generator of subgroup (public) */
137 struct bignum *p; /* Prime number (public) */
138 struct bignum *q; /* Order of subgroup (public) */
139 struct bignum *y; /* Public key */
142 struct dh_keypair {
143 struct bignum *g; /* Generator of Z_p (shared) */
144 struct bignum *p; /* Prime modulus (shared) */
145 struct bignum *x; /* Private key */
146 struct bignum *y; /* Public key y = g^x */
152 struct bignum *q; /* x must be in the range [2, q-2] */
156 struct ecc_public_key {
157 struct bignum *x; /* Public value x */
158 struct bignum *y; /* Public value y */
160 const struct crypto_ecc_public_ops *ops; /* Key Operations */
163 struct ecc_keypair {
164 struct bignum *d; /* Private value */
165 struct bignum *x; /* Public value x */
166 struct bignum *y; /* Public value y */
168 const struct crypto_ecc_keypair_ops *ops; /* Key Operations */
171 struct montgomery_keypair {
176 struct ed25519_keypair {
182 struct ed25519_public_key {
192 TEE_Result crypto_acipher_alloc_rsa_keypair(struct rsa_keypair *s,
194 TEE_Result crypto_acipher_alloc_rsa_public_key(struct rsa_public_key *s,
196 void crypto_acipher_free_rsa_public_key(struct rsa_public_key *s);
197 void crypto_acipher_free_rsa_keypair(struct rsa_keypair *s);
198 TEE_Result crypto_acipher_alloc_dsa_keypair(struct dsa_keypair *s,
200 TEE_Result crypto_acipher_alloc_dsa_public_key(struct dsa_public_key *s,
202 TEE_Result crypto_acipher_alloc_dh_keypair(struct dh_keypair *s,
204 TEE_Result crypto_acipher_alloc_ecc_public_key(struct ecc_public_key *s,
207 TEE_Result crypto_acipher_alloc_ecc_keypair(struct ecc_keypair *s,
210 void crypto_acipher_free_ecc_public_key(struct ecc_public_key *s);
211 TEE_Result crypto_acipher_alloc_x25519_keypair(struct montgomery_keypair *s,
213 TEE_Result crypto_acipher_alloc_x448_keypair(struct montgomery_keypair *s,
215 TEE_Result crypto_acipher_alloc_ed25519_keypair(struct ed25519_keypair *s,
218 crypto_acipher_alloc_ed25519_public_key(struct ed25519_public_key *key,
224 TEE_Result crypto_acipher_gen_rsa_key(struct rsa_keypair *key, size_t key_size);
225 TEE_Result crypto_acipher_gen_dsa_key(struct dsa_keypair *key, size_t key_size);
226 TEE_Result crypto_acipher_gen_dh_key(struct dh_keypair *key, struct bignum *q,
228 TEE_Result crypto_acipher_gen_ecc_key(struct ecc_keypair *key, size_t key_size);
229 TEE_Result crypto_acipher_gen_x25519_key(struct montgomery_keypair *key,
231 TEE_Result crypto_acipher_gen_x448_key(struct montgomery_keypair *key,
233 TEE_Result crypto_acipher_gen_ed25519_key(struct ed25519_keypair *key,
235 TEE_Result crypto_acipher_ed25519_sign(struct ed25519_keypair *key,
238 TEE_Result crypto_acipher_ed25519ctx_sign(struct ed25519_keypair *key,
243 TEE_Result crypto_acipher_ed25519_verify(struct ed25519_public_key *key,
246 TEE_Result crypto_acipher_ed25519ctx_verify(struct ed25519_public_key *key,
252 TEE_Result crypto_acipher_dh_shared_secret(struct dh_keypair *private_key,
253 struct bignum *public_key,
254 struct bignum *secret);
256 TEE_Result crypto_acipher_rsanopad_decrypt(struct rsa_keypair *key,
259 TEE_Result crypto_acipher_rsanopad_encrypt(struct rsa_public_key *key,
262 TEE_Result crypto_acipher_rsaes_decrypt(uint32_t algo, struct rsa_keypair *key,
268 struct rsa_public_key *key,
274 TEE_Result crypto_acipher_rsassa_sign(uint32_t algo, struct rsa_keypair *key,
279 struct rsa_public_key *key,
283 TEE_Result crypto_acipher_dsa_sign(uint32_t algo, struct dsa_keypair *key,
286 TEE_Result crypto_acipher_dsa_verify(uint32_t algo, struct dsa_public_key *key,
289 TEE_Result crypto_acipher_ecc_sign(uint32_t algo, struct ecc_keypair *key,
292 TEE_Result crypto_acipher_ecc_verify(uint32_t algo, struct ecc_public_key *key,
295 TEE_Result crypto_acipher_ecc_shared_secret(struct ecc_keypair *private_key,
296 struct ecc_public_key *public_key,
299 TEE_Result crypto_acipher_sm2_pke_decrypt(struct ecc_keypair *key,
302 TEE_Result crypto_acipher_sm2_pke_encrypt(struct ecc_public_key *key,
305 TEE_Result crypto_acipher_x25519_shared_secret(struct montgomery_keypair
309 TEE_Result crypto_acipher_x448_shared_secret(struct montgomery_keypair
314 struct sm2_kep_parms {
328 TEE_Result crypto_acipher_sm2_kep_derive(struct ecc_keypair *my_key,
329 struct ecc_keypair *my_eph_key,
330 struct ecc_public_key *peer_key,
331 struct ecc_public_key *peer_eph_key,
332 struct sm2_kep_parms *p);