Lines Matching full:struct

15  * struct crypto_hash_ctx.
17 struct crypto_hash_ctx {
18 const struct crypto_hash_ops *ops;
21 struct crypto_hash_ops {
22 TEE_Result (*init)(struct crypto_hash_ctx *ctx);
23 TEE_Result (*update)(struct crypto_hash_ctx *ctx, const uint8_t *data,
25 TEE_Result (*final)(struct crypto_hash_ctx *ctx, uint8_t *digest,
27 void (*free_ctx)(struct crypto_hash_ctx *ctx);
28 void (*copy_state)(struct crypto_hash_ctx *dst_ctx,
29 struct crypto_hash_ctx *src_ctx);
34 crypto_##name##_alloc_ctx(struct crypto_##type##_ctx **ctx __unused) \
38 TEE_Result crypto_md5_alloc_ctx(struct crypto_hash_ctx **ctx);
44 TEE_Result crypto_sha1_alloc_ctx(struct crypto_hash_ctx **ctx);
50 TEE_Result crypto_sha224_alloc_ctx(struct crypto_hash_ctx **ctx);
56 TEE_Result crypto_sha256_alloc_ctx(struct crypto_hash_ctx **ctx);
62 TEE_Result crypto_sha384_alloc_ctx(struct crypto_hash_ctx **ctx);
68 TEE_Result crypto_sha512_alloc_ctx(struct crypto_hash_ctx **ctx);
74 TEE_Result crypto_sm3_alloc_ctx(struct crypto_hash_ctx **ctx);
80 TEE_Result crypto_sha3_224_alloc_ctx(struct crypto_hash_ctx **ctx);
86 TEE_Result crypto_sha3_256_alloc_ctx(struct crypto_hash_ctx **ctx);
92 TEE_Result crypto_sha3_384_alloc_ctx(struct crypto_hash_ctx **ctx);
98 TEE_Result crypto_sha3_512_alloc_ctx(struct crypto_hash_ctx **ctx);
104 TEE_Result crypto_shake128_alloc_ctx(struct crypto_hash_ctx **ctx);
110 TEE_Result crypto_shake256_alloc_ctx(struct crypto_hash_ctx **ctx);
117 * struct crypto_mac_ctx.
119 struct crypto_mac_ctx {
120 const struct crypto_mac_ops *ops;
123 struct crypto_mac_ops {
124 TEE_Result (*init)(struct crypto_mac_ctx *ctx, const uint8_t *key,
126 TEE_Result (*update)(struct crypto_mac_ctx *ctx, const uint8_t *data,
128 TEE_Result (*final)(struct crypto_mac_ctx *ctx, uint8_t *digest,
130 void (*free_ctx)(struct crypto_mac_ctx *ctx);
131 void (*copy_state)(struct crypto_mac_ctx *dst_ctx,
132 struct crypto_mac_ctx *src_ctx);
136 TEE_Result crypto_hmac_md5_alloc_ctx(struct crypto_mac_ctx **ctx);
142 TEE_Result crypto_hmac_sha1_alloc_ctx(struct crypto_mac_ctx **ctx);
148 TEE_Result crypto_hmac_sha224_alloc_ctx(struct crypto_mac_ctx **ctx);
154 TEE_Result crypto_hmac_sha256_alloc_ctx(struct crypto_mac_ctx **ctx);
160 TEE_Result crypto_hmac_sha384_alloc_ctx(struct crypto_mac_ctx **ctx);
166 TEE_Result crypto_hmac_sha512_alloc_ctx(struct crypto_mac_ctx **ctx);
172 TEE_Result crypto_hmac_sha3_224_alloc_ctx(struct crypto_mac_ctx **ctx);
178 TEE_Result crypto_hmac_sha3_256_alloc_ctx(struct crypto_mac_ctx **ctx);
184 TEE_Result crypto_hmac_sha3_384_alloc_ctx(struct crypto_mac_ctx **ctx);
190 TEE_Result crypto_hmac_sha3_512_alloc_ctx(struct crypto_mac_ctx **ctx);
196 TEE_Result crypto_hmac_sm3_alloc_ctx(struct crypto_mac_ctx **ctx);
202 TEE_Result crypto_aes_cbc_mac_nopad_alloc_ctx(struct crypto_mac_ctx **ctx);
203 TEE_Result crypto_aes_cbc_mac_pkcs5_alloc_ctx(struct crypto_mac_ctx **ctx);
204 TEE_Result crypto_des_cbc_mac_nopad_alloc_ctx(struct crypto_mac_ctx **ctx);
205 TEE_Result crypto_des_cbc_mac_pkcs5_alloc_ctx(struct crypto_mac_ctx **ctx);
206 TEE_Result crypto_des3_cbc_mac_nopad_alloc_ctx(struct crypto_mac_ctx **ctx);
207 TEE_Result crypto_des3_cbc_mac_pkcs5_alloc_ctx(struct crypto_mac_ctx **ctx);
218 TEE_Result crypto_aes_cmac_alloc_ctx(struct crypto_mac_ctx **ctx);
219 TEE_Result crypto_des3_cmac_alloc_ctx(struct crypto_mac_ctx **ctx);
227 * struct crypto_cipher_ctx.
229 struct crypto_cipher_ctx {
230 const struct crypto_cipher_ops *ops;
233 struct crypto_cipher_ops {
234 TEE_Result (*init)(struct crypto_cipher_ctx *ctx,
239 TEE_Result (*update)(struct crypto_cipher_ctx *ctx, bool last_block,
241 void (*final)(struct crypto_cipher_ctx *ctx);
243 void (*free_ctx)(struct crypto_cipher_ctx *ctx);
244 void (*copy_state)(struct crypto_cipher_ctx *dst_ctx,
245 struct crypto_cipher_ctx *src_ctx);
249 TEE_Result crypto_aes_ecb_alloc_ctx(struct crypto_cipher_ctx **ctx);
255 TEE_Result crypto_aes_cbc_alloc_ctx(struct crypto_cipher_ctx **ctx);
261 TEE_Result crypto_aes_ctr_alloc_ctx(struct crypto_cipher_ctx **ctx);
267 TEE_Result crypto_aes_cts_alloc_ctx(struct crypto_cipher_ctx **ctx);
273 TEE_Result crypto_aes_xts_alloc_ctx(struct crypto_cipher_ctx **ctx);
279 TEE_Result crypto_des_ecb_alloc_ctx(struct crypto_cipher_ctx **ctx);
280 TEE_Result crypto_des3_ecb_alloc_ctx(struct crypto_cipher_ctx **ctx);
287 TEE_Result crypto_des_cbc_alloc_ctx(struct crypto_cipher_ctx **ctx);
288 TEE_Result crypto_des3_cbc_alloc_ctx(struct crypto_cipher_ctx **ctx);
295 TEE_Result crypto_sm4_ecb_alloc_ctx(struct crypto_cipher_ctx **ctx);
301 TEE_Result crypto_sm4_cbc_alloc_ctx(struct crypto_cipher_ctx **ctx);
307 TEE_Result crypto_sm4_ctr_alloc_ctx(struct crypto_cipher_ctx **ctx);
313 TEE_Result crypto_sm4_xts_alloc_ctx(struct crypto_cipher_ctx **ctx);
320 * defined by struct crypto_authenc_ctx.
322 struct crypto_authenc_ctx {
323 const struct crypto_authenc_ops *ops;
326 struct crypto_authenc_ops {
327 TEE_Result (*init)(struct crypto_authenc_ctx *ctx,
333 TEE_Result (*update_aad)(struct crypto_authenc_ctx *ctx,
335 TEE_Result (*update_payload)(struct crypto_authenc_ctx *ctx,
339 TEE_Result (*enc_final)(struct crypto_authenc_ctx *ctx,
343 TEE_Result (*dec_final)(struct crypto_authenc_ctx *ctx,
347 void (*final)(struct crypto_authenc_ctx *ctx);
348 void (*free_ctx)(struct crypto_authenc_ctx *ctx);
349 void (*copy_state)(struct crypto_authenc_ctx *dst_ctx,
350 struct crypto_authenc_ctx *src_ctx);
353 TEE_Result crypto_aes_ccm_alloc_ctx(struct crypto_authenc_ctx **ctx);
354 TEE_Result crypto_aes_gcm_alloc_ctx(struct crypto_authenc_ctx **ctx);
357 TEE_Result drvcrypt_hash_alloc_ctx(struct crypto_hash_ctx **ctx, uint32_t algo);
360 drvcrypt_hash_alloc_ctx(struct crypto_hash_ctx **ctx __unused, in drvcrypt_hash_alloc_ctx()
368 TEE_Result drvcrypt_cipher_alloc_ctx(struct crypto_cipher_ctx **ctx,
372 drvcrypt_cipher_alloc_ctx(struct crypto_cipher_ctx **ctx __unused, in drvcrypt_cipher_alloc_ctx()
381 TEE_Result drvcrypt_mac_alloc_ctx(struct crypto_mac_ctx **ctx, uint32_t algo);
384 drvcrypt_mac_alloc_ctx(struct crypto_mac_ctx **ctx __unused, in drvcrypt_mac_alloc_ctx()
393 TEE_Result drvcrypt_authenc_alloc_ctx(struct crypto_authenc_ctx **ctx,
397 drvcrypt_authenc_alloc_ctx(struct crypto_authenc_ctx **ctx __unused, in drvcrypt_authenc_alloc_ctx()
412 struct crypto_ecc_public_ops {
413 void (*free)(struct ecc_public_key *key);
414 TEE_Result (*verify)(uint32_t algo, struct ecc_public_key *key,
417 TEE_Result (*encrypt)(struct ecc_public_key *key, const uint8_t *src,
431 struct crypto_ecc_keypair_ops {
432 TEE_Result (*generate)(struct ecc_keypair *key, size_t key_size_bits);
433 TEE_Result (*sign)(uint32_t algo, struct ecc_keypair *key,
436 TEE_Result (*shared_secret)(struct ecc_keypair *private_key,
437 struct ecc_public_key *public_key,
439 TEE_Result (*decrypt)(struct ecc_keypair *key, const uint8_t *src,
444 const struct crypto_ecc_keypair_ops *
447 const struct crypto_ecc_public_ops *
450 TEE_Result crypto_asym_alloc_ecc_public_key(struct ecc_public_key *key,
453 TEE_Result crypto_asym_alloc_ecc_keypair(struct ecc_keypair *key,
458 crypto_asym_alloc_ecc_public_key(struct ecc_public_key *key __unused, in crypto_asym_alloc_ecc_public_key()
465 static inline const struct crypto_ecc_keypair_ops *
471 static inline const struct crypto_ecc_public_ops *
478 crypto_asym_alloc_ecc_keypair(struct ecc_keypair *key __unused, in crypto_asym_alloc_ecc_keypair()
487 TEE_Result drvcrypt_asym_alloc_ecc_public_key(struct ecc_public_key *key,
490 TEE_Result drvcrypt_asym_alloc_ecc_keypair(struct ecc_keypair *key,
495 drvcrypt_asym_alloc_ecc_public_key(struct ecc_public_key *key __unused, in drvcrypt_asym_alloc_ecc_public_key()
503 drvcrypt_asym_alloc_ecc_keypair(struct ecc_keypair *key __unused, in drvcrypt_asym_alloc_ecc_keypair()
511 TEE_Result sw_crypto_acipher_alloc_rsa_keypair(struct rsa_keypair *s,
514 TEE_Result sw_crypto_acipher_alloc_rsa_public_key(struct rsa_public_key *s,
517 void sw_crypto_acipher_free_rsa_public_key(struct rsa_public_key *s);
519 void sw_crypto_acipher_free_rsa_keypair(struct rsa_keypair *s);
521 TEE_Result sw_crypto_acipher_gen_rsa_key(struct rsa_keypair *key,
524 TEE_Result sw_crypto_acipher_rsanopad_decrypt(struct rsa_keypair *key,
528 TEE_Result sw_crypto_acipher_rsanopad_encrypt(struct rsa_public_key *key,
533 struct rsa_keypair *key,
542 struct rsa_public_key *key,
550 TEE_Result sw_crypto_acipher_rsassa_sign(uint32_t algo, struct rsa_keypair *key,
556 struct rsa_public_key *key,