1#ifndef __VSF_LINUX_CRYPTO_H__
2#define __VSF_LINUX_CRYPTO_H__
10#define CRYPTO_ALG_TYPE_MASK 0x0000000f
11#define CRYPTO_ALG_TYPE_CIPHER 0x00000001
12#define CRYPTO_ALG_TYPE_AEAD 0x00000003
13#define CRYPTO_ALG_TYPE_LSKCIPHER 0x00000004
14#define CRYPTO_ALG_TYPE_SKCIPHER 0x00000005
15#define CRYPTO_ALG_TYPE_AKCIPHER 0x00000006
16#define CRYPTO_ALG_TYPE_SIG 0x00000007
17#define CRYPTO_ALG_TYPE_KPP 0x00000008
18#define CRYPTO_ALG_TYPE_ACOMPRESS 0x0000000a
19#define CRYPTO_ALG_TYPE_SCOMPRESS 0x0000000b
20#define CRYPTO_ALG_TYPE_RNG 0x0000000c
21#define CRYPTO_ALG_TYPE_HASH 0x0000000e
22#define CRYPTO_ALG_TYPE_SHASH 0x0000000e
23#define CRYPTO_ALG_TYPE_AHASH 0x0000000f
25#define CRYPTO_TFM_REQ_MAY_BACKLOG 0x00000400
71#define DECLARE_CRYPTO_WAIT(_wait) \
72 struct crypto_wait _wait; \
73 init_completion(&_wait.completion)
79static inline void *crypto_tfm_ctx(
struct crypto_tfm *tfm)
90 wait_for_completion(&
wait->completion);
91 reinit_completion(&
wait->completion);
98static inline void crypto_free_tfm(
struct crypto_tfm *tfm)
void * crypto_alloc_tfm(const char *alg_name, const struct crypto_type *frontend, u32 type, u32 mask)
Definition vsf_linux_core_crypto.c:327
void crypto_req_done(void *req, int err)
Definition vsf_linux_core_crypto.c:357
int vsf_linux_crypto_init(void)
Definition vsf_linux_core_crypto.c:818
void crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm)
Definition vsf_linux_core_crypto.c:348
void(* crypto_completion_t)(void *req, int err)
Definition crypto.h:27
#define EINPROGRESS
Definition errno.h:130
#define EBUSY
Definition errno.h:30
uint32_t u32
Definition lvgl.h:43
Definition completion.h:6
struct crypto_alg * alg
Definition crypto.h:53
struct crypto_alg_tree * next
Definition crypto.h:52
void(* cra_exit)(struct crypto_tfm *tfm)
Definition crypto.h:45
vsf_dlist_node_t node
Definition crypto.h:38
const char * cra_name
Definition crypto.h:42
psa_algorithm_t alg
Definition crypto.h:47
unsigned int cra_blocksize
Definition crypto.h:40
unsigned int cra_ctxsize
Definition crypto.h:41
void(* cra_init)(struct crypto_tfm *tfm)
Definition crypto.h:44
crypto_completion_t complete
Definition crypto.h:31
u32 flags
Definition crypto.h:34
void * data
Definition crypto.h:32
struct crypto_tfm * tfm
Definition crypto.h:33
vsf_dlist_node_t node
Definition crypto.h:57
const char * name
Definition crypto.h:59
int(* crate)(struct crypto_template *tmpl, struct crypto_alg_tree *arg)
Definition crypto.h:58
struct crypto_alg * __crt_alg
Definition crypto.h:63
void * __crt_ctx[]
Definition crypto.h:64
int err
Definition crypto.h:69
Definition vsf_list.h:888
pid_t wait(int *status)
Definition vsf_linux.c:2752
vk_av_control_type_t type
Definition vsf_audio.h:170