| /include/crypto/ |
| D | skcipher.h | 152 int (*setkey)(struct crypto_skcipher *tfm, const u8 *key, 158 int (*init)(struct crypto_skcipher *tfm); 159 void (*exit)(struct crypto_skcipher *tfm); 203 int (*setkey)(struct crypto_lskcipher *tfm, const u8 *key, 205 int (*encrypt)(struct crypto_lskcipher *tfm, const u8 *src, 207 int (*decrypt)(struct crypto_lskcipher *tfm, const u8 *src, 209 int (*init)(struct crypto_lskcipher *tfm); 210 void (*exit)(struct crypto_lskcipher *tfm); 220 #define SYNC_SKCIPHER_REQUEST_ON_STACK(name, tfm) \ argument 224 (typeof(tfm))1))) \ [all …]
|
| D | akcipher.h | 101 int (*set_pub_key)(struct crypto_akcipher *tfm, const void *key, 103 int (*set_priv_key)(struct crypto_akcipher *tfm, const void *key, 105 unsigned int (*max_size)(struct crypto_akcipher *tfm); 106 int (*init)(struct crypto_akcipher *tfm); 107 void (*exit)(struct crypto_akcipher *tfm); 137 struct crypto_akcipher *tfm) in crypto_akcipher_tfm() argument 139 return &tfm->base; in crypto_akcipher_tfm() 148 struct crypto_tfm *tfm) in __crypto_akcipher_tfm() argument 150 return container_of(tfm, struct crypto_akcipher, base); in __crypto_akcipher_tfm() 154 struct crypto_akcipher *tfm) in crypto_akcipher_alg() argument [all …]
|
| D | aead.h | 140 int (*setkey)(struct crypto_aead *tfm, const u8 *key, 142 int (*setauthsize)(struct crypto_aead *tfm, unsigned int authsize); 145 int (*init)(struct crypto_aead *tfm); 146 void (*exit)(struct crypto_aead *tfm); 162 static inline struct crypto_aead *__crypto_aead_cast(struct crypto_tfm *tfm) in __crypto_aead_cast() argument 164 return container_of(tfm, struct crypto_aead, base); in __crypto_aead_cast() 183 static inline struct crypto_tfm *crypto_aead_tfm(struct crypto_aead *tfm) in crypto_aead_tfm() argument 185 return &tfm->base; in crypto_aead_tfm() 194 static inline void crypto_free_aead(struct crypto_aead *tfm) in crypto_free_aead() argument 196 crypto_destroy_tfm(tfm, crypto_aead_tfm(tfm)); in crypto_free_aead() [all …]
|
| D | kpp.h | 78 int (*set_secret)(struct crypto_kpp *tfm, const void *buffer, 83 unsigned int (*max_size)(struct crypto_kpp *tfm); 85 int (*init)(struct crypto_kpp *tfm); 86 void (*exit)(struct crypto_kpp *tfm); 114 static inline struct crypto_tfm *crypto_kpp_tfm(struct crypto_kpp *tfm) in crypto_kpp_tfm() argument 116 return &tfm->base; in crypto_kpp_tfm() 124 static inline struct crypto_kpp *__crypto_kpp_tfm(struct crypto_tfm *tfm) in __crypto_kpp_tfm() argument 126 return container_of(tfm, struct crypto_kpp, base); in __crypto_kpp_tfm() 129 static inline struct kpp_alg *crypto_kpp_alg(struct crypto_kpp *tfm) in crypto_kpp_alg() argument 131 return __crypto_kpp_alg(crypto_kpp_tfm(tfm)->__crt_alg); in crypto_kpp_alg() [all …]
|
| D | hash.h | 145 int (*setkey)(struct crypto_ahash *tfm, const u8 *key, 147 int (*init_tfm)(struct crypto_ahash *tfm); 148 void (*exit_tfm)(struct crypto_ahash *tfm); 155 struct crypto_shash *tfm; member 223 int (*setkey)(struct crypto_shash *tfm, const u8 *key, 228 int (*init_tfm)(struct crypto_shash *tfm); 229 void (*exit_tfm)(struct crypto_shash *tfm); 264 static inline struct crypto_ahash *__crypto_ahash_cast(struct crypto_tfm *tfm) in __crypto_ahash_cast() argument 266 return container_of(tfm, struct crypto_ahash, base); in __crypto_ahash_cast() 286 struct crypto_ahash *crypto_clone_ahash(struct crypto_ahash *tfm); [all …]
|
| D | rng.h | 44 int (*generate)(struct crypto_rng *tfm, 47 int (*seed)(struct crypto_rng *tfm, const u8 *seed, unsigned int slen); 48 void (*set_ent)(struct crypto_rng *tfm, const u8 *data, 94 static inline struct crypto_tfm *crypto_rng_tfm(struct crypto_rng *tfm) in crypto_rng_tfm() argument 96 return &tfm->base; in crypto_rng_tfm() 112 static inline struct rng_alg *crypto_rng_alg(struct crypto_rng *tfm) in crypto_rng_alg() argument 114 return __crypto_rng_alg(crypto_rng_tfm(tfm)->__crt_alg); in crypto_rng_alg() 123 static inline void crypto_free_rng(struct crypto_rng *tfm) in crypto_free_rng() argument 125 crypto_destroy_tfm(tfm, crypto_rng_tfm(tfm)); in crypto_free_rng() 142 static inline int crypto_rng_generate(struct crypto_rng *tfm, in crypto_rng_generate() argument [all …]
|
| D | cryptd.h | 29 struct crypto_skcipher *cryptd_skcipher_child(struct cryptd_skcipher *tfm); 31 bool cryptd_skcipher_queued(struct cryptd_skcipher *tfm); 32 void cryptd_free_skcipher(struct cryptd_skcipher *tfm); 39 struct crypto_ahash *tfm) in __cryptd_ahash_cast() argument 41 return (struct cryptd_ahash *)tfm; in __cryptd_ahash_cast() 47 struct crypto_shash *cryptd_ahash_child(struct cryptd_ahash *tfm); 50 bool cryptd_ahash_queued(struct cryptd_ahash *tfm); 51 void cryptd_free_ahash(struct cryptd_ahash *tfm); 58 struct crypto_aead *tfm) in __cryptd_aead_cast() argument 60 return (struct cryptd_aead *)tfm; in __cryptd_aead_cast() [all …]
|
| D | sig.h | 45 static inline struct crypto_tfm *crypto_sig_tfm(struct crypto_sig *tfm) in crypto_sig_tfm() argument 47 return &tfm->base; in crypto_sig_tfm() 57 static inline void crypto_free_sig(struct crypto_sig *tfm) in crypto_free_sig() argument 59 crypto_destroy_tfm(tfm, crypto_sig_tfm(tfm)); in crypto_free_sig() 72 int crypto_sig_maxsize(struct crypto_sig *tfm); 87 int crypto_sig_sign(struct crypto_sig *tfm, 105 int crypto_sig_verify(struct crypto_sig *tfm, 122 int crypto_sig_set_pubkey(struct crypto_sig *tfm, 138 int crypto_sig_set_privkey(struct crypto_sig *tfm,
|
| D | acompress.h | 106 static inline struct crypto_tfm *crypto_acomp_tfm(struct crypto_acomp *tfm) in crypto_acomp_tfm() argument 108 return &tfm->base; in crypto_acomp_tfm() 117 static inline struct crypto_acomp *__crypto_acomp_tfm(struct crypto_tfm *tfm) in __crypto_acomp_tfm() argument 119 return container_of(tfm, struct crypto_acomp, base); in __crypto_acomp_tfm() 123 struct crypto_acomp *tfm) in crypto_comp_alg_common() argument 125 return __crypto_comp_alg_common(crypto_acomp_tfm(tfm)->__crt_alg); in crypto_comp_alg_common() 128 static inline unsigned int crypto_acomp_reqsize(struct crypto_acomp *tfm) in crypto_acomp_reqsize() argument 130 return tfm->reqsize; in crypto_acomp_reqsize() 134 struct crypto_acomp *tfm) in acomp_request_set_tfm() argument 136 req->base.tfm = crypto_acomp_tfm(tfm); in acomp_request_set_tfm() [all …]
|
| D | algapi.h | 60 int (*init_tfm)(struct crypto_tfm *tfm); 181 static inline void *crypto_tfm_ctx(struct crypto_tfm *tfm) in crypto_tfm_ctx() argument 183 return tfm->__crt_ctx; in crypto_tfm_ctx() 186 static inline void *crypto_tfm_ctx_align(struct crypto_tfm *tfm, in crypto_tfm_ctx_align() argument 192 return PTR_ALIGN(crypto_tfm_ctx(tfm), align); in crypto_tfm_ctx_align() 205 static inline void *crypto_tfm_ctx_dma(struct crypto_tfm *tfm) in crypto_tfm_ctx_dma() argument 207 return crypto_tfm_ctx_align(tfm, crypto_dma_align()); in crypto_tfm_ctx_dma() 211 struct crypto_tfm *tfm) in crypto_tfm_alg_instance() argument 213 return container_of(tfm->__crt_alg, struct crypto_instance, alg); in crypto_tfm_alg_instance() 269 static inline u32 crypto_tfm_alg_type(struct crypto_tfm *tfm) in crypto_tfm_alg_type() argument [all …]
|
| D | xts.h | 11 static inline int xts_verify_key(struct crypto_skcipher *tfm, in xts_verify_key() argument 32 if ((fips_enabled || (crypto_skcipher_get_flags(tfm) & in xts_verify_key()
|
| /include/crypto/internal/ |
| D | scompress.h | 34 void *(*alloc_ctx)(struct crypto_scomp *tfm); 35 void (*free_ctx)(struct crypto_scomp *tfm, void *ctx); 36 int (*compress)(struct crypto_scomp *tfm, const u8 *src, 39 int (*decompress)(struct crypto_scomp *tfm, const u8 *src, 54 static inline struct crypto_scomp *__crypto_scomp_tfm(struct crypto_tfm *tfm) in __crypto_scomp_tfm() argument 56 return container_of(tfm, struct crypto_scomp, base); in __crypto_scomp_tfm() 59 static inline struct crypto_tfm *crypto_scomp_tfm(struct crypto_scomp *tfm) in crypto_scomp_tfm() argument 61 return &tfm->base; in crypto_scomp_tfm() 64 static inline void crypto_free_scomp(struct crypto_scomp *tfm) in crypto_free_scomp() argument 66 crypto_destroy_tfm(tfm, crypto_scomp_tfm(tfm)); in crypto_free_scomp() [all …]
|
| D | cipher.h | 37 static inline struct crypto_cipher *__crypto_cipher_cast(struct crypto_tfm *tfm) in __crypto_cipher_cast() argument 39 return (struct crypto_cipher *)tfm; in __crypto_cipher_cast() 66 static inline struct crypto_tfm *crypto_cipher_tfm(struct crypto_cipher *tfm) in crypto_cipher_tfm() argument 68 return &tfm->base; in crypto_cipher_tfm() 75 static inline void crypto_free_cipher(struct crypto_cipher *tfm) in crypto_free_cipher() argument 77 crypto_free_tfm(crypto_cipher_tfm(tfm)); in crypto_free_cipher() 109 static inline unsigned int crypto_cipher_blocksize(struct crypto_cipher *tfm) in crypto_cipher_blocksize() argument 111 return crypto_tfm_alg_blocksize(crypto_cipher_tfm(tfm)); in crypto_cipher_blocksize() 114 static inline unsigned int crypto_cipher_alignmask(struct crypto_cipher *tfm) in crypto_cipher_alignmask() argument 116 return crypto_tfm_alg_alignmask(crypto_cipher_tfm(tfm)); in crypto_cipher_alignmask() [all …]
|
| D | des.h | 26 static inline int crypto_des_verify_key(struct crypto_tfm *tfm, const u8 *key) in crypto_des_verify_key() argument 33 if (crypto_tfm_get_flags(tfm) & CRYPTO_TFM_REQ_FORBID_WEAK_KEYS) in crypto_des_verify_key() 91 static inline int crypto_des3_ede_verify_key(struct crypto_tfm *tfm, in crypto_des3_ede_verify_key() argument 95 crypto_tfm_get_flags(tfm) & in crypto_des3_ede_verify_key() 99 static inline int verify_skcipher_des_key(struct crypto_skcipher *tfm, in verify_skcipher_des_key() argument 102 return crypto_des_verify_key(crypto_skcipher_tfm(tfm), key); in verify_skcipher_des_key() 105 static inline int verify_skcipher_des3_key(struct crypto_skcipher *tfm, in verify_skcipher_des3_key() argument 108 return crypto_des3_ede_verify_key(crypto_skcipher_tfm(tfm), key); in verify_skcipher_des3_key() 111 static inline int verify_aead_des_key(struct crypto_aead *tfm, const u8 *key, in verify_aead_des_key() argument 116 return crypto_des_verify_key(crypto_aead_tfm(tfm), key); in verify_aead_des_key() [all …]
|
| D | chacha.h | 15 static inline int chacha_setkey(struct crypto_skcipher *tfm, const u8 *key, in chacha_setkey() argument 18 struct chacha_ctx *ctx = crypto_skcipher_ctx(tfm); in chacha_setkey() 31 static inline int chacha20_setkey(struct crypto_skcipher *tfm, const u8 *key, in chacha20_setkey() argument 34 return chacha_setkey(tfm, key, keysize, 20); in chacha20_setkey() 37 static inline int chacha12_setkey(struct crypto_skcipher *tfm, const u8 *key, in chacha12_setkey() argument 40 return chacha_setkey(tfm, key, keysize, 12); in chacha12_setkey()
|
| D | acompress.h | 41 int (*init)(struct crypto_acomp *tfm); 42 void (*exit)(struct crypto_acomp *tfm); 60 static inline void *acomp_tfm_ctx(struct crypto_acomp *tfm) in acomp_tfm_ctx() argument 62 return tfm->base.__crt_ctx; in acomp_tfm_ctx() 71 static inline struct acomp_req *__acomp_request_alloc_noprof(struct crypto_acomp *tfm) in __acomp_request_alloc_noprof() argument 75 req = kzalloc_noprof(sizeof(*req) + crypto_acomp_reqsize(tfm), GFP_KERNEL); in __acomp_request_alloc_noprof() 77 acomp_request_set_tfm(req, tfm); in __acomp_request_alloc_noprof()
|
| D | rng.h | 29 static inline void *crypto_rng_ctx(struct crypto_rng *tfm) in crypto_rng_ctx() argument 31 return crypto_tfm_ctx(&tfm->base); in crypto_rng_ctx() 34 static inline void crypto_rng_set_entropy(struct crypto_rng *tfm, in crypto_rng_set_entropy() argument 37 crypto_rng_alg(tfm)->set_ent(tfm, data, len); in crypto_rng_set_entropy()
|
| D | hash.h | 76 int shash_no_setkey(struct crypto_shash *tfm, const u8 *key, 132 static inline void *crypto_ahash_ctx(struct crypto_ahash *tfm) in crypto_ahash_ctx() argument 134 return crypto_tfm_ctx(crypto_ahash_tfm(tfm)); in crypto_ahash_ctx() 137 static inline void *crypto_ahash_ctx_dma(struct crypto_ahash *tfm) in crypto_ahash_ctx_dma() argument 139 return crypto_tfm_ctx_dma(crypto_ahash_tfm(tfm)); in crypto_ahash_ctx_dma() 154 static inline void crypto_ahash_set_statesize(struct crypto_ahash *tfm, in crypto_ahash_set_statesize() argument 157 tfm->statesize = size; in crypto_ahash_set_statesize() 160 static inline void crypto_ahash_set_reqsize(struct crypto_ahash *tfm, in crypto_ahash_set_reqsize() argument 163 tfm->reqsize = reqsize; in crypto_ahash_set_reqsize() 234 static inline void *crypto_shash_ctx(struct crypto_shash *tfm) in crypto_shash_ctx() argument [all …]
|
| D | kpp.h | 76 static inline void *kpp_tfm_ctx(struct crypto_kpp *tfm) in kpp_tfm_ctx() argument 78 return crypto_tfm_ctx(&tfm->base); in kpp_tfm_ctx() 81 static inline void *kpp_tfm_ctx_dma(struct crypto_kpp *tfm) in kpp_tfm_ctx_dma() argument 83 return crypto_tfm_ctx_dma(&tfm->base); in kpp_tfm_ctx_dma() 91 static inline const char *kpp_alg_name(struct crypto_kpp *tfm) in kpp_alg_name() argument 93 return crypto_kpp_tfm(tfm)->__crt_alg->cra_name; in kpp_alg_name()
|
| D | akcipher.h | 59 static inline void *akcipher_tfm_ctx(struct crypto_akcipher *tfm) in akcipher_tfm_ctx() argument 61 return crypto_tfm_ctx(&tfm->base); in akcipher_tfm_ctx() 64 static inline void *akcipher_tfm_ctx_dma(struct crypto_akcipher *tfm) in akcipher_tfm_ctx_dma() argument 66 return crypto_tfm_ctx_dma(&tfm->base); in akcipher_tfm_ctx_dma() 75 static inline const char *akcipher_alg_name(struct crypto_akcipher *tfm) in akcipher_alg_name() argument 77 return crypto_akcipher_tfm(tfm)->__crt_alg->cra_name; in akcipher_alg_name()
|
| D | sig.h | 13 static inline void *crypto_sig_ctx(struct crypto_sig *tfm) in crypto_sig_ctx() argument 15 return crypto_tfm_ctx(&tfm->base); in crypto_sig_ctx()
|
| D | aead.h | 37 static inline void *crypto_aead_ctx(struct crypto_aead *tfm) in crypto_aead_ctx() argument 39 return crypto_tfm_ctx(&tfm->base); in crypto_aead_ctx() 42 static inline void *crypto_aead_ctx_dma(struct crypto_aead *tfm) in crypto_aead_ctx_dma() argument 44 return crypto_tfm_ctx_dma(&tfm->base); in crypto_aead_ctx_dma() 155 static inline unsigned int crypto_aead_chunksize(struct crypto_aead *tfm) in crypto_aead_chunksize() argument 157 return crypto_aead_alg_chunksize(crypto_aead_alg(tfm)); in crypto_aead_chunksize()
|
| D | skcipher.h | 225 static inline void *crypto_skcipher_ctx(struct crypto_skcipher *tfm) in crypto_skcipher_ctx() argument 227 return crypto_tfm_ctx(&tfm->base); in crypto_skcipher_ctx() 230 static inline void *crypto_lskcipher_ctx(struct crypto_lskcipher *tfm) in crypto_lskcipher_ctx() argument 232 return crypto_tfm_ctx(&tfm->base); in crypto_lskcipher_ctx() 235 static inline void *crypto_skcipher_ctx_dma(struct crypto_skcipher *tfm) in crypto_skcipher_ctx_dma() argument 237 return crypto_tfm_ctx_dma(&tfm->base); in crypto_skcipher_ctx_dma() 265 skcipher_cipher_simple(struct crypto_skcipher *tfm) in skcipher_cipher_simple() argument 267 struct skcipher_ctx_simple *ctx = crypto_skcipher_ctx(tfm); in skcipher_cipher_simple() 284 struct crypto_lskcipher *tfm) in lskcipher_cipher_simple() argument 286 struct crypto_lskcipher **ctx = crypto_lskcipher_ctx(tfm); in lskcipher_cipher_simple()
|
| /include/linux/ |
| D | crypto.h | 174 struct crypto_tfm *tfm; member 236 int (*cia_setkey)(struct crypto_tfm *tfm, const u8 *key, 238 void (*cia_encrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); 239 void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); 254 int (*coa_compress)(struct crypto_tfm *tfm, const u8 *src, 256 int (*coa_decompress)(struct crypto_tfm *tfm, const u8 *src, 365 int (*cra_init)(struct crypto_tfm *tfm); 366 void (*cra_exit)(struct crypto_tfm *tfm); 429 void (*exit)(struct crypto_tfm *tfm); 445 void crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm); [all …]
|
| D | bpf_crypto.h | 8 void (*free_tfm)(void *tfm); 10 int (*setkey)(void *tfm, const u8 *key, unsigned int keylen); 11 int (*setauthsize)(void *tfm, unsigned int authsize); 12 int (*encrypt)(void *tfm, const u8 *src, u8 *dst, unsigned int len, u8 *iv); 13 int (*decrypt)(void *tfm, const u8 *src, u8 *dst, unsigned int len, u8 *iv); 14 unsigned int (*ivsize)(void *tfm); 15 unsigned int (*statesize)(void *tfm); 16 u32 (*get_flags)(void *tfm);
|