/linux-4.4.14/include/linux/ |
D | crypto.h | 158 struct crypto_tfm *tfm; member 177 struct crypto_blkcipher *tfm; member 183 struct crypto_tfm *tfm; member 184 void (*crfn)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); 191 struct crypto_hash *tfm; member 254 int (*setkey)(struct crypto_ablkcipher *tfm, const u8 *key, 281 int (*setkey)(struct crypto_tfm *tfm, const u8 *key, 347 int (*cia_setkey)(struct crypto_tfm *tfm, const u8 *key, 349 void (*cia_encrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); 350 void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); [all …]
|
/linux-4.4.14/include/crypto/ |
D | compress.h | 58 int (*compress_setup)(struct crypto_pcomp *tfm, const void *params, 60 int (*compress_init)(struct crypto_pcomp *tfm); 61 int (*compress_update)(struct crypto_pcomp *tfm, 63 int (*compress_final)(struct crypto_pcomp *tfm, 65 int (*decompress_setup)(struct crypto_pcomp *tfm, const void *params, 67 int (*decompress_init)(struct crypto_pcomp *tfm); 68 int (*decompress_update)(struct crypto_pcomp *tfm, 70 int (*decompress_final)(struct crypto_pcomp *tfm, 79 static inline struct crypto_tfm *crypto_pcomp_tfm(struct crypto_pcomp *tfm) in crypto_pcomp_tfm() argument 81 return &tfm->base; in crypto_pcomp_tfm() [all …]
|
D | hash.h | 136 int (*setkey)(struct crypto_ahash *tfm, const u8 *key, 143 struct crypto_shash *tfm; member 182 int (*setkey)(struct crypto_shash *tfm, const u8 *key, 203 int (*setkey)(struct crypto_ahash *tfm, const u8 *key, 226 static inline struct crypto_ahash *__crypto_ahash_cast(struct crypto_tfm *tfm) in __crypto_ahash_cast() argument 228 return container_of(tfm, struct crypto_ahash, base); in __crypto_ahash_cast() 248 static inline struct crypto_tfm *crypto_ahash_tfm(struct crypto_ahash *tfm) in crypto_ahash_tfm() argument 250 return &tfm->base; in crypto_ahash_tfm() 257 static inline void crypto_free_ahash(struct crypto_ahash *tfm) in crypto_free_ahash() argument 259 crypto_destroy_tfm(tfm, crypto_ahash_tfm(tfm)); in crypto_free_ahash() [all …]
|
D | akcipher.h | 97 int (*set_pub_key)(struct crypto_akcipher *tfm, const void *key, 99 int (*set_priv_key)(struct crypto_akcipher *tfm, const void *key, 101 int (*max_size)(struct crypto_akcipher *tfm); 102 int (*init)(struct crypto_akcipher *tfm); 103 void (*exit)(struct crypto_akcipher *tfm); 134 struct crypto_akcipher *tfm) in crypto_akcipher_tfm() argument 136 return &tfm->base; in crypto_akcipher_tfm() 145 struct crypto_tfm *tfm) in __crypto_akcipher_tfm() argument 147 return container_of(tfm, struct crypto_akcipher, base); in __crypto_akcipher_tfm() 151 struct crypto_akcipher *tfm) in crypto_akcipher_alg() argument [all …]
|
D | aead.h | 135 int (*setkey)(struct crypto_aead *tfm, const u8 *key, 137 int (*setauthsize)(struct crypto_aead *tfm, unsigned int authsize); 140 int (*init)(struct crypto_aead *tfm); 141 void (*exit)(struct crypto_aead *tfm); 158 static inline struct crypto_aead *__crypto_aead_cast(struct crypto_tfm *tfm) in __crypto_aead_cast() argument 160 return container_of(tfm, struct crypto_aead, base); in __crypto_aead_cast() 179 static inline struct crypto_tfm *crypto_aead_tfm(struct crypto_aead *tfm) in crypto_aead_tfm() argument 181 return &tfm->base; in crypto_aead_tfm() 188 static inline void crypto_free_aead(struct crypto_aead *tfm) in crypto_free_aead() argument 190 crypto_destroy_tfm(tfm, crypto_aead_tfm(tfm)); in crypto_free_aead() [all …]
|
D | skcipher.h | 56 int (*setkey)(struct crypto_skcipher *tfm, const u8 *key, 69 #define SKCIPHER_REQUEST_ON_STACK(name, tfm) \ argument 71 crypto_skcipher_reqsize(tfm)] CRYPTO_MINALIGN_ATTR; \ 97 struct skcipher_givcrypt_request *req, struct crypto_ablkcipher *tfm) in skcipher_givcrypt_set_tfm() argument 99 req->creq.base.tfm = crypto_ablkcipher_tfm(tfm); in skcipher_givcrypt_set_tfm() 110 struct crypto_ablkcipher *tfm, gfp_t gfp) in skcipher_givcrypt_alloc() argument 115 crypto_ablkcipher_reqsize(tfm), gfp); in skcipher_givcrypt_alloc() 118 skcipher_givcrypt_set_tfm(req, tfm); in skcipher_givcrypt_alloc() 181 struct crypto_tfm *tfm) in __crypto_skcipher_cast() argument 183 return container_of(tfm, struct crypto_skcipher, base); in __crypto_skcipher_cast() [all …]
|
D | rng.h | 47 int (*generate)(struct crypto_rng *tfm, 50 int (*seed)(struct crypto_rng *tfm, const u8 *seed, unsigned int slen); 51 void (*set_ent)(struct crypto_rng *tfm, const u8 *data, 97 static inline struct crypto_tfm *crypto_rng_tfm(struct crypto_rng *tfm) in crypto_rng_tfm() argument 99 return &tfm->base; in crypto_rng_tfm() 110 static inline struct rng_alg *crypto_rng_alg(struct crypto_rng *tfm) in crypto_rng_alg() argument 112 return container_of(crypto_rng_tfm(tfm)->__crt_alg, in crypto_rng_alg() 120 static inline void crypto_free_rng(struct crypto_rng *tfm) in crypto_free_rng() argument 122 crypto_destroy_tfm(tfm, crypto_rng_tfm(tfm)); in crypto_free_rng() 139 static inline int crypto_rng_generate(struct crypto_rng *tfm, in crypto_rng_generate() argument [all …]
|
D | cryptd.h | 25 struct crypto_ablkcipher *tfm) in __cryptd_ablkcipher_cast() argument 27 return (struct cryptd_ablkcipher *)tfm; in __cryptd_ablkcipher_cast() 33 struct crypto_blkcipher *cryptd_ablkcipher_child(struct cryptd_ablkcipher *tfm); 34 void cryptd_free_ablkcipher(struct cryptd_ablkcipher *tfm); 41 struct crypto_ahash *tfm) in __cryptd_ahash_cast() argument 43 return (struct cryptd_ahash *)tfm; in __cryptd_ahash_cast() 49 struct crypto_shash *cryptd_ahash_child(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 | algapi.h | 29 int (*init)(struct crypto_tfm *tfm, u32 type, u32 mask); 30 int (*init_tfm)(struct crypto_tfm *tfm); 186 int crypto_tfm_in_queue(struct crypto_queue *queue, struct crypto_tfm *tfm); 203 struct crypto_aead *tfm, 212 static inline void *crypto_tfm_ctx_aligned(struct crypto_tfm *tfm) in crypto_tfm_ctx_aligned() argument 214 return PTR_ALIGN(crypto_tfm_ctx(tfm), in crypto_tfm_ctx_aligned() 215 crypto_tfm_alg_alignmask(tfm) + 1); in crypto_tfm_ctx_aligned() 219 struct crypto_tfm *tfm) in crypto_tfm_alg_instance() argument 221 return container_of(tfm->__crt_alg, struct crypto_instance, alg); in crypto_tfm_alg_instance() 230 struct crypto_ablkcipher *tfm) in crypto_ablkcipher_alg() argument [all …]
|
D | ablk_helper.h | 16 extern int ablk_set_key(struct crypto_ablkcipher *tfm, const u8 *key, 25 extern void ablk_exit(struct crypto_tfm *tfm); 27 extern int ablk_init_common(struct crypto_tfm *tfm, const char *drv_name); 29 extern int ablk_init(struct crypto_tfm *tfm);
|
D | mcryptd.h | 22 struct crypto_ahash *tfm) in __mcryptd_ahash_cast() argument 24 return (struct mcryptd_ahash *)tfm; in __mcryptd_ahash_cast() 67 struct crypto_shash *mcryptd_ahash_child(struct mcryptd_ahash *tfm); 69 void mcryptd_free_ahash(struct mcryptd_ahash *tfm);
|
/linux-4.4.14/crypto/ |
D | cipher.c | 23 static int setkey_unaligned(struct crypto_tfm *tfm, const u8 *key, in setkey_unaligned() argument 26 struct cipher_alg *cia = &tfm->__crt_alg->cra_cipher; in setkey_unaligned() 27 unsigned long alignmask = crypto_tfm_alg_alignmask(tfm); in setkey_unaligned() 39 ret = cia->cia_setkey(tfm, alignbuffer, keylen); in setkey_unaligned() 46 static int setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) in setkey() argument 48 struct cipher_alg *cia = &tfm->__crt_alg->cra_cipher; in setkey() 49 unsigned long alignmask = crypto_tfm_alg_alignmask(tfm); in setkey() 51 tfm->crt_flags &= ~CRYPTO_TFM_RES_MASK; in setkey() 53 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in setkey() 58 return setkey_unaligned(tfm, key, keylen); in setkey() [all …]
|
D | skcipher.c | 34 static int skcipher_setkey_blkcipher(struct crypto_skcipher *tfm, in skcipher_setkey_blkcipher() argument 37 struct crypto_blkcipher **ctx = crypto_skcipher_ctx(tfm); in skcipher_setkey_blkcipher() 42 crypto_blkcipher_set_flags(blkcipher, crypto_skcipher_get_flags(tfm) & in skcipher_setkey_blkcipher() 45 crypto_skcipher_set_flags(tfm, crypto_blkcipher_get_flags(blkcipher) & in skcipher_setkey_blkcipher() 57 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in skcipher_crypt_blkcipher() local 58 struct crypto_blkcipher **ctx = crypto_skcipher_ctx(tfm); in skcipher_crypt_blkcipher() 60 .tfm = *ctx, in skcipher_crypt_blkcipher() 72 struct crypto_tfm *tfm = crypto_skcipher_tfm(skcipher); in skcipher_encrypt_blkcipher() local 73 struct blkcipher_alg *alg = &tfm->__crt_alg->cra_blkcipher; in skcipher_encrypt_blkcipher() 81 struct crypto_tfm *tfm = crypto_skcipher_tfm(skcipher); in skcipher_decrypt_blkcipher() local [all …]
|
D | ablk_helper.c | 37 int ablk_set_key(struct crypto_ablkcipher *tfm, const u8 *key, in ablk_set_key() argument 40 struct async_helper_ctx *ctx = crypto_ablkcipher_ctx(tfm); in ablk_set_key() 45 crypto_ablkcipher_set_flags(child, crypto_ablkcipher_get_flags(tfm) in ablk_set_key() 48 crypto_ablkcipher_set_flags(tfm, crypto_ablkcipher_get_flags(child) in ablk_set_key() 56 struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(req); in __ablk_encrypt() local 57 struct async_helper_ctx *ctx = crypto_ablkcipher_ctx(tfm); in __ablk_encrypt() 60 desc.tfm = cryptd_ablkcipher_child(ctx->cryptd_tfm); in __ablk_encrypt() 64 return crypto_blkcipher_crt(desc.tfm)->encrypt( in __ablk_encrypt() 71 struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(req); in ablk_encrypt() local 72 struct async_helper_ctx *ctx = crypto_ablkcipher_ctx(tfm); in ablk_encrypt() [all …]
|
D | shash.c | 27 static int shash_no_setkey(struct crypto_shash *tfm, const u8 *key, in shash_no_setkey() argument 33 static int shash_setkey_unaligned(struct crypto_shash *tfm, const u8 *key, in shash_setkey_unaligned() argument 36 struct shash_alg *shash = crypto_shash_alg(tfm); in shash_setkey_unaligned() 37 unsigned long alignmask = crypto_shash_alignmask(tfm); in shash_setkey_unaligned() 49 err = shash->setkey(tfm, alignbuffer, keylen); in shash_setkey_unaligned() 54 int crypto_shash_setkey(struct crypto_shash *tfm, const u8 *key, in crypto_shash_setkey() argument 57 struct shash_alg *shash = crypto_shash_alg(tfm); in crypto_shash_setkey() 58 unsigned long alignmask = crypto_shash_alignmask(tfm); in crypto_shash_setkey() 61 return shash_setkey_unaligned(tfm, key, keylen); in crypto_shash_setkey() 63 return shash->setkey(tfm, key, keylen); in crypto_shash_setkey() [all …]
|
D | api.c | 287 static int crypto_init_ops(struct crypto_tfm *tfm, u32 type, u32 mask) in crypto_init_ops() argument 289 const struct crypto_type *type_obj = tfm->__crt_alg->cra_type; in crypto_init_ops() 292 return type_obj->init(tfm, type, mask); in crypto_init_ops() 294 switch (crypto_tfm_alg_type(tfm)) { in crypto_init_ops() 296 return crypto_init_cipher_ops(tfm); in crypto_init_ops() 299 return crypto_init_compress_ops(tfm); in crypto_init_ops() 309 static void crypto_exit_ops(struct crypto_tfm *tfm) in crypto_exit_ops() argument 311 const struct crypto_type *type = tfm->__crt_alg->cra_type; in crypto_exit_ops() 314 if (tfm->exit) in crypto_exit_ops() 315 tfm->exit(tfm); in crypto_exit_ops() [all …]
|
D | pcbc.c | 47 struct crypto_cipher *tfm) in crypto_pcbc_encrypt_segment() argument 50 crypto_cipher_alg(tfm)->cia_encrypt; in crypto_pcbc_encrypt_segment() 51 int bsize = crypto_cipher_blocksize(tfm); in crypto_pcbc_encrypt_segment() 59 fn(crypto_cipher_tfm(tfm), dst, iv); in crypto_pcbc_encrypt_segment() 72 struct crypto_cipher *tfm) in crypto_pcbc_encrypt_inplace() argument 75 crypto_cipher_alg(tfm)->cia_encrypt; in crypto_pcbc_encrypt_inplace() 76 int bsize = crypto_cipher_blocksize(tfm); in crypto_pcbc_encrypt_inplace() 85 fn(crypto_cipher_tfm(tfm), src, iv); in crypto_pcbc_encrypt_inplace() 102 struct crypto_blkcipher *tfm = desc->tfm; in crypto_pcbc_encrypt() local 103 struct crypto_pcbc_ctx *ctx = crypto_blkcipher_ctx(tfm); in crypto_pcbc_encrypt() [all …]
|
D | cbc.c | 44 struct crypto_cipher *tfm) in crypto_cbc_encrypt_segment() argument 47 crypto_cipher_alg(tfm)->cia_encrypt; in crypto_cbc_encrypt_segment() 48 int bsize = crypto_cipher_blocksize(tfm); in crypto_cbc_encrypt_segment() 56 fn(crypto_cipher_tfm(tfm), dst, iv); in crypto_cbc_encrypt_segment() 68 struct crypto_cipher *tfm) in crypto_cbc_encrypt_inplace() argument 71 crypto_cipher_alg(tfm)->cia_encrypt; in crypto_cbc_encrypt_inplace() 72 int bsize = crypto_cipher_blocksize(tfm); in crypto_cbc_encrypt_inplace() 79 fn(crypto_cipher_tfm(tfm), src, src); in crypto_cbc_encrypt_inplace() 95 struct crypto_blkcipher *tfm = desc->tfm; in crypto_cbc_encrypt() local 96 struct crypto_cbc_ctx *ctx = crypto_blkcipher_ctx(tfm); in crypto_cbc_encrypt() [all …]
|
D | compress.c | 20 static int crypto_compress(struct crypto_tfm *tfm, in crypto_compress() argument 24 return tfm->__crt_alg->cra_compress.coa_compress(tfm, src, slen, dst, in crypto_compress() 28 static int crypto_decompress(struct crypto_tfm *tfm, in crypto_decompress() argument 32 return tfm->__crt_alg->cra_compress.coa_decompress(tfm, src, slen, dst, in crypto_decompress() 36 int crypto_init_compress_ops(struct crypto_tfm *tfm) in crypto_init_compress_ops() argument 38 struct compress_tfm *ops = &tfm->crt_compress; in crypto_init_compress_ops() 46 void crypto_exit_compress_ops(struct crypto_tfm *tfm) in crypto_exit_compress_ops() argument
|
D | blkcipher.c | 303 walk->walk_blocksize = crypto_blkcipher_blocksize(desc->tfm); in blkcipher_walk_virt() 305 walk->ivsize = crypto_blkcipher_ivsize(desc->tfm); in blkcipher_walk_virt() 306 walk->alignmask = crypto_blkcipher_alignmask(desc->tfm); in blkcipher_walk_virt() 315 walk->walk_blocksize = crypto_blkcipher_blocksize(desc->tfm); in blkcipher_walk_phys() 317 walk->ivsize = crypto_blkcipher_ivsize(desc->tfm); in blkcipher_walk_phys() 318 walk->alignmask = crypto_blkcipher_alignmask(desc->tfm); in blkcipher_walk_phys() 354 walk->cipher_blocksize = crypto_blkcipher_blocksize(desc->tfm); in blkcipher_walk_virt_block() 355 walk->ivsize = crypto_blkcipher_ivsize(desc->tfm); in blkcipher_walk_virt_block() 356 walk->alignmask = crypto_blkcipher_alignmask(desc->tfm); in blkcipher_walk_virt_block() 363 struct crypto_aead *tfm, in blkcipher_aead_walk_virt_block() argument [all …]
|
D | cryptd.c | 164 static inline struct cryptd_queue *cryptd_get_queue(struct crypto_tfm *tfm) in cryptd_get_queue() argument 166 struct crypto_instance *inst = crypto_tfm_alg_instance(tfm); in cryptd_get_queue() 216 desc.tfm = child; in cryptd_blkcipher_crypt() 232 struct cryptd_blkcipher_ctx *ctx = crypto_tfm_ctx(req->tfm); in cryptd_blkcipher_encrypt() 241 struct cryptd_blkcipher_ctx *ctx = crypto_tfm_ctx(req->tfm); in cryptd_blkcipher_decrypt() 252 struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(req); in cryptd_blkcipher_enqueue() local 255 queue = cryptd_get_queue(crypto_ablkcipher_tfm(tfm)); in cryptd_blkcipher_enqueue() 272 static int cryptd_blkcipher_init_tfm(struct crypto_tfm *tfm) in cryptd_blkcipher_init_tfm() argument 274 struct crypto_instance *inst = crypto_tfm_alg_instance(tfm); in cryptd_blkcipher_init_tfm() 277 struct cryptd_blkcipher_ctx *ctx = crypto_tfm_ctx(tfm); in cryptd_blkcipher_init_tfm() [all …]
|
D | ctr.c | 56 struct crypto_cipher *tfm) in crypto_ctr_crypt_final() argument 58 unsigned int bsize = crypto_cipher_blocksize(tfm); in crypto_ctr_crypt_final() 59 unsigned long alignmask = crypto_cipher_alignmask(tfm); in crypto_ctr_crypt_final() 67 crypto_cipher_encrypt_one(tfm, keystream, ctrblk); in crypto_ctr_crypt_final() 75 struct crypto_cipher *tfm) in crypto_ctr_crypt_segment() argument 78 crypto_cipher_alg(tfm)->cia_encrypt; in crypto_ctr_crypt_segment() 79 unsigned int bsize = crypto_cipher_blocksize(tfm); in crypto_ctr_crypt_segment() 87 fn(crypto_cipher_tfm(tfm), dst, ctrblk); in crypto_ctr_crypt_segment() 101 struct crypto_cipher *tfm) in crypto_ctr_crypt_inplace() argument 104 crypto_cipher_alg(tfm)->cia_encrypt; in crypto_ctr_crypt_inplace() [all …]
|
D | aead.c | 31 static int setkey_unaligned(struct crypto_aead *tfm, const u8 *key, in setkey_unaligned() argument 34 unsigned long alignmask = crypto_aead_alignmask(tfm); in setkey_unaligned() 46 ret = crypto_aead_alg(tfm)->setkey(tfm, alignbuffer, keylen); in setkey_unaligned() 52 int crypto_aead_setkey(struct crypto_aead *tfm, in crypto_aead_setkey() argument 55 unsigned long alignmask = crypto_aead_alignmask(tfm); in crypto_aead_setkey() 58 return setkey_unaligned(tfm, key, keylen); in crypto_aead_setkey() 60 return crypto_aead_alg(tfm)->setkey(tfm, key, keylen); in crypto_aead_setkey() 64 int crypto_aead_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in crypto_aead_setauthsize() argument 68 if (authsize > crypto_aead_maxauthsize(tfm)) in crypto_aead_setauthsize() 71 if (crypto_aead_alg(tfm)->setauthsize) { in crypto_aead_setauthsize() [all …]
|
D | ansi_cprng.c | 52 struct crypto_cipher *tfm; member 161 crypto_cipher_encrypt_one(ctx->tfm, output, tmp); in _get_more_prng_bytes() 278 crypto_free_cipher(ctx->tfm); in free_prng_context() 311 ret = crypto_cipher_setkey(ctx->tfm, prng_key, klen); in reset_prng_context() 314 crypto_cipher_get_flags(ctx->tfm)); in reset_prng_context() 325 static int cprng_init(struct crypto_tfm *tfm) in cprng_init() argument 327 struct prng_context *ctx = crypto_tfm_ctx(tfm); in cprng_init() 330 ctx->tfm = crypto_alloc_cipher("aes", 0, 0); in cprng_init() 331 if (IS_ERR(ctx->tfm)) { in cprng_init() 334 return PTR_ERR(ctx->tfm); in cprng_init() [all …]
|
D | ecb.c | 43 struct crypto_cipher *tfm, in crypto_ecb_crypt() argument 46 int bsize = crypto_cipher_blocksize(tfm); in crypto_ecb_crypt() 57 fn(crypto_cipher_tfm(tfm), wdst, wsrc); in crypto_ecb_crypt() 74 struct crypto_blkcipher *tfm = desc->tfm; in crypto_ecb_encrypt() local 75 struct crypto_ecb_ctx *ctx = crypto_blkcipher_ctx(tfm); in crypto_ecb_encrypt() 88 struct crypto_blkcipher *tfm = desc->tfm; in crypto_ecb_decrypt() local 89 struct crypto_ecb_ctx *ctx = crypto_blkcipher_ctx(tfm); in crypto_ecb_decrypt() 97 static int crypto_ecb_init_tfm(struct crypto_tfm *tfm) in crypto_ecb_init_tfm() argument 99 struct crypto_instance *inst = (void *)tfm->__crt_alg; in crypto_ecb_init_tfm() 101 struct crypto_ecb_ctx *ctx = crypto_tfm_ctx(tfm); in crypto_ecb_init_tfm() [all …]
|
D | testmgr.c | 201 static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template, in __test_hash() argument 205 const char *algo = crypto_tfm_alg_driver_name(crypto_ahash_tfm(tfm)); in __test_hash() 227 req = ahash_request_alloc(tfm, GFP_KERNEL); in __test_hash() 255 crypto_ahash_clear_flags(tfm, ~0); in __test_hash() 263 ret = crypto_ahash_setkey(tfm, key, template[i].ksize); in __test_hash() 302 crypto_ahash_digestsize(tfm))) { in __test_hash() 305 hexdump(result, crypto_ahash_digestsize(tfm)); in __test_hash() 346 crypto_ahash_clear_flags(tfm, ~0); in __test_hash() 348 ret = crypto_ahash_setkey(tfm, key, template[i].ksize); in __test_hash() 379 crypto_ahash_digestsize(tfm))) { in __test_hash() [all …]
|
D | rsa.c | 73 static inline struct rsa_key *rsa_get_key(struct crypto_akcipher *tfm) in rsa_get_key() argument 75 return akcipher_tfm_ctx(tfm); in rsa_get_key() 80 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); in rsa_enc() local 81 const struct rsa_key *pkey = rsa_get_key(tfm); in rsa_enc() 125 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); in rsa_dec() local 126 const struct rsa_key *pkey = rsa_get_key(tfm); in rsa_dec() 169 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); in rsa_sign() local 170 const struct rsa_key *pkey = rsa_get_key(tfm); in rsa_sign() 214 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); in rsa_verify() local 215 const struct rsa_key *pkey = rsa_get_key(tfm); in rsa_verify() [all …]
|
D | ablkcipher.c | 111 struct crypto_tfm *tfm = req->base.tfm; in ablkcipher_walk_done() local 142 memcpy(req->info, walk->iv, tfm->crt_ablkcipher.ivsize); in ablkcipher_walk_done() 190 struct crypto_tfm *tfm, in ablkcipher_copy_iv() argument 194 unsigned int ivsize = tfm->crt_ablkcipher.ivsize; in ablkcipher_copy_iv() 228 struct crypto_tfm *tfm = req->base.tfm; in ablkcipher_walk_next() local 233 alignmask = crypto_tfm_alg_alignmask(tfm); in ablkcipher_walk_next() 235 if (unlikely(n < crypto_tfm_alg_blocksize(tfm))) { in ablkcipher_walk_next() 273 struct crypto_tfm *tfm = req->base.tfm; in ablkcipher_walk_first() local 276 alignmask = crypto_tfm_alg_alignmask(tfm); in ablkcipher_walk_first() 287 int err = ablkcipher_copy_iv(walk, tfm, alignmask); in ablkcipher_walk_first() [all …]
|
D | mcryptd.c | 220 static inline struct mcryptd_queue *mcryptd_get_queue(struct crypto_tfm *tfm) in mcryptd_get_queue() argument 222 struct crypto_instance *inst = crypto_tfm_alg_instance(tfm); in mcryptd_get_queue() 275 static int mcryptd_hash_init_tfm(struct crypto_tfm *tfm) in mcryptd_hash_init_tfm() argument 277 struct crypto_instance *inst = crypto_tfm_alg_instance(tfm); in mcryptd_hash_init_tfm() 280 struct mcryptd_hash_ctx *ctx = crypto_tfm_ctx(tfm); in mcryptd_hash_init_tfm() 288 crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm), in mcryptd_hash_init_tfm() 294 static void mcryptd_hash_exit_tfm(struct crypto_tfm *tfm) in mcryptd_hash_exit_tfm() argument 296 struct mcryptd_hash_ctx *ctx = crypto_tfm_ctx(tfm); in mcryptd_hash_exit_tfm() 323 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in mcryptd_hash_enqueue() local 325 mcryptd_get_queue(crypto_ahash_tfm(tfm)); in mcryptd_hash_enqueue() [all …]
|
D | zlib.c | 67 static int zlib_init(struct crypto_tfm *tfm) in zlib_init() argument 72 static void zlib_exit(struct crypto_tfm *tfm) in zlib_exit() argument 74 struct zlib_ctx *ctx = crypto_tfm_ctx(tfm); in zlib_exit() 81 static int zlib_compress_setup(struct crypto_pcomp *tfm, const void *params, in zlib_compress_setup() argument 84 struct zlib_ctx *ctx = crypto_tfm_ctx(crypto_pcomp_tfm(tfm)); in zlib_compress_setup() 130 static int zlib_compress_init(struct crypto_pcomp *tfm) in zlib_compress_init() argument 133 struct zlib_ctx *dctx = crypto_tfm_ctx(crypto_pcomp_tfm(tfm)); in zlib_compress_init() 143 static int zlib_compress_update(struct crypto_pcomp *tfm, in zlib_compress_update() argument 147 struct zlib_ctx *dctx = crypto_tfm_ctx(crypto_pcomp_tfm(tfm)); in zlib_compress_update() 181 static int zlib_compress_final(struct crypto_pcomp *tfm, in zlib_compress_final() argument [all …]
|
D | crypto_null.c | 32 static int null_compress(struct crypto_tfm *tfm, const u8 *src, in null_compress() argument 64 static int null_hash_setkey(struct crypto_shash *tfm, const u8 *key, in null_hash_setkey() argument 68 static int null_setkey(struct crypto_tfm *tfm, const u8 *key, in null_setkey() argument 72 static void null_crypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in null_crypt() argument 158 struct crypto_blkcipher *tfm; in crypto_get_default_null_skcipher() local 161 tfm = crypto_default_null_skcipher; in crypto_get_default_null_skcipher() 163 if (!tfm) { in crypto_get_default_null_skcipher() 164 tfm = crypto_alloc_blkcipher("ecb(cipher_null)", 0, 0); in crypto_get_default_null_skcipher() 165 if (IS_ERR(tfm)) in crypto_get_default_null_skcipher() 168 crypto_default_null_skcipher = tfm; in crypto_get_default_null_skcipher() [all …]
|
D | algif_hash.c | 250 struct algif_hash_tfm *tfm; in hash_check_key() local 260 tfm = pask->private; in hash_check_key() 264 if (!tfm->has_key) in hash_check_key() 355 struct algif_hash_tfm *tfm; in hash_bind() local 358 tfm = kzalloc(sizeof(*tfm), GFP_KERNEL); in hash_bind() 359 if (!tfm) in hash_bind() 364 kfree(tfm); in hash_bind() 368 tfm->hash = hash; in hash_bind() 370 return tfm; in hash_bind() 375 struct algif_hash_tfm *tfm = private; in hash_release() local [all …]
|
D | lzo.c | 30 static int lzo_init(struct crypto_tfm *tfm) in lzo_init() argument 32 struct lzo_ctx *ctx = crypto_tfm_ctx(tfm); in lzo_init() 44 static void lzo_exit(struct crypto_tfm *tfm) in lzo_exit() argument 46 struct lzo_ctx *ctx = crypto_tfm_ctx(tfm); in lzo_exit() 51 static int lzo_compress(struct crypto_tfm *tfm, const u8 *src, in lzo_compress() argument 54 struct lzo_ctx *ctx = crypto_tfm_ctx(tfm); in lzo_compress() 67 static int lzo_decompress(struct crypto_tfm *tfm, const u8 *src, in lzo_decompress() argument
|
D | lz4hc.c | 30 static int lz4hc_init(struct crypto_tfm *tfm) in lz4hc_init() argument 32 struct lz4hc_ctx *ctx = crypto_tfm_ctx(tfm); in lz4hc_init() 41 static void lz4hc_exit(struct crypto_tfm *tfm) in lz4hc_exit() argument 43 struct lz4hc_ctx *ctx = crypto_tfm_ctx(tfm); in lz4hc_exit() 48 static int lz4hc_compress_crypto(struct crypto_tfm *tfm, const u8 *src, in lz4hc_compress_crypto() argument 51 struct lz4hc_ctx *ctx = crypto_tfm_ctx(tfm); in lz4hc_compress_crypto() 64 static int lz4hc_decompress_crypto(struct crypto_tfm *tfm, const u8 *src, in lz4hc_decompress_crypto() argument
|
D | lz4.c | 31 static int lz4_init(struct crypto_tfm *tfm) in lz4_init() argument 33 struct lz4_ctx *ctx = crypto_tfm_ctx(tfm); in lz4_init() 42 static void lz4_exit(struct crypto_tfm *tfm) in lz4_exit() argument 44 struct lz4_ctx *ctx = crypto_tfm_ctx(tfm); in lz4_exit() 48 static int lz4_compress_crypto(struct crypto_tfm *tfm, const u8 *src, in lz4_compress_crypto() argument 51 struct lz4_ctx *ctx = crypto_tfm_ctx(tfm); in lz4_compress_crypto() 64 static int lz4_decompress_crypto(struct crypto_tfm *tfm, const u8 *src, in lz4_decompress_crypto() argument
|
D | xcbc.c | 84 unsigned long alignmask = crypto_shash_alignmask(pdesc->tfm); in crypto_xcbc_digest_init() 86 int bs = crypto_shash_blocksize(pdesc->tfm); in crypto_xcbc_digest_init() 98 struct crypto_shash *parent = pdesc->tfm; in crypto_xcbc_digest_update() 102 struct crypto_cipher *tfm = tctx->child; in crypto_xcbc_digest_update() local 120 crypto_cipher_encrypt_one(tfm, prev, prev); in crypto_xcbc_digest_update() 128 crypto_cipher_encrypt_one(tfm, prev, prev); in crypto_xcbc_digest_update() 144 struct crypto_shash *parent = pdesc->tfm; in crypto_xcbc_digest_final() 148 struct crypto_cipher *tfm = tctx->child; in crypto_xcbc_digest_final() local 172 crypto_cipher_encrypt_one(tfm, out, prev); in crypto_xcbc_digest_final() 177 static int xcbc_init_tfm(struct crypto_tfm *tfm) in xcbc_init_tfm() argument [all …]
|
D | tea.c | 47 static int tea_setkey(struct crypto_tfm *tfm, const u8 *in_key, in tea_setkey() argument 50 struct tea_ctx *ctx = crypto_tfm_ctx(tfm); in tea_setkey() 62 static void tea_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in tea_encrypt() argument 66 struct tea_ctx *ctx = crypto_tfm_ctx(tfm); in tea_encrypt() 90 static void tea_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in tea_decrypt() argument 94 struct tea_ctx *ctx = crypto_tfm_ctx(tfm); in tea_decrypt() 120 static int xtea_setkey(struct crypto_tfm *tfm, const u8 *in_key, in xtea_setkey() argument 123 struct xtea_ctx *ctx = crypto_tfm_ctx(tfm); in xtea_setkey() 135 static void xtea_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in xtea_encrypt() argument 139 struct xtea_ctx *ctx = crypto_tfm_ctx(tfm); in xtea_encrypt() [all …]
|
D | chainiv.c | 83 static int chainiv_init_common(struct crypto_tfm *tfm, char iv[]) in chainiv_init_common() argument 85 struct crypto_ablkcipher *geniv = __crypto_ablkcipher_cast(tfm); in chainiv_init_common() 88 tfm->crt_ablkcipher.reqsize = sizeof(struct ablkcipher_request); in chainiv_init_common() 96 return err ?: skcipher_geniv_init(tfm); in chainiv_init_common() 99 static int chainiv_init(struct crypto_tfm *tfm) in chainiv_init() argument 101 struct crypto_ablkcipher *geniv = __crypto_ablkcipher_cast(tfm); in chainiv_init() 102 struct chainiv_ctx *ctx = crypto_tfm_ctx(tfm); in chainiv_init() 113 return chainiv_init_common(tfm, iv); in chainiv_init() 230 static int async_chainiv_init(struct crypto_tfm *tfm) in async_chainiv_init() argument 232 struct crypto_ablkcipher *geniv = __crypto_ablkcipher_cast(tfm); in async_chainiv_init() [all …]
|
D | cmac.c | 110 unsigned long alignmask = crypto_shash_alignmask(pdesc->tfm); in crypto_cmac_digest_init() 112 int bs = crypto_shash_blocksize(pdesc->tfm); in crypto_cmac_digest_init() 124 struct crypto_shash *parent = pdesc->tfm; in crypto_cmac_digest_update() 128 struct crypto_cipher *tfm = tctx->child; in crypto_cmac_digest_update() local 146 crypto_cipher_encrypt_one(tfm, prev, prev); in crypto_cmac_digest_update() 154 crypto_cipher_encrypt_one(tfm, prev, prev); in crypto_cmac_digest_update() 170 struct crypto_shash *parent = pdesc->tfm; in crypto_cmac_digest_final() 174 struct crypto_cipher *tfm = tctx->child; in crypto_cmac_digest_final() local 198 crypto_cipher_encrypt_one(tfm, out, prev); in crypto_cmac_digest_final() 203 static int cmac_init_tfm(struct crypto_tfm *tfm) in cmac_init_tfm() argument [all …]
|
D | hmac.c | 37 static inline struct hmac_ctx *hmac_ctx(struct crypto_shash *tfm) in hmac_ctx() argument 39 return align_ptr(crypto_shash_ctx_aligned(tfm) + in hmac_ctx() 40 crypto_shash_statesize(tfm) * 2, in hmac_ctx() 58 shash->tfm = hash; in hmac_setkey() 101 struct hmac_ctx *ctx = hmac_ctx(pdesc->tfm); in hmac_import() 103 desc->tfm = ctx->hash; in hmac_import() 111 return hmac_import(pdesc, crypto_shash_ctx_aligned(pdesc->tfm)); in hmac_init() 126 struct crypto_shash *parent = pdesc->tfm; in hmac_final() 143 struct crypto_shash *parent = pdesc->tfm; in hmac_finup() 156 static int hmac_init_tfm(struct crypto_tfm *tfm) in hmac_init_tfm() argument [all …]
|
D | ahash.c | 181 walk->alignmask = crypto_hash_alignmask(hdesc->tfm); in crypto_hash_walk_first_compat() 188 static int ahash_setkey_unaligned(struct crypto_ahash *tfm, const u8 *key, in ahash_setkey_unaligned() argument 191 unsigned long alignmask = crypto_ahash_alignmask(tfm); in ahash_setkey_unaligned() 203 ret = tfm->setkey(tfm, alignbuffer, keylen); in ahash_setkey_unaligned() 208 int crypto_ahash_setkey(struct crypto_ahash *tfm, const u8 *key, in crypto_ahash_setkey() argument 211 unsigned long alignmask = crypto_ahash_alignmask(tfm); in crypto_ahash_setkey() 214 return ahash_setkey_unaligned(tfm, key, keylen); in crypto_ahash_setkey() 216 return tfm->setkey(tfm, key, keylen); in crypto_ahash_setkey() 220 static int ahash_nosetkey(struct crypto_ahash *tfm, const u8 *key, in ahash_nosetkey() argument 234 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in ahash_save_req() local [all …]
|
D | cts.c | 80 int bsize = crypto_blkcipher_blocksize(desc->tfm); in cts_cbc_encrypt() 100 lcldesc.tfm = ctx->child; in cts_cbc_encrypt() 129 struct crypto_cts_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in crypto_cts_encrypt() 130 int bsize = crypto_blkcipher_blocksize(desc->tfm); in crypto_cts_encrypt() 136 lcldesc.tfm = ctx->child; in crypto_cts_encrypt() 166 int bsize = crypto_blkcipher_blocksize(desc->tfm); in cts_cbc_decrypt() 183 lcldesc.tfm = ctx->child; in cts_cbc_decrypt() 224 struct crypto_cts_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in crypto_cts_decrypt() 225 int bsize = crypto_blkcipher_blocksize(desc->tfm); in crypto_cts_decrypt() 231 lcldesc.tfm = ctx->child; in crypto_cts_decrypt() [all …]
|
D | jitterentropy-kcapi.c | 121 static int jent_kcapi_init(struct crypto_tfm *tfm) in jent_kcapi_init() argument 123 struct jitterentropy *rng = crypto_tfm_ctx(tfm); in jent_kcapi_init() 134 static void jent_kcapi_cleanup(struct crypto_tfm *tfm) in jent_kcapi_cleanup() argument 136 struct jitterentropy *rng = crypto_tfm_ctx(tfm); in jent_kcapi_cleanup() 145 static int jent_kcapi_random(struct crypto_rng *tfm, in jent_kcapi_random() argument 149 struct jitterentropy *rng = crypto_rng_ctx(tfm); in jent_kcapi_random() 159 static int jent_kcapi_reset(struct crypto_rng *tfm, in jent_kcapi_reset() argument
|
D | crc32c_generic.c | 63 struct chksum_ctx *mctx = crypto_shash_ctx(desc->tfm); in chksum_init() 76 static int chksum_setkey(struct crypto_shash *tfm, const u8 *key, in chksum_setkey() argument 79 struct chksum_ctx *mctx = crypto_shash_ctx(tfm); in chksum_setkey() 82 crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); in chksum_setkey() 123 struct chksum_ctx *mctx = crypto_shash_ctx(desc->tfm); in chksum_digest() 128 static int crc32c_cra_init(struct crypto_tfm *tfm) in crc32c_cra_init() argument 130 struct chksum_ctx *mctx = crypto_tfm_ctx(tfm); in crc32c_cra_init()
|
D | tcrypt.c | 56 #define get_driver_name(tfm_type, tfm) crypto_tfm_alg_driver_name(tfm_type ## _tfm(tfm)) argument 307 struct crypto_aead *tfm; in test_aead_speed() local 349 tfm = crypto_alloc_aead(algo, 0, 0); in test_aead_speed() 351 if (IS_ERR(tfm)) { in test_aead_speed() 353 PTR_ERR(tfm)); in test_aead_speed() 359 get_driver_name(crypto_aead, tfm), e); in test_aead_speed() 361 req = aead_request_alloc(tfm, GFP_KERNEL); in test_aead_speed() 392 ret = crypto_aead_setkey(tfm, key, *keysize); in test_aead_speed() 393 ret = crypto_aead_setauthsize(tfm, authsize); in test_aead_speed() 395 iv_len = crypto_aead_ivsize(tfm); in test_aead_speed() [all …]
|
D | deflate.c | 104 static int deflate_init(struct crypto_tfm *tfm) in deflate_init() argument 106 struct deflate_ctx *ctx = crypto_tfm_ctx(tfm); in deflate_init() 119 static void deflate_exit(struct crypto_tfm *tfm) in deflate_exit() argument 121 struct deflate_ctx *ctx = crypto_tfm_ctx(tfm); in deflate_exit() 127 static int deflate_compress(struct crypto_tfm *tfm, const u8 *src, in deflate_compress() argument 131 struct deflate_ctx *dctx = crypto_tfm_ctx(tfm); in deflate_compress() 156 static int deflate_decompress(struct crypto_tfm *tfm, const u8 *src, in deflate_decompress() argument 161 struct deflate_ctx *dctx = crypto_tfm_ctx(tfm); in deflate_decompress()
|
D | algif_skcipher.c | 302 struct crypto_skcipher *tfm = skc->skcipher; in skcipher_sendmsg() local 303 unsigned ivsize = crypto_skcipher_ivsize(tfm); in skcipher_sendmsg() 508 struct crypto_skcipher *tfm = skc->skcipher; in skcipher_recvmsg_async() local 515 unsigned int reqsize = crypto_skcipher_reqsize(tfm); in skcipher_recvmsg_async() 516 unsigned int ivsize = crypto_skcipher_ivsize(tfm); in skcipher_recvmsg_async() 538 skcipher_request_set_tfm(req, tfm); in skcipher_recvmsg_async() 644 struct crypto_skcipher *tfm = skc->skcipher; in skcipher_recvmsg_sync() local 645 unsigned bs = crypto_skcipher_blocksize(tfm); in skcipher_recvmsg_sync() 765 struct skcipher_tfm *tfm; in skcipher_check_key() local 775 tfm = pask->private; in skcipher_check_key() [all …]
|
D | ghash-generic.c | 44 static int ghash_setkey(struct crypto_shash *tfm, in ghash_setkey() argument 47 struct ghash_ctx *ctx = crypto_shash_ctx(tfm); in ghash_setkey() 50 crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); in ghash_setkey() 67 struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm); in ghash_update() 122 struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm); in ghash_final() 134 static void ghash_exit_tfm(struct crypto_tfm *tfm) in ghash_exit_tfm() argument 136 struct ghash_ctx *ctx = crypto_tfm_ctx(tfm); in ghash_exit_tfm()
|
D | keywrap.c | 139 struct crypto_blkcipher *tfm = desc->tfm; in crypto_kw_decrypt() local 140 struct crypto_kw_ctx *ctx = crypto_blkcipher_ctx(tfm); in crypto_kw_decrypt() 224 struct crypto_blkcipher *tfm = desc->tfm; in crypto_kw_encrypt() local 225 struct crypto_kw_ctx *ctx = crypto_blkcipher_ctx(tfm); in crypto_kw_encrypt() 321 static int crypto_kw_init_tfm(struct crypto_tfm *tfm) in crypto_kw_init_tfm() argument 323 struct crypto_instance *inst = crypto_tfm_alg_instance(tfm); in crypto_kw_init_tfm() 325 struct crypto_kw_ctx *ctx = crypto_tfm_ctx(tfm); in crypto_kw_init_tfm() 336 static void crypto_kw_exit_tfm(struct crypto_tfm *tfm) in crypto_kw_exit_tfm() argument 338 struct crypto_kw_ctx *ctx = crypto_tfm_ctx(tfm); in crypto_kw_exit_tfm()
|
D | ccm.c | 87 struct crypto_cipher *tfm = ctx->cipher; in crypto_ccm_setkey() local 99 crypto_cipher_clear_flags(tfm, CRYPTO_TFM_REQ_MASK); in crypto_ccm_setkey() 100 crypto_cipher_set_flags(tfm, crypto_aead_get_flags(aead) & in crypto_ccm_setkey() 102 err = crypto_cipher_setkey(tfm, key, keylen); in crypto_ccm_setkey() 103 crypto_aead_set_flags(aead, crypto_cipher_get_flags(tfm) & in crypto_ccm_setkey() 110 static int crypto_ccm_setauthsize(struct crypto_aead *tfm, in crypto_ccm_setauthsize() argument 170 static void compute_mac(struct crypto_cipher *tfm, u8 *data, int n, in compute_mac() argument 185 crypto_cipher_encrypt_one(tfm, odata, odata); in compute_mac() 194 crypto_cipher_encrypt_one(tfm, odata, odata); in compute_mac() 209 static void get_data_to_compute(struct crypto_cipher *tfm, in get_data_to_compute() argument [all …]
|
D | xts.c | 82 struct crypto_tfm *tfm; member 89 s->fn(s->tfm, dst, dst); /* CC <- E(Key1,PP) */ in xts_round() 102 .tfm = crypto_cipher_tfm(ctx->child), in crypt() 150 struct priv *ctx = crypto_blkcipher_ctx(desc->tfm); in encrypt() 161 struct priv *ctx = crypto_blkcipher_ctx(desc->tfm); in decrypt() 241 static int init_tfm(struct crypto_tfm *tfm) in init_tfm() argument 244 struct crypto_instance *inst = (void *)tfm->__crt_alg; in init_tfm() 246 struct priv *ctx = crypto_tfm_ctx(tfm); in init_tfm() 247 u32 *flags = &tfm->crt_flags; in init_tfm() 280 static void exit_tfm(struct crypto_tfm *tfm) in exit_tfm() argument [all …]
|
D | drbg.c | 1611 static void drbg_kcapi_set_entropy(struct crypto_rng *tfm, in drbg_kcapi_set_entropy() argument 1614 struct drbg_state *drbg = crypto_rng_ctx(tfm); in drbg_kcapi_set_entropy() 1634 struct crypto_shash *tfm; in drbg_init_hash_kernel() local 1636 tfm = crypto_alloc_shash(drbg->core->backend_cra_name, 0, 0); in drbg_init_hash_kernel() 1637 if (IS_ERR(tfm)) { in drbg_init_hash_kernel() 1640 return PTR_ERR(tfm); in drbg_init_hash_kernel() 1642 BUG_ON(drbg_blocklen(drbg) != crypto_shash_digestsize(tfm)); in drbg_init_hash_kernel() 1643 sdesc = kzalloc(sizeof(struct shash_desc) + crypto_shash_descsize(tfm), in drbg_init_hash_kernel() 1646 crypto_free_shash(tfm); in drbg_init_hash_kernel() 1650 sdesc->shash.tfm = tfm; in drbg_init_hash_kernel() [all …]
|
D | lrw.c | 101 struct crypto_tfm *tfm; member 115 s->fn(s->tfm, dst, dst); /* CC <- E(Key2,PP) */ in lrw_round() 146 .tfm = crypto_cipher_tfm(ctx->child), in crypt() 198 struct priv *ctx = crypto_blkcipher_ctx(desc->tfm); in encrypt() 209 struct priv *ctx = crypto_blkcipher_ctx(desc->tfm); in decrypt() 296 static int init_tfm(struct crypto_tfm *tfm) in init_tfm() argument 299 struct crypto_instance *inst = (void *)tfm->__crt_alg; in init_tfm() 301 struct priv *ctx = crypto_tfm_ctx(tfm); in init_tfm() 302 u32 *flags = &tfm->crt_flags; in init_tfm() 318 static void exit_tfm(struct crypto_tfm *tfm) in exit_tfm() argument [all …]
|
D | rng.c | 35 static inline struct crypto_rng *__crypto_rng_cast(struct crypto_tfm *tfm) in __crypto_rng_cast() argument 37 return container_of(tfm, struct crypto_rng, base); in __crypto_rng_cast() 40 int crypto_rng_reset(struct crypto_rng *tfm, const u8 *seed, unsigned int slen) in crypto_rng_reset() argument 54 err = crypto_rng_alg(tfm)->seed(tfm, seed, slen); in crypto_rng_reset() 61 static int crypto_rng_init_tfm(struct crypto_tfm *tfm) in crypto_rng_init_tfm() argument
|
D | khazad.c | 756 static int khazad_setkey(struct crypto_tfm *tfm, const u8 *in_key, in khazad_setkey() argument 759 struct khazad_ctx *ctx = crypto_tfm_ctx(tfm); in khazad_setkey() 837 static void khazad_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in khazad_encrypt() argument 839 struct khazad_ctx *ctx = crypto_tfm_ctx(tfm); in khazad_encrypt() 843 static void khazad_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in khazad_decrypt() argument 845 struct khazad_ctx *ctx = crypto_tfm_ctx(tfm); in khazad_decrypt()
|
D | akcipher.c | 56 static void crypto_akcipher_exit_tfm(struct crypto_tfm *tfm) in crypto_akcipher_exit_tfm() argument 58 struct crypto_akcipher *akcipher = __crypto_akcipher_tfm(tfm); in crypto_akcipher_exit_tfm() 64 static int crypto_akcipher_init_tfm(struct crypto_tfm *tfm) in crypto_akcipher_init_tfm() argument 66 struct crypto_akcipher *akcipher = __crypto_akcipher_tfm(tfm); in crypto_akcipher_init_tfm()
|
D | 842.c | 39 static int crypto842_compress(struct crypto_tfm *tfm, in crypto842_compress() argument 43 struct crypto842_ctx *ctx = crypto_tfm_ctx(tfm); in crypto842_compress() 48 static int crypto842_decompress(struct crypto_tfm *tfm, in crypto842_decompress() argument
|
D | arc4.c | 29 static int arc4_set_key(struct crypto_tfm *tfm, const u8 *in_key, in arc4_set_key() argument 32 struct arc4_ctx *ctx = crypto_tfm_ctx(tfm); in arc4_set_key() 90 static void arc4_crypt_one(struct crypto_tfm *tfm, u8 *out, const u8 *in) in arc4_crypt_one() argument 92 arc4_crypt(crypto_tfm_ctx(tfm), out, in, 1); in arc4_crypt_one() 98 struct arc4_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in ecb_arc4_crypt()
|
D | crc32.c | 48 static int crc32_cra_init(struct crypto_tfm *tfm) in crc32_cra_init() argument 50 u32 *key = crypto_tfm_ctx(tfm); in crc32_cra_init() 78 u32 *mctx = crypto_shash_ctx(desc->tfm); in crc32_init() 120 return __crc32_finup(crypto_shash_ctx(desc->tfm), data, len, in crc32_digest()
|
D | anubis.c | 462 static int anubis_setkey(struct crypto_tfm *tfm, const u8 *in_key, in anubis_setkey() argument 465 struct anubis_ctx *ctx = crypto_tfm_ctx(tfm); in anubis_setkey() 467 u32 *flags = &tfm->crt_flags; in anubis_setkey() 662 static void anubis_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in anubis_encrypt() argument 664 struct anubis_ctx *ctx = crypto_tfm_ctx(tfm); in anubis_encrypt() 668 static void anubis_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in anubis_decrypt() argument 670 struct anubis_ctx *ctx = crypto_tfm_ctx(tfm); in anubis_decrypt()
|
D | internal.h | 76 int crypto_init_cipher_ops(struct crypto_tfm *tfm); 77 int crypto_init_compress_ops(struct crypto_tfm *tfm); 79 void crypto_exit_cipher_ops(struct crypto_tfm *tfm); 80 void crypto_exit_compress_ops(struct crypto_tfm *tfm);
|
D | michael_mic.c | 53 struct michael_mic_ctx *ctx = crypto_shash_ctx(desc->tfm); in michael_init() 136 static int michael_setkey(struct crypto_shash *tfm, const u8 *key, in michael_setkey() argument 139 struct michael_mic_ctx *mctx = crypto_shash_ctx(tfm); in michael_setkey() 144 crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); in michael_setkey()
|
D | seed.c | 331 static int seed_set_key(struct crypto_tfm *tfm, const u8 *in_key, in seed_set_key() argument 334 struct seed_ctx *ctx = crypto_tfm_ctx(tfm); in seed_set_key() 368 static void seed_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in seed_encrypt() argument 370 const struct seed_ctx *ctx = crypto_tfm_ctx(tfm); in seed_encrypt() 406 static void seed_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in seed_decrypt() argument 408 const struct seed_ctx *ctx = crypto_tfm_ctx(tfm); in seed_decrypt()
|
D | chacha20poly1305.c | 173 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in poly_tail() local 174 struct chachapoly_ctx *ctx = crypto_aead_ctx(tfm); in poly_tail() 372 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in poly_genkey() local 373 struct chachapoly_ctx *ctx = crypto_aead_ctx(tfm); in poly_genkey() 380 if (crypto_aead_ivsize(tfm) == 8) { in poly_genkey() 505 static int chachapoly_setauthsize(struct crypto_aead *tfm, in chachapoly_setauthsize() argument 514 static int chachapoly_init(struct crypto_aead *tfm) in chachapoly_init() argument 516 struct aead_instance *inst = aead_alg_instance(tfm); in chachapoly_init() 518 struct chachapoly_ctx *ctx = crypto_aead_ctx(tfm); in chachapoly_init() 537 align = crypto_aead_alignmask(tfm); in chachapoly_init() [all …]
|
D | blowfish_generic.c | 41 static void bf_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in bf_encrypt() argument 43 struct bf_ctx *ctx = crypto_tfm_ctx(tfm); in bf_encrypt() 75 static void bf_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in bf_decrypt() argument 77 struct bf_ctx *ctx = crypto_tfm_ctx(tfm); in bf_decrypt()
|
D | algapi.c | 677 struct crypto_tfm *tfm; in crypto_spawn_tfm() local 683 tfm = ERR_PTR(-EINVAL); in crypto_spawn_tfm() 687 tfm = __crypto_alloc_tfm(alg, type, mask); in crypto_spawn_tfm() 688 if (IS_ERR(tfm)) in crypto_spawn_tfm() 691 return tfm; in crypto_spawn_tfm() 695 return tfm; in crypto_spawn_tfm() 702 struct crypto_tfm *tfm; in crypto_spawn_tfm2() local 708 tfm = crypto_create_tfm(alg, spawn->frontend); in crypto_spawn_tfm2() 709 if (IS_ERR(tfm)) in crypto_spawn_tfm2() 712 return tfm; in crypto_spawn_tfm2() [all …]
|
D | twofish_generic.c | 109 static void twofish_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in twofish_encrypt() argument 111 struct twofish_ctx *ctx = crypto_tfm_ctx(tfm); in twofish_encrypt() 146 static void twofish_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in twofish_decrypt() argument 148 struct twofish_ctx *ctx = crypto_tfm_ctx(tfm); in twofish_decrypt()
|
D | gcm.c | 176 static int crypto_gcm_setauthsize(struct crypto_aead *tfm, in crypto_gcm_setauthsize() argument 564 static int crypto_gcm_init_tfm(struct crypto_aead *tfm) in crypto_gcm_init_tfm() argument 566 struct aead_instance *inst = aead_alg_instance(tfm); in crypto_gcm_init_tfm() 568 struct crypto_gcm_ctx *ctx = crypto_aead_ctx(tfm); in crypto_gcm_init_tfm() 586 align = crypto_aead_alignmask(tfm); in crypto_gcm_init_tfm() 588 crypto_aead_set_reqsize(tfm, in crypto_gcm_init_tfm() 602 static void crypto_gcm_exit_tfm(struct crypto_aead *tfm) in crypto_gcm_exit_tfm() argument 604 struct crypto_gcm_ctx *ctx = crypto_aead_ctx(tfm); in crypto_gcm_exit_tfm() 884 static int crypto_rfc4106_init_tfm(struct crypto_aead *tfm) in crypto_rfc4106_init_tfm() argument 886 struct aead_instance *inst = aead_alg_instance(tfm); in crypto_rfc4106_init_tfm() [all …]
|
D | cast6_generic.c | 157 int cast6_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) in cast6_setkey() argument 159 return __cast6_setkey(crypto_tfm_ctx(tfm), key, keylen, in cast6_setkey() 160 &tfm->crt_flags); in cast6_setkey() 217 static void cast6_encrypt(struct crypto_tfm *tfm, u8 *outbuf, const u8 *inbuf) in cast6_encrypt() argument 219 __cast6_encrypt(crypto_tfm_ctx(tfm), outbuf, inbuf); in cast6_encrypt() 255 static void cast6_decrypt(struct crypto_tfm *tfm, u8 *outbuf, const u8 *inbuf) in cast6_decrypt() argument 257 __cast6_decrypt(crypto_tfm_ctx(tfm), outbuf, inbuf); in cast6_decrypt()
|
D | salsa20_generic.c | 169 static int setkey(struct crypto_tfm *tfm, const u8 *key, in setkey() argument 172 struct salsa20_ctx *ctx = crypto_tfm_ctx(tfm); in setkey() 182 struct crypto_blkcipher *tfm = desc->tfm; in encrypt() local 183 struct salsa20_ctx *ctx = crypto_blkcipher_ctx(tfm); in encrypt()
|
D | des_generic.c | 781 static int des_setkey(struct crypto_tfm *tfm, const u8 *key, in des_setkey() argument 784 struct des_ctx *dctx = crypto_tfm_ctx(tfm); in des_setkey() 785 u32 *flags = &tfm->crt_flags; in des_setkey() 803 static void des_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in des_encrypt() argument 805 struct des_ctx *ctx = crypto_tfm_ctx(tfm); in des_encrypt() 826 static void des_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in des_decrypt() argument 828 struct des_ctx *ctx = crypto_tfm_ctx(tfm); in des_decrypt() 882 static int des3_ede_setkey(struct crypto_tfm *tfm, const u8 *key, in des3_ede_setkey() argument 885 struct des3_ede_ctx *dctx = crypto_tfm_ctx(tfm); in des3_ede_setkey() 886 u32 *flags = &tfm->crt_flags; in des3_ede_setkey() [all …]
|
/linux-4.4.14/security/integrity/ima/ |
D | ima_crypto.c | 86 struct crypto_shash *tfm = ima_shash_tfm; in ima_alloc_tfm() local 93 tfm = crypto_alloc_shash(hash_algo_name[algo], 0, 0); in ima_alloc_tfm() 94 if (IS_ERR(tfm)) { in ima_alloc_tfm() 95 rc = PTR_ERR(tfm); in ima_alloc_tfm() 100 return tfm; in ima_alloc_tfm() 103 static void ima_free_tfm(struct crypto_shash *tfm) in ima_free_tfm() argument 105 if (tfm != ima_shash_tfm) in ima_free_tfm() 106 crypto_free_shash(tfm); in ima_free_tfm() 173 struct crypto_ahash *tfm = ima_ahash_tfm; in ima_alloc_atfm() local 179 if (algo != ima_hash_algo || !tfm) { in ima_alloc_atfm() [all …]
|
/linux-4.4.14/arch/s390/crypto/ |
D | aes_s390.c | 95 static int setkey_fallback_cip(struct crypto_tfm *tfm, const u8 *in_key, in setkey_fallback_cip() argument 98 struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm); in setkey_fallback_cip() 102 sctx->fallback.cip->base.crt_flags |= (tfm->crt_flags & in setkey_fallback_cip() 107 tfm->crt_flags &= ~CRYPTO_TFM_RES_MASK; in setkey_fallback_cip() 108 tfm->crt_flags |= (sctx->fallback.cip->base.crt_flags & in setkey_fallback_cip() 114 static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in aes_set_key() argument 117 struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm); in aes_set_key() 118 u32 *flags = &tfm->crt_flags; in aes_set_key() 133 return setkey_fallback_cip(tfm, in_key, key_len); in aes_set_key() 136 static void aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in aes_encrypt() argument [all …]
|
D | des_s390.c | 36 static int des_setkey(struct crypto_tfm *tfm, const u8 *key, in des_setkey() argument 39 struct s390_des_ctx *ctx = crypto_tfm_ctx(tfm); in des_setkey() 40 u32 *flags = &tfm->crt_flags; in des_setkey() 53 static void des_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in des_encrypt() argument 55 struct s390_des_ctx *ctx = crypto_tfm_ctx(tfm); in des_encrypt() 60 static void des_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in des_decrypt() argument 62 struct s390_des_ctx *ctx = crypto_tfm_ctx(tfm); in des_decrypt() 112 struct s390_des_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in cbc_desall_crypt() 148 struct s390_des_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in ecb_des_encrypt() 159 struct s390_des_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in ecb_des_decrypt() [all …]
|
D | ghash_s390.c | 33 struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm); in ghash_init() 41 static int ghash_setkey(struct crypto_shash *tfm, in ghash_setkey() argument 44 struct ghash_ctx *ctx = crypto_shash_ctx(tfm); in ghash_setkey() 47 crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); in ghash_setkey()
|
D | sha_common.c | 24 unsigned int bsize = crypto_shash_blocksize(desc->tfm); in s390_sha_update() 66 unsigned int bsize = crypto_shash_blocksize(desc->tfm); in s390_sha_final() 97 memcpy(out, ctx->state, crypto_shash_digestsize(desc->tfm)); in s390_sha_final()
|
/linux-4.4.14/net/mac80211/ |
D | aes_gcm.c | 18 void ieee80211_aes_gcm_encrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad, in ieee80211_aes_gcm_encrypt() argument 24 crypto_aead_reqsize(tfm)] in ieee80211_aes_gcm_encrypt() 35 aead_request_set_tfm(aead_req, tfm); in ieee80211_aes_gcm_encrypt() 42 int ieee80211_aes_gcm_decrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad, in ieee80211_aes_gcm_decrypt() argument 47 crypto_aead_reqsize(tfm)] in ieee80211_aes_gcm_decrypt() 61 aead_request_set_tfm(aead_req, tfm); in ieee80211_aes_gcm_decrypt() 72 struct crypto_aead *tfm; in ieee80211_aes_gcm_key_setup_encrypt() local 75 tfm = crypto_alloc_aead("gcm(aes)", 0, CRYPTO_ALG_ASYNC); in ieee80211_aes_gcm_key_setup_encrypt() 76 if (IS_ERR(tfm)) in ieee80211_aes_gcm_key_setup_encrypt() 77 return tfm; in ieee80211_aes_gcm_key_setup_encrypt() [all …]
|
D | aes_ccm.c | 21 void ieee80211_aes_ccm_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, in ieee80211_aes_ccm_encrypt() argument 28 crypto_aead_reqsize(tfm)] in ieee80211_aes_ccm_encrypt() 39 aead_request_set_tfm(aead_req, tfm); in ieee80211_aes_ccm_encrypt() 46 int ieee80211_aes_ccm_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, in ieee80211_aes_ccm_decrypt() argument 52 crypto_aead_reqsize(tfm)] in ieee80211_aes_ccm_decrypt() 66 aead_request_set_tfm(aead_req, tfm); in ieee80211_aes_ccm_decrypt() 77 struct crypto_aead *tfm; in ieee80211_aes_key_setup_encrypt() local 80 tfm = crypto_alloc_aead("ccm(aes)", 0, CRYPTO_ALG_ASYNC); in ieee80211_aes_key_setup_encrypt() 81 if (IS_ERR(tfm)) in ieee80211_aes_key_setup_encrypt() 82 return tfm; in ieee80211_aes_key_setup_encrypt() [all …]
|
D | aes_gmac.c | 24 int ieee80211_aes_gmac(struct crypto_aead *tfm, const u8 *aad, u8 *nonce, in ieee80211_aes_gmac() argument 29 crypto_aead_reqsize(tfm)] in ieee80211_aes_gmac() 50 aead_request_set_tfm(aead_req, tfm); in ieee80211_aes_gmac() 62 struct crypto_aead *tfm; in ieee80211_aes_gmac_key_setup() local 65 tfm = crypto_alloc_aead("gcm(aes)", 0, CRYPTO_ALG_ASYNC); in ieee80211_aes_gmac_key_setup() 66 if (IS_ERR(tfm)) in ieee80211_aes_gmac_key_setup() 67 return tfm; in ieee80211_aes_gmac_key_setup() 69 err = crypto_aead_setkey(tfm, key, key_len); in ieee80211_aes_gmac_key_setup() 71 err = crypto_aead_setauthsize(tfm, GMAC_MIC_LEN); in ieee80211_aes_gmac_key_setup() 73 return tfm; in ieee80211_aes_gmac_key_setup() [all …]
|
D | aes_cmac.c | 38 static void aes_cmac_vector(struct crypto_cipher *tfm, size_t num_elem, in aes_cmac_vector() argument 67 crypto_cipher_encrypt_one(tfm, cbc, cbc); in aes_cmac_vector() 72 crypto_cipher_encrypt_one(tfm, pad, pad); in aes_cmac_vector() 90 crypto_cipher_encrypt_one(tfm, pad, pad); in aes_cmac_vector() 95 void ieee80211_aes_cmac(struct crypto_cipher *tfm, const u8 *aad, in ieee80211_aes_cmac() argument 110 aes_cmac_vector(tfm, 3, addr, len, mic, CMAC_TLEN); in ieee80211_aes_cmac() 113 void ieee80211_aes_cmac_256(struct crypto_cipher *tfm, const u8 *aad, in ieee80211_aes_cmac_256() argument 128 aes_cmac_vector(tfm, 3, addr, len, mic, CMAC_TLEN_256); in ieee80211_aes_cmac_256() 134 struct crypto_cipher *tfm; in ieee80211_aes_cmac_key_setup() local 136 tfm = crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC); in ieee80211_aes_cmac_key_setup() [all …]
|
D | aes_cmac.h | 16 void ieee80211_aes_cmac(struct crypto_cipher *tfm, const u8 *aad, 18 void ieee80211_aes_cmac_256(struct crypto_cipher *tfm, const u8 *aad, 20 void ieee80211_aes_cmac_key_free(struct crypto_cipher *tfm);
|
D | aes_gcm.h | 14 void ieee80211_aes_gcm_encrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad, 16 int ieee80211_aes_gcm_decrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad, 20 void ieee80211_aes_gcm_key_free(struct crypto_aead *tfm);
|
D | aes_ccm.h | 18 void ieee80211_aes_ccm_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, 21 int ieee80211_aes_ccm_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, 24 void ieee80211_aes_key_free(struct crypto_aead *tfm);
|
D | key.h | 87 struct crypto_aead *tfm; member 92 struct crypto_cipher *tfm; member 98 struct crypto_aead *tfm; member 109 struct crypto_aead *tfm; member
|
D | wep.c | 134 int ieee80211_wep_encrypt_data(struct crypto_cipher *tfm, u8 *rc4key, in ieee80211_wep_encrypt_data() argument 140 if (IS_ERR(tfm)) in ieee80211_wep_encrypt_data() 146 crypto_cipher_setkey(tfm, rc4key, klen); in ieee80211_wep_encrypt_data() 148 crypto_cipher_encrypt_one(tfm, data + i, data + i); in ieee80211_wep_encrypt_data() 195 int ieee80211_wep_decrypt_data(struct crypto_cipher *tfm, u8 *rc4key, in ieee80211_wep_decrypt_data() argument 201 if (IS_ERR(tfm)) in ieee80211_wep_decrypt_data() 204 crypto_cipher_setkey(tfm, rc4key, klen); in ieee80211_wep_decrypt_data() 206 crypto_cipher_decrypt_one(tfm, data + i, data + i); in ieee80211_wep_decrypt_data()
|
D | aes_gmac.h | 16 int ieee80211_aes_gmac(struct crypto_aead *tfm, const u8 *aad, u8 *nonce, 18 void ieee80211_aes_gmac_key_free(struct crypto_aead *tfm);
|
D | key.c | 432 key->u.ccmp.tfm = ieee80211_aes_key_setup_encrypt( in ieee80211_key_alloc() 434 if (IS_ERR(key->u.ccmp.tfm)) { in ieee80211_key_alloc() 435 err = PTR_ERR(key->u.ccmp.tfm); in ieee80211_key_alloc() 450 key->u.ccmp.tfm = ieee80211_aes_key_setup_encrypt( in ieee80211_key_alloc() 452 if (IS_ERR(key->u.ccmp.tfm)) { in ieee80211_key_alloc() 453 err = PTR_ERR(key->u.ccmp.tfm); in ieee80211_key_alloc() 473 key->u.aes_cmac.tfm = in ieee80211_key_alloc() 475 if (IS_ERR(key->u.aes_cmac.tfm)) { in ieee80211_key_alloc() 476 err = PTR_ERR(key->u.aes_cmac.tfm); in ieee80211_key_alloc() 492 key->u.aes_gmac.tfm = in ieee80211_key_alloc() [all …]
|
D | tkip.h | 18 int ieee80211_tkip_encrypt_data(struct crypto_cipher *tfm, 29 int ieee80211_tkip_decrypt_data(struct crypto_cipher *tfm,
|
D | wep.h | 21 int ieee80211_wep_encrypt_data(struct crypto_cipher *tfm, u8 *rc4key, 26 int ieee80211_wep_decrypt_data(struct crypto_cipher *tfm, u8 *rc4key,
|
/linux-4.4.14/drivers/crypto/ |
D | geode-aes.c | 116 static int geode_setkey_cip(struct crypto_tfm *tfm, const u8 *key, in geode_setkey_cip() argument 119 struct geode_aes_op *op = crypto_tfm_ctx(tfm); in geode_setkey_cip() 131 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in geode_setkey_cip() 139 op->fallback.cip->base.crt_flags |= (tfm->crt_flags & CRYPTO_TFM_REQ_MASK); in geode_setkey_cip() 143 tfm->crt_flags &= ~CRYPTO_TFM_RES_MASK; in geode_setkey_cip() 144 tfm->crt_flags |= (op->fallback.cip->base.crt_flags & CRYPTO_TFM_RES_MASK); in geode_setkey_cip() 149 static int geode_setkey_blk(struct crypto_tfm *tfm, const u8 *key, in geode_setkey_blk() argument 152 struct geode_aes_op *op = crypto_tfm_ctx(tfm); in geode_setkey_blk() 164 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in geode_setkey_blk() 172 op->fallback.blk->base.crt_flags |= (tfm->crt_flags & CRYPTO_TFM_REQ_MASK); in geode_setkey_blk() [all …]
|
D | ixp4xx_crypto.c | 147 struct crypto_tfm *tfm; member 245 static inline u32 cipher_cfg_enc(struct crypto_tfm *tfm) in cipher_cfg_enc() argument 247 return container_of(tfm->__crt_alg, struct ixp_alg,crypto)->cfg_enc; in cipher_cfg_enc() 250 static inline u32 cipher_cfg_dec(struct crypto_tfm *tfm) in cipher_cfg_dec() argument 252 return container_of(tfm->__crt_alg, struct ixp_alg,crypto)->cfg_dec; in cipher_cfg_dec() 255 static inline const struct ix_hash_algo *ix_hash(struct crypto_tfm *tfm) in ix_hash() argument 257 return container_of(tfm->__crt_alg, struct ixp_alg, crypto)->hash; in ix_hash() 350 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in finish_scattered_hmac() local 351 int authsize = crypto_aead_authsize(tfm); in finish_scattered_hmac() 397 ctx = crypto_tfm_ctx(crypt->data.tfm); in one_packet() [all …]
|
D | mxs-dcp.c | 254 struct dcp_async_ctx *actx = crypto_tfm_ctx(arq->tfm); in mxs_dcp_aes_block_crypt() 377 struct crypto_tfm *tfm = in mxs_dcp_block_fallback() local 390 ablkcipher_request_set_tfm(req, __crypto_ablkcipher_cast(tfm)); in mxs_dcp_block_fallback() 399 struct dcp_async_ctx *actx = crypto_tfm_ctx(arq->tfm); in mxs_dcp_aes_enqueue() 439 static int mxs_dcp_aes_setkey(struct crypto_ablkcipher *tfm, const u8 *key, in mxs_dcp_aes_setkey() argument 442 struct dcp_async_ctx *actx = crypto_ablkcipher_ctx(tfm); in mxs_dcp_aes_setkey() 458 tfm->base.crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in mxs_dcp_aes_setkey() 469 tfm->base.crt_flags & CRYPTO_TFM_REQ_MASK; in mxs_dcp_aes_setkey() 475 tfm->base.crt_flags &= ~CRYPTO_TFM_RES_MASK; in mxs_dcp_aes_setkey() 476 tfm->base.crt_flags |= in mxs_dcp_aes_setkey() [all …]
|
D | n2_core.c | 253 static inline struct n2_ahash_alg *n2_ahash_alg(struct crypto_tfm *tfm) in n2_ahash_alg() argument 255 struct crypto_alg *alg = tfm->__crt_alg; in n2_ahash_alg() 268 static inline struct n2_hmac_alg *n2_hmac_alg(struct crypto_tfm *tfm) in n2_hmac_alg() argument 270 struct crypto_alg *alg = tfm->__crt_alg; in n2_hmac_alg() 306 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in n2_hash_async_init() local 307 struct n2_hash_ctx *ctx = crypto_ahash_ctx(tfm); in n2_hash_async_init() 318 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in n2_hash_async_update() local 319 struct n2_hash_ctx *ctx = crypto_ahash_ctx(tfm); in n2_hash_async_update() 332 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in n2_hash_async_final() local 333 struct n2_hash_ctx *ctx = crypto_ahash_ctx(tfm); in n2_hash_async_final() [all …]
|
D | picoxcell_crypto.c | 449 static int spacc_aead_setkey(struct crypto_aead *tfm, const u8 *key, in spacc_aead_setkey() argument 452 struct spacc_aead_ctx *ctx = crypto_aead_ctx(tfm); in spacc_aead_setkey() 457 crypto_aead_set_flags(ctx->sw_cipher, crypto_aead_get_flags(tfm) & in spacc_aead_setkey() 460 crypto_aead_clear_flags(tfm, CRYPTO_TFM_RES_MASK); in spacc_aead_setkey() 461 crypto_aead_set_flags(tfm, crypto_aead_get_flags(ctx->sw_cipher) & in spacc_aead_setkey() 484 crypto_aead_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); in spacc_aead_setkey() 488 static int spacc_aead_setauthsize(struct crypto_aead *tfm, in spacc_aead_setauthsize() argument 491 struct spacc_aead_ctx *ctx = crypto_tfm_ctx(crypto_aead_tfm(tfm)); in spacc_aead_setauthsize() 686 static int spacc_aead_cra_init(struct crypto_aead *tfm) in spacc_aead_cra_init() argument 688 struct spacc_aead_ctx *ctx = crypto_aead_ctx(tfm); in spacc_aead_cra_init() [all …]
|
D | padlock-aes.c | 94 static inline struct aes_ctx *aes_ctx(struct crypto_tfm *tfm) in aes_ctx() argument 96 return aes_ctx_common(crypto_tfm_ctx(tfm)); in aes_ctx() 99 static inline struct aes_ctx *blk_aes_ctx(struct crypto_blkcipher *tfm) in blk_aes_ctx() argument 101 return aes_ctx_common(crypto_blkcipher_ctx(tfm)); in blk_aes_ctx() 104 static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in aes_set_key() argument 107 struct aes_ctx *ctx = aes_ctx(tfm); in aes_set_key() 109 u32 *flags = &tfm->crt_flags; in aes_set_key() 298 static void aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in aes_encrypt() argument 300 struct aes_ctx *ctx = aes_ctx(tfm); in aes_encrypt() 310 static void aes_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in aes_decrypt() argument [all …]
|
D | mv_cesa.c | 202 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in mv_setkey_aes() local 203 struct mv_ctx *ctx = crypto_tfm_ctx(tfm); in mv_setkey_aes() 261 struct mv_ctx *ctx = crypto_tfm_ctx(req->base.tfm); in mv_process_current_q() 330 const struct mv_tfm_hash_ctx *tfm_ctx = crypto_tfm_ctx(req->base.tfm); in mv_process_hash_current() 408 const struct mv_tfm_hash_ctx *tfm_ctx = crypto_tfm_ctx(req->base.tfm); in mv_hash_final_fallback() 413 shash->tfm = tfm_ctx->fallback; in mv_hash_final_fallback() 627 if (crypto_tfm_alg_type(async_req->tfm) != in queue_manag() 670 struct mv_ctx *ctx = crypto_tfm_ctx(req->base.tfm); in mv_dec_aes_ecb() 692 struct mv_ctx *ctx = crypto_tfm_ctx(req->base.tfm); in mv_dec_aes_cbc() 702 static int mv_cra_init(struct crypto_tfm *tfm) in mv_cra_init() argument [all …]
|
D | padlock-sha.c | 39 struct padlock_sha_ctx *ctx = crypto_shash_ctx(desc->tfm); in padlock_sha_init() 41 dctx->fallback.tfm = ctx->fallback; in padlock_sha_init() 65 struct padlock_sha_ctx *ctx = crypto_shash_ctx(desc->tfm); in padlock_sha_import() 67 dctx->fallback.tfm = ctx->fallback; in padlock_sha_import() 211 static int padlock_cra_init(struct crypto_tfm *tfm) in padlock_cra_init() argument 213 struct crypto_shash *hash = __crypto_shash_cast(tfm); in padlock_cra_init() 214 const char *fallback_driver_name = crypto_tfm_alg_name(tfm); in padlock_cra_init() 215 struct padlock_sha_ctx *ctx = crypto_tfm_ctx(tfm); in padlock_cra_init() 237 static void padlock_cra_exit(struct crypto_tfm *tfm) in padlock_cra_exit() argument 239 struct padlock_sha_ctx *ctx = crypto_tfm_ctx(tfm); in padlock_cra_exit() [all …]
|
D | omap-sham.c | 301 struct crypto_ahash *tfm = crypto_ahash_reqtfm(dd->req); in omap_sham_copy_hash_omap4() local 302 struct omap_sham_ctx *tctx = crypto_ahash_ctx(tfm); in omap_sham_copy_hash_omap4() 463 struct crypto_ahash *tfm = crypto_ahash_reqtfm(dd->req); in omap_sham_write_ctrl_omap4() local 464 struct omap_sham_ctx *tctx = crypto_ahash_ctx(tfm); in omap_sham_write_ctrl_omap4() 837 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in omap_sham_init() local 838 struct omap_sham_ctx *tctx = crypto_ahash_ctx(tfm); in omap_sham_init() 860 crypto_ahash_digestsize(tfm)); in omap_sham_init() 862 switch (crypto_ahash_digestsize(tfm)) { in omap_sham_init() 955 struct omap_sham_ctx *tctx = crypto_tfm_ctx(req->base.tfm); in omap_sham_finish_hmac() 961 shash->tfm = bctx->shash; in omap_sham_finish_hmac() [all …]
|
D | sahara.c | 601 static int sahara_aes_setkey(struct crypto_ablkcipher *tfm, const u8 *key, in sahara_aes_setkey() argument 604 struct sahara_ctx *ctx = crypto_ablkcipher_ctx(tfm); in sahara_aes_setkey() 625 (tfm->base.crt_flags & CRYPTO_TFM_REQ_MASK); in sahara_aes_setkey() 629 struct crypto_tfm *tfm_aux = crypto_ablkcipher_tfm(tfm); in sahara_aes_setkey() 666 struct crypto_tfm *tfm = in sahara_aes_ecb_encrypt() local 675 ablkcipher_request_set_tfm(req, __crypto_ablkcipher_cast(tfm)); in sahara_aes_ecb_encrypt() 684 struct crypto_tfm *tfm = in sahara_aes_ecb_decrypt() local 693 ablkcipher_request_set_tfm(req, __crypto_ablkcipher_cast(tfm)); in sahara_aes_ecb_decrypt() 702 struct crypto_tfm *tfm = in sahara_aes_cbc_encrypt() local 711 ablkcipher_request_set_tfm(req, __crypto_ablkcipher_cast(tfm)); in sahara_aes_cbc_encrypt() [all …]
|
D | bfin_crc.c | 130 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in bfin_crypto_crc_init() local 131 struct bfin_crypto_crc_ctx *crc_ctx = crypto_ahash_ctx(tfm); in bfin_crypto_crc_init() 160 crypto_ahash_digestsize(tfm)); in bfin_crypto_crc_init() 417 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in bfin_crypto_crc_final() local 418 struct bfin_crypto_crc_ctx *crc_ctx = crypto_ahash_ctx(tfm); in bfin_crypto_crc_final() 430 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in bfin_crypto_crc_finup() local 431 struct bfin_crypto_crc_ctx *crc_ctx = crypto_ahash_ctx(tfm); in bfin_crypto_crc_finup() 453 static int bfin_crypto_crc_setkey(struct crypto_ahash *tfm, const u8 *key, in bfin_crypto_crc_setkey() argument 456 struct bfin_crypto_crc_ctx *crc_ctx = crypto_ahash_ctx(tfm); in bfin_crypto_crc_setkey() 460 crypto_ahash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); in bfin_crypto_crc_setkey() [all …]
|
D | img-hash.c | 483 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in img_hash_init() local 485 struct img_hash_ctx *ctx = crypto_ahash_ctx(tfm); in img_hash_init() 548 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in img_hash_update() local 549 struct img_hash_ctx *ctx = crypto_ahash_ctx(tfm); in img_hash_update() 563 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in img_hash_final() local 564 struct img_hash_ctx *ctx = crypto_ahash_ctx(tfm); in img_hash_final() 577 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in img_hash_finup() local 578 struct img_hash_ctx *ctx = crypto_ahash_ctx(tfm); in img_hash_finup() 592 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in img_hash_digest() local 593 struct img_hash_ctx *tctx = crypto_ahash_ctx(tfm); in img_hash_digest() [all …]
|
D | atmel-tdes.c | 401 static int atmel_tdes_crypt_pdc(struct crypto_tfm *tfm, dma_addr_t dma_addr_in, in atmel_tdes_crypt_pdc() argument 404 struct atmel_tdes_ctx *ctx = crypto_tfm_ctx(tfm); in atmel_tdes_crypt_pdc() 437 static int atmel_tdes_crypt_dma(struct crypto_tfm *tfm, dma_addr_t dma_addr_in, in atmel_tdes_crypt_dma() argument 440 struct atmel_tdes_ctx *ctx = crypto_tfm_ctx(tfm); in atmel_tdes_crypt_dma() 508 struct crypto_tfm *tfm = crypto_ablkcipher_tfm( in atmel_tdes_crypt_start() local 565 err = atmel_tdes_crypt_dma(tfm, addr_in, addr_out, count); in atmel_tdes_crypt_start() 567 err = atmel_tdes_crypt_pdc(tfm, addr_in, addr_out, count); in atmel_tdes_crypt_start() 777 static int atmel_des_setkey(struct crypto_ablkcipher *tfm, const u8 *key, in atmel_des_setkey() argument 782 struct crypto_tfm *ctfm = crypto_ablkcipher_tfm(tfm); in atmel_des_setkey() 784 struct atmel_tdes_ctx *ctx = crypto_ablkcipher_ctx(tfm); in atmel_des_setkey() [all …]
|
/linux-4.4.14/drivers/crypto/sunxi-ss/ |
D | sun4i-ss-cipher.c | 21 struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(areq); in sun4i_ss_opti_poll() local 22 struct sun4i_tfm_ctx *op = crypto_ablkcipher_ctx(tfm); in sun4i_ss_opti_poll() 24 unsigned int ivsize = crypto_ablkcipher_ivsize(tfm); in sun4i_ss_opti_poll() 128 struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(areq); in sun4i_ss_cipher_poll() local 129 struct sun4i_tfm_ctx *op = crypto_ablkcipher_ctx(tfm); in sun4i_ss_cipher_poll() 134 unsigned int ivsize = crypto_ablkcipher_ivsize(tfm); in sun4i_ss_cipher_poll() 321 struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(areq); in sun4i_ss_cbc_aes_encrypt() local 322 struct sun4i_tfm_ctx *op = crypto_ablkcipher_ctx(tfm); in sun4i_ss_cbc_aes_encrypt() 332 struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(areq); in sun4i_ss_cbc_aes_decrypt() local 333 struct sun4i_tfm_ctx *op = crypto_ablkcipher_ctx(tfm); in sun4i_ss_cbc_aes_decrypt() [all …]
|
D | sun4i-ss.h | 169 int sun4i_hash_crainit(struct crypto_tfm *tfm); 195 int sun4i_ss_cipher_init(struct crypto_tfm *tfm); 196 int sun4i_ss_aes_setkey(struct crypto_ablkcipher *tfm, const u8 *key, 198 int sun4i_ss_des_setkey(struct crypto_ablkcipher *tfm, const u8 *key, 200 int sun4i_ss_des3_setkey(struct crypto_ablkcipher *tfm, const u8 *key,
|
D | sun4i-ss-hash.c | 21 int sun4i_hash_crainit(struct crypto_tfm *tfm) in sun4i_hash_crainit() argument 23 crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm), in sun4i_hash_crainit() 32 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); in sun4i_hash_init() local 33 struct ahash_alg *alg = __crypto_ahash_alg(tfm->base.__crt_alg); in sun4i_hash_init() 171 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); in sun4i_hash_update() local 185 __func__, crypto_tfm_alg_name(areq->base.tfm), in sun4i_hash_update() 322 for (i = 0; i < crypto_ahash_digestsize(tfm) / 4; i++) in sun4i_hash_update() 350 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); in sun4i_hash_final() local 367 for (i = 0; i < crypto_ahash_digestsize(tfm) / 4; i++) in sun4i_hash_final()
|
/linux-4.4.14/arch/arm/crypto/ |
D | ghash-ce-glue.c | 63 struct ghash_key *key = crypto_shash_ctx(desc->tfm); in ghash_update() 95 struct ghash_key *key = crypto_shash_ctx(desc->tfm); in ghash_final() 109 static int ghash_setkey(struct crypto_shash *tfm, in ghash_setkey() argument 112 struct ghash_key *key = crypto_shash_ctx(tfm); in ghash_setkey() 116 crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); in ghash_setkey() 153 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in ghash_async_init() local 154 struct ghash_async_ctx *ctx = crypto_ahash_ctx(tfm); in ghash_async_init() 166 desc->tfm = child; in ghash_async_init() 177 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in ghash_async_update() local 178 struct ghash_async_ctx *ctx = crypto_ahash_ctx(tfm); in ghash_async_update() [all …]
|
D | aes_glue.c | 16 static void aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in aes_encrypt() argument 18 struct AES_CTX *ctx = crypto_tfm_ctx(tfm); in aes_encrypt() 22 static void aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in aes_decrypt() argument 24 struct AES_CTX *ctx = crypto_tfm_ctx(tfm); in aes_decrypt() 28 static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in aes_set_key() argument 31 struct AES_CTX *ctx = crypto_tfm_ctx(tfm); in aes_set_key() 44 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in aes_set_key() 49 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in aes_set_key() 55 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in aes_set_key()
|
D | aesbs-glue.c | 57 static int aesbs_cbc_set_key(struct crypto_tfm *tfm, const u8 *in_key, in aesbs_cbc_set_key() argument 60 struct aesbs_cbc_ctx *ctx = crypto_tfm_ctx(tfm); in aesbs_cbc_set_key() 64 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in aesbs_cbc_set_key() 73 static int aesbs_ctr_set_key(struct crypto_tfm *tfm, const u8 *in_key, in aesbs_ctr_set_key() argument 76 struct aesbs_ctr_ctx *ctx = crypto_tfm_ctx(tfm); in aesbs_ctr_set_key() 80 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in aesbs_ctr_set_key() 87 static int aesbs_xts_set_key(struct crypto_tfm *tfm, const u8 *in_key, in aesbs_xts_set_key() argument 90 struct aesbs_xts_ctx *ctx = crypto_tfm_ctx(tfm); in aesbs_xts_set_key() 94 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in aesbs_xts_set_key() 108 struct aesbs_cbc_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in aesbs_cbc_encrypt() [all …]
|
D | aes-ce-glue.c | 130 static int ce_aes_setkey(struct crypto_tfm *tfm, const u8 *in_key, in ce_aes_setkey() argument 133 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm); in ce_aes_setkey() 140 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in ce_aes_setkey() 149 static int xts_set_key(struct crypto_tfm *tfm, const u8 *in_key, in xts_set_key() argument 152 struct crypto_aes_xts_ctx *ctx = crypto_tfm_ctx(tfm); in xts_set_key() 162 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in xts_set_key() 169 struct crypto_aes_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in ecb_encrypt() 192 struct crypto_aes_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in ecb_decrypt() 215 struct crypto_aes_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in cbc_encrypt() 239 struct crypto_aes_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in cbc_decrypt() [all …]
|
/linux-4.4.14/arch/x86/crypto/ |
D | ghash-clmulni-intel_glue.c | 55 static int ghash_setkey(struct crypto_shash *tfm, in ghash_setkey() argument 58 struct ghash_ctx *ctx = crypto_shash_ctx(tfm); in ghash_setkey() 63 crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); in ghash_setkey() 84 struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm); in ghash_update() 137 struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm); in ghash_final() 167 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in ghash_async_init() local 168 struct ghash_async_ctx *ctx = crypto_ahash_ctx(tfm); in ghash_async_init() 180 desc->tfm = child; in ghash_async_init() 191 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in ghash_async_update() local 192 struct ghash_async_ctx *ctx = crypto_ahash_ctx(tfm); in ghash_async_update() [all …]
|
D | fpu.c | 48 struct crypto_fpu_ctx *ctx = crypto_blkcipher_ctx(desc_in->tfm); in crypto_fpu_encrypt() 51 .tfm = child, in crypto_fpu_encrypt() 57 err = crypto_blkcipher_crt(desc.tfm)->encrypt(&desc, dst, src, nbytes); in crypto_fpu_encrypt() 67 struct crypto_fpu_ctx *ctx = crypto_blkcipher_ctx(desc_in->tfm); in crypto_fpu_decrypt() 70 .tfm = child, in crypto_fpu_decrypt() 76 err = crypto_blkcipher_crt(desc.tfm)->decrypt(&desc, dst, src, nbytes); in crypto_fpu_decrypt() 81 static int crypto_fpu_init_tfm(struct crypto_tfm *tfm) in crypto_fpu_init_tfm() argument 83 struct crypto_instance *inst = crypto_tfm_alg_instance(tfm); in crypto_fpu_init_tfm() 85 struct crypto_fpu_ctx *ctx = crypto_tfm_ctx(tfm); in crypto_fpu_init_tfm() 96 static void crypto_fpu_exit_tfm(struct crypto_tfm *tfm) in crypto_fpu_exit_tfm() argument [all …]
|
D | aesni-intel_glue.c | 284 aesni_rfc4106_gcm_ctx *aesni_rfc4106_gcm_ctx_get(struct crypto_aead *tfm) in aesni_rfc4106_gcm_ctx_get() argument 290 return PTR_ALIGN(crypto_aead_ctx(tfm), align); in aesni_rfc4106_gcm_ctx_get() 304 static int aes_set_key_common(struct crypto_tfm *tfm, void *raw_ctx, in aes_set_key_common() argument 308 u32 *flags = &tfm->crt_flags; in aes_set_key_common() 328 static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in aes_set_key() argument 331 return aes_set_key_common(tfm, crypto_tfm_ctx(tfm), in_key, key_len); in aes_set_key() 334 static void aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in aes_encrypt() argument 336 struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm)); in aes_encrypt() 347 static void aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in aes_decrypt() argument 349 struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm)); in aes_decrypt() [all …]
|
D | twofish_glue.c | 54 static void twofish_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in twofish_encrypt() argument 56 twofish_enc_blk(crypto_tfm_ctx(tfm), dst, src); in twofish_encrypt() 59 static void twofish_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in twofish_decrypt() argument 61 twofish_dec_blk(crypto_tfm_ctx(tfm), dst, src); in twofish_decrypt()
|
D | twofish_glue_3way.c | 216 int lrw_twofish_setkey(struct crypto_tfm *tfm, const u8 *key, in lrw_twofish_setkey() argument 219 struct twofish_lrw_ctx *ctx = crypto_tfm_ctx(tfm); in lrw_twofish_setkey() 223 &tfm->crt_flags); in lrw_twofish_setkey() 234 struct twofish_lrw_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in lrw_encrypt() 251 struct twofish_lrw_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in lrw_decrypt() 265 void lrw_twofish_exit_tfm(struct crypto_tfm *tfm) in lrw_twofish_exit_tfm() argument 267 struct twofish_lrw_ctx *ctx = crypto_tfm_ctx(tfm); in lrw_twofish_exit_tfm() 273 int xts_twofish_setkey(struct crypto_tfm *tfm, const u8 *key, in xts_twofish_setkey() argument 276 struct twofish_xts_ctx *ctx = crypto_tfm_ctx(tfm); in xts_twofish_setkey() 277 u32 *flags = &tfm->crt_flags; in xts_twofish_setkey() [all …]
|
D | salsa20_glue.c | 40 static int setkey(struct crypto_tfm *tfm, const u8 *key, in setkey() argument 43 struct salsa20_ctx *ctx = crypto_tfm_ctx(tfm); in setkey() 53 struct crypto_blkcipher *tfm = desc->tfm; in encrypt() local 54 struct salsa20_ctx *ctx = crypto_blkcipher_ctx(tfm); in encrypt()
|
D | aes_glue.c | 25 static void aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in aes_encrypt() argument 27 aes_enc_blk(crypto_tfm_ctx(tfm), dst, src); in aes_encrypt() 30 static void aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in aes_decrypt() argument 32 aes_dec_blk(crypto_tfm_ctx(tfm), dst, src); in aes_decrypt()
|
D | des3_ede_glue.c | 76 static void des3_ede_x86_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in des3_ede_x86_encrypt() argument 78 des3_ede_enc_blk(crypto_tfm_ctx(tfm), dst, src); in des3_ede_x86_encrypt() 81 static void des3_ede_x86_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in des3_ede_x86_decrypt() argument 83 des3_ede_dec_blk(crypto_tfm_ctx(tfm), dst, src); in des3_ede_x86_decrypt() 133 struct des3_ede_x86_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in ecb_encrypt() 143 struct des3_ede_x86_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in ecb_decrypt() 153 struct des3_ede_x86_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in __cbc_encrypt() 194 struct des3_ede_x86_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in __cbc_decrypt() 289 struct des3_ede_x86_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in __ctr_crypt() 352 ctr_crypt_final(crypto_blkcipher_ctx(desc->tfm), &walk); in ctr_crypt() [all …]
|
D | camellia_glue.c | 54 static void camellia_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in camellia_encrypt() argument 56 camellia_enc_blk(crypto_tfm_ctx(tfm), dst, src); in camellia_encrypt() 59 static void camellia_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in camellia_decrypt() argument 61 camellia_dec_blk(crypto_tfm_ctx(tfm), dst, src); in camellia_decrypt() 1275 static int camellia_setkey(struct crypto_tfm *tfm, const u8 *in_key, in camellia_setkey() argument 1278 return __camellia_setkey(crypto_tfm_ctx(tfm), in_key, key_len, in camellia_setkey() 1279 &tfm->crt_flags); in camellia_setkey() 1440 int lrw_camellia_setkey(struct crypto_tfm *tfm, const u8 *key, in lrw_camellia_setkey() argument 1443 struct camellia_lrw_ctx *ctx = crypto_tfm_ctx(tfm); in lrw_camellia_setkey() 1448 &tfm->crt_flags); in lrw_camellia_setkey() [all …]
|
D | cast6_avx_glue.c | 247 static int lrw_cast6_setkey(struct crypto_tfm *tfm, const u8 *key, in lrw_cast6_setkey() argument 250 struct cast6_lrw_ctx *ctx = crypto_tfm_ctx(tfm); in lrw_cast6_setkey() 254 &tfm->crt_flags); in lrw_cast6_setkey() 264 struct cast6_lrw_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in lrw_encrypt() 290 struct cast6_lrw_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in lrw_decrypt() 313 static void lrw_exit_tfm(struct crypto_tfm *tfm) in lrw_exit_tfm() argument 315 struct cast6_lrw_ctx *ctx = crypto_tfm_ctx(tfm); in lrw_exit_tfm() 325 static int xts_cast6_setkey(struct crypto_tfm *tfm, const u8 *key, in xts_cast6_setkey() argument 328 struct cast6_xts_ctx *ctx = crypto_tfm_ctx(tfm); in xts_cast6_setkey() 329 u32 *flags = &tfm->crt_flags; in xts_cast6_setkey() [all …]
|
D | serpent_sse2_glue.c | 229 static int lrw_serpent_setkey(struct crypto_tfm *tfm, const u8 *key, in lrw_serpent_setkey() argument 232 struct serpent_lrw_ctx *ctx = crypto_tfm_ctx(tfm); in lrw_serpent_setkey() 247 struct serpent_lrw_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in lrw_encrypt() 273 struct serpent_lrw_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in lrw_decrypt() 296 static void lrw_exit_tfm(struct crypto_tfm *tfm) in lrw_exit_tfm() argument 298 struct serpent_lrw_ctx *ctx = crypto_tfm_ctx(tfm); in lrw_exit_tfm() 308 static int xts_serpent_setkey(struct crypto_tfm *tfm, const u8 *key, in xts_serpent_setkey() argument 311 struct serpent_xts_ctx *ctx = crypto_tfm_ctx(tfm); in xts_serpent_setkey() 312 u32 *flags = &tfm->crt_flags; in xts_serpent_setkey() 335 struct serpent_xts_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in xts_encrypt() [all …]
|
D | serpent_avx_glue.c | 255 int lrw_serpent_setkey(struct crypto_tfm *tfm, const u8 *key, in lrw_serpent_setkey() argument 258 struct serpent_lrw_ctx *ctx = crypto_tfm_ctx(tfm); in lrw_serpent_setkey() 274 struct serpent_lrw_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in lrw_encrypt() 300 struct serpent_lrw_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in lrw_decrypt() 323 void lrw_serpent_exit_tfm(struct crypto_tfm *tfm) in lrw_serpent_exit_tfm() argument 325 struct serpent_lrw_ctx *ctx = crypto_tfm_ctx(tfm); in lrw_serpent_exit_tfm() 331 int xts_serpent_setkey(struct crypto_tfm *tfm, const u8 *key, in xts_serpent_setkey() argument 334 struct serpent_xts_ctx *ctx = crypto_tfm_ctx(tfm); in xts_serpent_setkey() 335 u32 *flags = &tfm->crt_flags; in xts_serpent_setkey() 359 struct serpent_xts_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in xts_encrypt() [all …]
|
D | crc32c-intel_glue.c | 129 u32 *mctx = crypto_shash_ctx(desc->tfm); in crc32c_intel_init() 170 return __crc32c_intel_finup(crypto_shash_ctx(desc->tfm), data, len, in crc32c_intel_digest() 174 static int crc32c_intel_cra_init(struct crypto_tfm *tfm) in crc32c_intel_cra_init() argument 176 u32 *key = crypto_tfm_ctx(tfm); in crc32c_intel_cra_init() 224 return __crc32c_pcl_intel_finup(crypto_shash_ctx(desc->tfm), data, len, in crc32c_pcl_intel_digest()
|
D | blowfish_glue.c | 70 static void blowfish_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in blowfish_encrypt() argument 72 blowfish_enc_blk(crypto_tfm_ctx(tfm), dst, src); in blowfish_encrypt() 75 static void blowfish_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in blowfish_decrypt() argument 77 blowfish_dec_blk(crypto_tfm_ctx(tfm), dst, src); in blowfish_decrypt() 84 struct bf_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in ecb_crypt() 146 struct bf_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in __cbc_encrypt() 187 struct bf_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in __cbc_decrypt() 283 struct bf_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in __ctr_crypt() 351 ctr_crypt_final(crypto_blkcipher_ctx(desc->tfm), &walk); in ctr_crypt()
|
D | crc32-pclmul_glue.c | 82 static int crc32_pclmul_cra_init(struct crypto_tfm *tfm) in crc32_pclmul_cra_init() argument 84 u32 *key = crypto_tfm_ctx(tfm); in crc32_pclmul_cra_init() 106 u32 *mctx = crypto_shash_ctx(desc->tfm); in crc32_pclmul_init() 148 return __crc32_pclmul_finup(crypto_shash_ctx(desc->tfm), data, len, in crc32_pclmul_digest()
|
/linux-4.4.14/drivers/block/ |
D | cryptoloop.c | 49 struct crypto_blkcipher *tfm; in cryptoloop_init() local 85 tfm = crypto_alloc_blkcipher(cms, 0, CRYPTO_ALG_ASYNC); in cryptoloop_init() 86 if (IS_ERR(tfm)) in cryptoloop_init() 87 return PTR_ERR(tfm); in cryptoloop_init() 89 err = crypto_blkcipher_setkey(tfm, info->lo_encrypt_key, in cryptoloop_init() 95 lo->key_data = tfm; in cryptoloop_init() 99 crypto_free_blkcipher(tfm); in cryptoloop_init() 117 struct crypto_blkcipher *tfm = lo->key_data; in cryptoloop_transfer() local 119 .tfm = tfm, in cryptoloop_transfer() 138 encdecfunc = crypto_blkcipher_crt(tfm)->decrypt; in cryptoloop_transfer() [all …]
|
/linux-4.4.14/net/ceph/ |
D | crypto.c | 165 struct crypto_blkcipher *tfm = ceph_crypto_alloc_cipher(); in ceph_aes_encrypt() local 166 struct blkcipher_desc desc = { .tfm = tfm, .flags = 0 }; in ceph_aes_encrypt() 173 if (IS_ERR(tfm)) in ceph_aes_encrypt() 174 return PTR_ERR(tfm); in ceph_aes_encrypt() 187 crypto_blkcipher_setkey((void *)tfm, key, key_len); in ceph_aes_encrypt() 188 iv = crypto_blkcipher_crt(tfm)->iv; in ceph_aes_encrypt() 189 ivsize = crypto_blkcipher_ivsize(tfm); in ceph_aes_encrypt() 214 crypto_free_blkcipher(tfm); in ceph_aes_encrypt() 225 struct crypto_blkcipher *tfm = ceph_crypto_alloc_cipher(); in ceph_aes_encrypt2() local 226 struct blkcipher_desc desc = { .tfm = tfm, .flags = 0 }; in ceph_aes_encrypt2() [all …]
|
/linux-4.4.14/drivers/crypto/vmx/ |
D | aes.c | 38 static int p8_aes_init(struct crypto_tfm *tfm) in p8_aes_init() argument 42 struct p8_aes_ctx *ctx = crypto_tfm_ctx(tfm); in p8_aes_init() 44 if (!(alg = crypto_tfm_alg_name(tfm))) { in p8_aes_init() 62 tfm)); in p8_aes_init() 68 static void p8_aes_exit(struct crypto_tfm *tfm) in p8_aes_exit() argument 70 struct p8_aes_ctx *ctx = crypto_tfm_ctx(tfm); in p8_aes_exit() 78 static int p8_aes_setkey(struct crypto_tfm *tfm, const u8 *key, in p8_aes_setkey() argument 82 struct p8_aes_ctx *ctx = crypto_tfm_ctx(tfm); in p8_aes_setkey() 97 static void p8_aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in p8_aes_encrypt() argument 99 struct p8_aes_ctx *ctx = crypto_tfm_ctx(tfm); in p8_aes_encrypt() [all …]
|
D | aes_cbc.c | 39 static int p8_aes_cbc_init(struct crypto_tfm *tfm) in p8_aes_cbc_init() argument 43 struct p8_aes_cbc_ctx *ctx = crypto_tfm_ctx(tfm); in p8_aes_cbc_init() 45 if (!(alg = crypto_tfm_alg_name(tfm))) { in p8_aes_cbc_init() 63 crypto_blkcipher_get_flags((struct crypto_blkcipher *)tfm)); in p8_aes_cbc_init() 69 static void p8_aes_cbc_exit(struct crypto_tfm *tfm) in p8_aes_cbc_exit() argument 71 struct p8_aes_cbc_ctx *ctx = crypto_tfm_ctx(tfm); in p8_aes_cbc_exit() 79 static int p8_aes_cbc_setkey(struct crypto_tfm *tfm, const u8 *key, in p8_aes_cbc_setkey() argument 83 struct p8_aes_cbc_ctx *ctx = crypto_tfm_ctx(tfm); in p8_aes_cbc_setkey() 105 crypto_tfm_ctx(crypto_blkcipher_tfm(desc->tfm)); in p8_aes_cbc_encrypt() 107 .tfm = ctx->fallback, in p8_aes_cbc_encrypt() [all …]
|
D | ghash.c | 56 static int p8_ghash_init_tfm(struct crypto_tfm *tfm) in p8_ghash_init_tfm() argument 60 struct crypto_shash *shash_tfm = __crypto_shash_cast(tfm); in p8_ghash_init_tfm() 61 struct p8_ghash_ctx *ctx = crypto_tfm_ctx(tfm); in p8_ghash_init_tfm() 63 if (!(alg = crypto_tfm_alg_name(tfm))) { in p8_ghash_init_tfm() 80 *) tfm)); in p8_ghash_init_tfm() 89 static void p8_ghash_exit_tfm(struct crypto_tfm *tfm) in p8_ghash_exit_tfm() argument 91 struct p8_ghash_ctx *ctx = crypto_tfm_ctx(tfm); in p8_ghash_exit_tfm() 101 struct p8_ghash_ctx *ctx = crypto_tfm_ctx(crypto_shash_tfm(desc->tfm)); in p8_ghash_init() 106 dctx->fallback_desc.tfm = ctx->fallback; in p8_ghash_init() 111 static int p8_ghash_setkey(struct crypto_shash *tfm, const u8 *key, in p8_ghash_setkey() argument [all …]
|
D | aes_ctr.c | 37 static int p8_aes_ctr_init(struct crypto_tfm *tfm) in p8_aes_ctr_init() argument 41 struct p8_aes_ctr_ctx *ctx = crypto_tfm_ctx(tfm); in p8_aes_ctr_init() 43 if (!(alg = crypto_tfm_alg_name(tfm))) { in p8_aes_ctr_init() 61 crypto_blkcipher_get_flags((struct crypto_blkcipher *)tfm)); in p8_aes_ctr_init() 67 static void p8_aes_ctr_exit(struct crypto_tfm *tfm) in p8_aes_ctr_exit() argument 69 struct p8_aes_ctr_ctx *ctx = crypto_tfm_ctx(tfm); in p8_aes_ctr_exit() 77 static int p8_aes_ctr_setkey(struct crypto_tfm *tfm, const u8 *key, in p8_aes_ctr_setkey() argument 81 struct p8_aes_ctr_ctx *ctx = crypto_tfm_ctx(tfm); in p8_aes_ctr_setkey() 121 crypto_tfm_ctx(crypto_blkcipher_tfm(desc->tfm)); in p8_aes_ctr_crypt() 123 .tfm = ctx->fallback, in p8_aes_ctr_crypt()
|
/linux-4.4.14/fs/btrfs/ |
D | hash.c | 18 static struct crypto_shash *tfm; variable 22 tfm = crypto_alloc_shash("crc32c", 0, 0); in btrfs_hash_init() 24 return PTR_ERR_OR_ZERO(tfm); in btrfs_hash_init() 29 crypto_free_shash(tfm); in btrfs_hash_exit() 34 SHASH_DESC_ON_STACK(shash, tfm); in btrfs_crc32c() 38 shash->tfm = tfm; in btrfs_crc32c()
|
/linux-4.4.14/drivers/staging/rtl8192e/ |
D | rtllib_crypt_ccmp.c | 47 struct crypto_tfm *tfm; member 55 static void rtllib_ccmp_aes_encrypt(struct crypto_tfm *tfm, in rtllib_ccmp_aes_encrypt() argument 58 crypto_cipher_encrypt_one((void *)tfm, ct, pt); in rtllib_ccmp_aes_encrypt() 70 priv->tfm = (void *)crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC); in rtllib_ccmp_init() 71 if (IS_ERR(priv->tfm)) { in rtllib_ccmp_init() 73 priv->tfm = NULL; in rtllib_ccmp_init() 80 if (priv->tfm) in rtllib_ccmp_init() 81 crypto_free_cipher((void *)priv->tfm); in rtllib_ccmp_init() 93 if (_priv && _priv->tfm) in rtllib_ccmp_deinit() 94 crypto_free_cipher((void *)_priv->tfm); in rtllib_ccmp_deinit() [all …]
|
/linux-4.4.14/lib/ |
D | libcrc32c.c | 40 static struct crypto_shash *tfm; variable 44 SHASH_DESC_ON_STACK(shash, tfm); in crc32c() 48 shash->tfm = tfm; in crc32c() 62 tfm = crypto_alloc_shash("crc32c", 0, 0); in libcrc32c_mod_init() 63 return PTR_ERR_OR_ZERO(tfm); in libcrc32c_mod_init() 68 crypto_free_shash(tfm); in libcrc32c_mod_fini()
|
/linux-4.4.14/drivers/target/iscsi/ |
D | iscsi_target_auth.c | 188 struct crypto_hash *tfm; in chap_server_compute_md5() local 248 tfm = crypto_alloc_hash("md5", 0, CRYPTO_ALG_ASYNC); in chap_server_compute_md5() 249 if (IS_ERR(tfm)) { in chap_server_compute_md5() 253 desc.tfm = tfm; in chap_server_compute_md5() 259 crypto_free_hash(tfm); in chap_server_compute_md5() 267 crypto_free_hash(tfm); in chap_server_compute_md5() 275 crypto_free_hash(tfm); in chap_server_compute_md5() 283 crypto_free_hash(tfm); in chap_server_compute_md5() 290 crypto_free_hash(tfm); in chap_server_compute_md5() 293 crypto_free_hash(tfm); in chap_server_compute_md5() [all …]
|
/linux-4.4.14/drivers/staging/rtl8192u/ieee80211/ |
D | ieee80211_crypt_ccmp.c | 51 struct crypto_tfm *tfm; member 59 static void ieee80211_ccmp_aes_encrypt(struct crypto_tfm *tfm, in ieee80211_ccmp_aes_encrypt() argument 62 crypto_cipher_encrypt_one((void *)tfm, ct, pt); in ieee80211_ccmp_aes_encrypt() 74 priv->tfm = (void *)crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC); in ieee80211_ccmp_init() 75 if (IS_ERR(priv->tfm)) { in ieee80211_ccmp_init() 77 priv->tfm = NULL; in ieee80211_ccmp_init() 85 if (priv->tfm) in ieee80211_ccmp_init() 86 crypto_free_cipher((void *)priv->tfm); in ieee80211_ccmp_init() 98 if (_priv && _priv->tfm) in ieee80211_ccmp_deinit() 99 crypto_free_cipher((void *)_priv->tfm); in ieee80211_ccmp_deinit() [all …]
|
/linux-4.4.14/security/integrity/evm/ |
D | evm_crypto.c | 39 struct crypto_shash **tfm; in init_desc() local 43 tfm = &hmac_tfm; in init_desc() 46 tfm = &hash_tfm; in init_desc() 50 if (*tfm == NULL) { in init_desc() 52 if (*tfm) in init_desc() 54 *tfm = crypto_alloc_shash(algo, 0, CRYPTO_ALG_ASYNC); in init_desc() 55 if (IS_ERR(*tfm)) { in init_desc() 56 rc = PTR_ERR(*tfm); in init_desc() 58 *tfm = NULL; in init_desc() 63 rc = crypto_shash_setkey(*tfm, evmkey, evmkey_len); in init_desc() [all …]
|
/linux-4.4.14/drivers/staging/lustre/lustre/libcfs/linux/ |
D | linux-crypto.c | 53 desc->tfm = crypto_alloc_hash((*type)->cht_name, 0, 0); in cfs_crypto_hash_alloc() 55 if (desc->tfm == NULL) in cfs_crypto_hash_alloc() 58 if (IS_ERR(desc->tfm)) { in cfs_crypto_hash_alloc() 61 return PTR_ERR(desc->tfm); in cfs_crypto_hash_alloc() 73 err = crypto_hash_setkey(desc->tfm, key, key_len); in cfs_crypto_hash_alloc() 75 err = crypto_hash_setkey(desc->tfm, in cfs_crypto_hash_alloc() 80 crypto_free_hash(desc->tfm); in cfs_crypto_hash_alloc() 85 (crypto_hash_tfm(desc->tfm))->__crt_alg->cra_name, in cfs_crypto_hash_alloc() 86 (crypto_hash_tfm(desc->tfm))->__crt_alg->cra_driver_name, in cfs_crypto_hash_alloc() 111 crypto_free_hash(hdesc.tfm); in cfs_crypto_hash_digest() [all …]
|
D | linux-crypto-adler.c | 45 static int adler32_cra_init(struct crypto_tfm *tfm) in adler32_cra_init() argument 47 u32 *key = crypto_tfm_ctx(tfm); in adler32_cra_init() 69 u32 *mctx = crypto_shash_ctx(desc->tfm); in adler32_init() 110 return __adler32_finup(crypto_shash_ctx(desc->tfm), data, len, in adler32_digest()
|
/linux-4.4.14/include/crypto/internal/ |
D | hash.h | 129 int crypto_init_shash_ops_async(struct crypto_tfm *tfm); 131 static inline void *crypto_ahash_ctx(struct crypto_ahash *tfm) in crypto_ahash_ctx() argument 133 return crypto_tfm_ctx(crypto_ahash_tfm(tfm)); in crypto_ahash_ctx() 142 static inline void crypto_ahash_set_reqsize(struct crypto_ahash *tfm, in crypto_ahash_set_reqsize() argument 145 tfm->reqsize = reqsize; in crypto_ahash_set_reqsize() 195 struct crypto_ahash *tfm) in ahash_tfm_in_queue() argument 197 return crypto_tfm_in_queue(queue, crypto_ahash_tfm(tfm)); in ahash_tfm_in_queue() 200 static inline void *crypto_shash_ctx(struct crypto_shash *tfm) in crypto_shash_ctx() argument 202 return crypto_tfm_ctx(&tfm->base); in crypto_shash_ctx() 236 static inline void *crypto_shash_ctx_aligned(struct crypto_shash *tfm) in crypto_shash_ctx_aligned() argument [all …]
|
D | rng.h | 34 static inline void *crypto_rng_ctx(struct crypto_rng *tfm) in crypto_rng_ctx() argument 36 return crypto_tfm_ctx(&tfm->base); in crypto_rng_ctx() 39 static inline void crypto_rng_set_entropy(struct crypto_rng *tfm, in crypto_rng_set_entropy() argument 42 crypto_rng_alg(tfm)->set_ent(tfm, data, len); in crypto_rng_set_entropy()
|
D | akcipher.h | 25 static inline void *akcipher_tfm_ctx(struct crypto_akcipher *tfm) in akcipher_tfm_ctx() argument 27 return tfm->base.__crt_ctx; in akcipher_tfm_ctx() 36 static inline const char *akcipher_alg_name(struct crypto_akcipher *tfm) in akcipher_alg_name() argument 38 return crypto_akcipher_tfm(tfm)->__crt_alg->cra_name; in akcipher_alg_name()
|
D | skcipher.h | 66 int skcipher_geniv_init(struct crypto_tfm *tfm); 67 void skcipher_geniv_exit(struct crypto_tfm *tfm); 110 static inline void *crypto_skcipher_ctx(struct crypto_skcipher *tfm) in crypto_skcipher_ctx() argument 112 return crypto_tfm_ctx(&tfm->base); in crypto_skcipher_ctx()
|
D | geniv.h | 30 int aead_init_geniv(struct crypto_aead *tfm); 31 void aead_exit_geniv(struct crypto_aead *tfm);
|
/linux-4.4.14/net/wireless/ |
D | lib80211_crypt_ccmp.c | 55 struct crypto_cipher *tfm; member 63 static inline void lib80211_ccmp_aes_encrypt(struct crypto_cipher *tfm, in lib80211_ccmp_aes_encrypt() argument 66 crypto_cipher_encrypt_one(tfm, ct, pt); in lib80211_ccmp_aes_encrypt() 78 priv->tfm = crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC); in lib80211_ccmp_init() 79 if (IS_ERR(priv->tfm)) { in lib80211_ccmp_init() 80 priv->tfm = NULL; in lib80211_ccmp_init() 88 if (priv->tfm) in lib80211_ccmp_init() 89 crypto_free_cipher(priv->tfm); in lib80211_ccmp_init() 99 if (_priv && _priv->tfm) in lib80211_ccmp_deinit() 100 crypto_free_cipher(_priv->tfm); in lib80211_ccmp_deinit() [all …]
|
/linux-4.4.14/drivers/crypto/ccp/ |
D | ccp-crypto-aes.c | 28 struct ccp_ctx *ctx = crypto_tfm_ctx(req->base.tfm); in ccp_aes_complete() 40 static int ccp_aes_setkey(struct crypto_ablkcipher *tfm, const u8 *key, in ccp_aes_setkey() argument 43 struct ccp_ctx *ctx = crypto_tfm_ctx(crypto_ablkcipher_tfm(tfm)); in ccp_aes_setkey() 45 ccp_crypto_ablkcipher_alg(crypto_ablkcipher_tfm(tfm)); in ccp_aes_setkey() 58 crypto_ablkcipher_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); in ccp_aes_setkey() 72 struct ccp_ctx *ctx = crypto_tfm_ctx(req->base.tfm); in ccp_aes_crypt() 127 static int ccp_aes_cra_init(struct crypto_tfm *tfm) in ccp_aes_cra_init() argument 129 struct ccp_ctx *ctx = crypto_tfm_ctx(tfm); in ccp_aes_cra_init() 134 tfm->crt_ablkcipher.reqsize = sizeof(struct ccp_aes_req_ctx); in ccp_aes_cra_init() 139 static void ccp_aes_cra_exit(struct crypto_tfm *tfm) in ccp_aes_cra_exit() argument [all …]
|
D | ccp-crypto-sha.c | 29 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in ccp_sha_complete() local 31 unsigned int digest_size = crypto_ahash_digestsize(tfm); in ccp_sha_complete() 60 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in ccp_do_sha_update() local 61 struct ccp_ctx *ctx = crypto_ahash_ctx(tfm); in ccp_do_sha_update() 65 crypto_tfm_alg_blocksize(crypto_ahash_tfm(tfm)); in ccp_do_sha_update() 162 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in ccp_sha_init() local 163 struct ccp_ctx *ctx = crypto_ahash_ctx(tfm); in ccp_sha_init() 166 ccp_crypto_ahash_alg(crypto_ahash_tfm(tfm)); in ccp_sha_init() 168 crypto_tfm_alg_blocksize(crypto_ahash_tfm(tfm)); in ccp_sha_init() 250 static int ccp_sha_setkey(struct crypto_ahash *tfm, const u8 *key, in ccp_sha_setkey() argument [all …]
|
D | ccp-crypto-aes-xts.c | 97 static int ccp_aes_xts_setkey(struct crypto_ablkcipher *tfm, const u8 *key, in ccp_aes_xts_setkey() argument 100 struct ccp_ctx *ctx = crypto_tfm_ctx(crypto_ablkcipher_tfm(tfm)); in ccp_aes_xts_setkey() 120 struct crypto_tfm *tfm = in ccp_aes_xts_crypt() local 122 struct ccp_ctx *ctx = crypto_tfm_ctx(req->base.tfm); in ccp_aes_xts_crypt() 155 ablkcipher_request_set_tfm(req, __crypto_ablkcipher_cast(tfm)); in ccp_aes_xts_crypt() 192 static int ccp_aes_xts_cra_init(struct crypto_tfm *tfm) in ccp_aes_xts_cra_init() argument 194 struct ccp_ctx *ctx = crypto_tfm_ctx(tfm); in ccp_aes_xts_cra_init() 200 fallback_tfm = crypto_alloc_ablkcipher(crypto_tfm_alg_name(tfm), 0, in ccp_aes_xts_cra_init() 205 crypto_tfm_alg_name(tfm)); in ccp_aes_xts_cra_init() 210 tfm->crt_ablkcipher.reqsize = sizeof(struct ccp_aes_req_ctx) + in ccp_aes_xts_cra_init() [all …]
|
D | ccp-crypto-main.c | 67 struct crypto_tfm *tfm; member 103 if (crypto_cmd->tfm != tmp->tfm) in ccp_crypto_cmd_complete() 141 struct ccp_ctx *ctx = crypto_tfm_ctx(req->tfm); in ccp_crypto_complete() 185 ctx = crypto_tfm_ctx(held->req->tfm); in ccp_crypto_complete() 224 if (crypto_cmd->tfm != tmp->tfm) in ccp_crypto_enqueue_cmd() 287 crypto_cmd->tfm = req->tfm; in ccp_crypto_enqueue_request()
|
D | ccp-crypto-aes-cmac.c | 30 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in ccp_aes_cmac_complete() local 32 unsigned int digest_size = crypto_ahash_digestsize(tfm); in ccp_aes_cmac_complete() 61 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in ccp_do_cmac_update() local 62 struct ccp_ctx *ctx = crypto_ahash_ctx(tfm); in ccp_do_cmac_update() 66 crypto_tfm_alg_blocksize(crypto_ahash_tfm(tfm)); in ccp_do_cmac_update() 259 static int ccp_aes_cmac_setkey(struct crypto_ahash *tfm, const u8 *key, in ccp_aes_cmac_setkey() argument 262 struct ccp_ctx *ctx = crypto_tfm_ctx(crypto_ahash_tfm(tfm)); in ccp_aes_cmac_setkey() 264 ccp_crypto_ahash_alg(crypto_ahash_tfm(tfm)); in ccp_aes_cmac_setkey() 281 crypto_ahash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); in ccp_aes_cmac_setkey() 338 static int ccp_aes_cmac_cra_init(struct crypto_tfm *tfm) in ccp_aes_cmac_cra_init() argument [all …]
|
D | ccp-crypto.h | 51 ccp_crypto_ablkcipher_alg(struct crypto_tfm *tfm) in ccp_crypto_ablkcipher_alg() argument 53 struct crypto_alg *alg = tfm->__crt_alg; in ccp_crypto_ablkcipher_alg() 59 ccp_crypto_ahash_alg(struct crypto_tfm *tfm) in ccp_crypto_ahash_alg() argument 61 struct crypto_alg *alg = tfm->__crt_alg; in ccp_crypto_ahash_alg()
|
/linux-4.4.14/net/sunrpc/auth_gss/ |
D | gss_krb5_crypto.c | 54 struct crypto_blkcipher *tfm, in krb5_encrypt() argument 63 struct blkcipher_desc desc = { .tfm = tfm, .info = local_iv }; in krb5_encrypt() 65 if (length % crypto_blkcipher_blocksize(tfm) != 0) in krb5_encrypt() 68 if (crypto_blkcipher_ivsize(tfm) > GSS_KRB5_MAX_BLOCKSIZE) { in krb5_encrypt() 70 crypto_blkcipher_ivsize(tfm)); in krb5_encrypt() 75 memcpy(local_iv, iv, crypto_blkcipher_ivsize(tfm)); in krb5_encrypt() 88 struct crypto_blkcipher *tfm, in krb5_decrypt() argument 97 struct blkcipher_desc desc = { .tfm = tfm, .info = local_iv }; in krb5_decrypt() 99 if (length % crypto_blkcipher_blocksize(tfm) != 0) in krb5_decrypt() 102 if (crypto_blkcipher_ivsize(tfm) > GSS_KRB5_MAX_BLOCKSIZE) { in krb5_decrypt() [all …]
|
/linux-4.4.14/security/apparmor/ |
D | crypto.c | 49 desc.shash.tfm = apparmor_tfm; in aa_calc_profile_hash() 76 struct crypto_shash *tfm; in init_profile_hash() local 81 tfm = crypto_alloc_shash("sha1", 0, CRYPTO_ALG_ASYNC); in init_profile_hash() 82 if (IS_ERR(tfm)) { in init_profile_hash() 83 int error = PTR_ERR(tfm); in init_profile_hash() 87 apparmor_tfm = tfm; in init_profile_hash()
|
/linux-4.4.14/drivers/crypto/amcc/ |
D | crypto4xx_alg.c | 75 struct crypto4xx_ctx *ctx = crypto_tfm_ctx(req->base.tfm); in crypto4xx_encrypt() 89 struct crypto4xx_ctx *ctx = crypto_tfm_ctx(req->base.tfm); in crypto4xx_decrypt() 110 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in crypto4xx_setkey_aes() local 111 struct crypto4xx_ctx *ctx = crypto_tfm_ctx(tfm); in crypto4xx_setkey_aes() 180 static int crypto4xx_hash_alg_init(struct crypto_tfm *tfm, in crypto4xx_hash_alg_init() argument 185 struct crypto_alg *alg = tfm->__crt_alg; in crypto4xx_hash_alg_init() 187 struct crypto4xx_ctx *ctx = crypto_tfm_ctx(tfm); in crypto4xx_hash_alg_init() 212 crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm), in crypto4xx_hash_alg_init() 239 struct crypto4xx_ctx *ctx = crypto_tfm_ctx(req->base.tfm); in crypto4xx_hash_init() 245 __crypto_ahash_cast(req->base.tfm)); in crypto4xx_hash_init() [all …]
|
/linux-4.4.14/drivers/crypto/nx/ |
D | nx.h | 155 int nx_crypto_ctx_aes_ccm_init(struct crypto_aead *tfm); 156 int nx_crypto_ctx_aes_gcm_init(struct crypto_aead *tfm); 157 int nx_crypto_ctx_aes_xcbc_init(struct crypto_tfm *tfm); 158 int nx_crypto_ctx_aes_ctr_init(struct crypto_tfm *tfm); 159 int nx_crypto_ctx_aes_cbc_init(struct crypto_tfm *tfm); 160 int nx_crypto_ctx_aes_ecb_init(struct crypto_tfm *tfm); 161 int nx_crypto_ctx_sha_init(struct crypto_tfm *tfm); 162 void nx_crypto_ctx_exit(struct crypto_tfm *tfm); 163 void nx_crypto_ctx_aead_exit(struct crypto_aead *tfm);
|
D | nx-aes-ctr.c | 34 static int ctr_aes_nx_set_key(struct crypto_tfm *tfm, in ctr_aes_nx_set_key() argument 38 struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(tfm); in ctr_aes_nx_set_key() 66 static int ctr3686_aes_nx_set_key(struct crypto_tfm *tfm, in ctr3686_aes_nx_set_key() argument 70 struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(tfm); in ctr3686_aes_nx_set_key() 81 return ctr_aes_nx_set_key(tfm, in_key, key_len); in ctr3686_aes_nx_set_key() 89 struct nx_crypto_ctx *nx_ctx = crypto_blkcipher_ctx(desc->tfm); in ctr_aes_nx_crypt() 133 struct nx_crypto_ctx *nx_ctx = crypto_blkcipher_ctx(desc->tfm); in ctr3686_aes_nx_crypt()
|
D | nx.c | 708 int nx_crypto_ctx_aes_ccm_init(struct crypto_aead *tfm) in nx_crypto_ctx_aes_ccm_init() argument 710 crypto_aead_set_reqsize(tfm, sizeof(struct nx_ccm_rctx)); in nx_crypto_ctx_aes_ccm_init() 711 return nx_crypto_ctx_init(crypto_aead_ctx(tfm), NX_FC_AES, in nx_crypto_ctx_aes_ccm_init() 715 int nx_crypto_ctx_aes_gcm_init(struct crypto_aead *tfm) in nx_crypto_ctx_aes_gcm_init() argument 717 crypto_aead_set_reqsize(tfm, sizeof(struct nx_gcm_rctx)); in nx_crypto_ctx_aes_gcm_init() 718 return nx_crypto_ctx_init(crypto_aead_ctx(tfm), NX_FC_AES, in nx_crypto_ctx_aes_gcm_init() 722 int nx_crypto_ctx_aes_ctr_init(struct crypto_tfm *tfm) in nx_crypto_ctx_aes_ctr_init() argument 724 return nx_crypto_ctx_init(crypto_tfm_ctx(tfm), NX_FC_AES, in nx_crypto_ctx_aes_ctr_init() 728 int nx_crypto_ctx_aes_cbc_init(struct crypto_tfm *tfm) in nx_crypto_ctx_aes_cbc_init() argument 730 return nx_crypto_ctx_init(crypto_tfm_ctx(tfm), NX_FC_AES, in nx_crypto_ctx_aes_cbc_init() [all …]
|
D | nx-842.h | 176 int nx842_crypto_init(struct crypto_tfm *tfm, struct nx842_driver *driver); 177 void nx842_crypto_exit(struct crypto_tfm *tfm); 178 int nx842_crypto_compress(struct crypto_tfm *tfm, 181 int nx842_crypto_decompress(struct crypto_tfm *tfm,
|
D | nx-aes-ccm.c | 35 static int ccm_aes_nx_set_key(struct crypto_aead *tfm, in ccm_aes_nx_set_key() argument 39 struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(&tfm->base); in ccm_aes_nx_set_key() 65 static int ccm4309_aes_nx_set_key(struct crypto_aead *tfm, in ccm4309_aes_nx_set_key() argument 69 struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(&tfm->base); in ccm4309_aes_nx_set_key() 78 return ccm_aes_nx_set_key(tfm, in_key, key_len); in ccm4309_aes_nx_set_key() 81 static int ccm_aes_nx_setauthsize(struct crypto_aead *tfm, in ccm_aes_nx_setauthsize() argument 100 static int ccm4309_aes_nx_setauthsize(struct crypto_aead *tfm, in ccm4309_aes_nx_setauthsize() argument 345 struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(req->base.tfm); in ccm_nx_decrypt() 423 struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(req->base.tfm); in ccm_nx_encrypt() 494 struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(req->base.tfm); in ccm4309_aes_nx_encrypt() [all …]
|
D | nx-aes-ecb.c | 33 static int ecb_aes_nx_set_key(struct crypto_tfm *tfm, in ecb_aes_nx_set_key() argument 37 struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(tfm); in ecb_aes_nx_set_key() 71 struct nx_crypto_ctx *nx_ctx = crypto_blkcipher_ctx(desc->tfm); in ecb_aes_nx_crypt()
|
D | nx-aes-cbc.c | 33 static int cbc_aes_nx_set_key(struct crypto_tfm *tfm, in cbc_aes_nx_set_key() argument 37 struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(tfm); in cbc_aes_nx_set_key() 71 struct nx_crypto_ctx *nx_ctx = crypto_blkcipher_ctx(desc->tfm); in cbc_aes_nx_crypt()
|
D | nx-aes-xcbc.c | 73 struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(&desc->tfm->base); in nx_xcbc_empty() 152 static int nx_crypto_ctx_aes_xcbc_init2(struct crypto_tfm *tfm) in nx_crypto_ctx_aes_xcbc_init2() argument 154 struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(tfm); in nx_crypto_ctx_aes_xcbc_init2() 158 err = nx_crypto_ctx_aes_xcbc_init(tfm); in nx_crypto_ctx_aes_xcbc_init2() 184 struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(&desc->tfm->base); in nx_xcbc_update() 310 struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(&desc->tfm->base); in nx_xcbc_final()
|
D | nx-842.c | 113 int nx842_crypto_init(struct crypto_tfm *tfm, struct nx842_driver *driver) in nx842_crypto_init() argument 115 struct nx842_crypto_ctx *ctx = crypto_tfm_ctx(tfm); in nx842_crypto_init() 133 void nx842_crypto_exit(struct crypto_tfm *tfm) in nx842_crypto_exit() argument 135 struct nx842_crypto_ctx *ctx = crypto_tfm_ctx(tfm); in nx842_crypto_exit() 258 int nx842_crypto_compress(struct crypto_tfm *tfm, in nx842_crypto_compress() argument 262 struct nx842_crypto_ctx *ctx = crypto_tfm_ctx(tfm); in nx842_crypto_compress() 442 int nx842_crypto_decompress(struct crypto_tfm *tfm, in nx842_crypto_decompress() argument 446 struct nx842_crypto_ctx *ctx = crypto_tfm_ctx(tfm); in nx842_crypto_decompress()
|
D | nx-sha256.c | 32 static int nx_crypto_ctx_sha256_init(struct crypto_tfm *tfm) in nx_crypto_ctx_sha256_init() argument 34 struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(tfm); in nx_crypto_ctx_sha256_init() 37 err = nx_crypto_ctx_sha_init(tfm); in nx_crypto_ctx_sha256_init() 72 struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(&desc->tfm->base); in nx_sha256_update() 192 struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(&desc->tfm->base); in nx_sha256_final()
|
D | nx-sha512.c | 31 static int nx_crypto_ctx_sha512_init(struct crypto_tfm *tfm) in nx_crypto_ctx_sha512_init() argument 33 struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(tfm); in nx_crypto_ctx_sha512_init() 36 err = nx_crypto_ctx_sha_init(tfm); in nx_crypto_ctx_sha512_init() 72 struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(&desc->tfm->base); in nx_sha512_update() 195 struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(&desc->tfm->base); in nx_sha512_final()
|
/linux-4.4.14/mm/ |
D | zswap.c | 117 struct crypto_comp * __percpu *tfm; member 424 struct crypto_comp *tfm; in __zswap_cpu_comp_notifier() local 428 if (WARN_ON(*per_cpu_ptr(pool->tfm, cpu))) in __zswap_cpu_comp_notifier() 430 tfm = crypto_alloc_comp(pool->tfm_name, 0, 0); in __zswap_cpu_comp_notifier() 431 if (IS_ERR_OR_NULL(tfm)) { in __zswap_cpu_comp_notifier() 433 pool->tfm_name, PTR_ERR(tfm)); in __zswap_cpu_comp_notifier() 436 *per_cpu_ptr(pool->tfm, cpu) = tfm; in __zswap_cpu_comp_notifier() 440 tfm = *per_cpu_ptr(pool->tfm, cpu); in __zswap_cpu_comp_notifier() 441 if (!IS_ERR_OR_NULL(tfm)) in __zswap_cpu_comp_notifier() 442 crypto_free_comp(tfm); in __zswap_cpu_comp_notifier() [all …]
|
/linux-4.4.14/net/xfrm/ |
D | xfrm_ipcomp.c | 50 struct crypto_comp *tfm = *per_cpu_ptr(ipcd->tfms, cpu); in ipcomp_decompress() local 51 int err = crypto_comp_decompress(tfm, start, plen, scratch, &dlen); in ipcomp_decompress() 144 struct crypto_comp *tfm; in ipcomp_compress() local 150 tfm = *this_cpu_ptr(ipcd->tfms); in ipcomp_compress() 151 err = crypto_comp_compress(tfm, start, plen, scratch, &dlen); in ipcomp_compress() 269 struct crypto_comp *tfm = *per_cpu_ptr(tfms, cpu); in ipcomp_free_tfms() local 270 crypto_free_comp(tfm); in ipcomp_free_tfms() 283 struct crypto_comp *tfm; in ipcomp_alloc_tfms() local 286 tfm = __this_cpu_read(*pos->tfms); in ipcomp_alloc_tfms() 288 if (!strcmp(crypto_comp_name(tfm), alg_name)) { in ipcomp_alloc_tfms() [all …]
|
/linux-4.4.14/arch/sparc/crypto/ |
D | des_glue.c | 43 static int des_set_key(struct crypto_tfm *tfm, const u8 *key, in des_set_key() argument 46 struct des_sparc64_ctx *dctx = crypto_tfm_ctx(tfm); in des_set_key() 47 u32 *flags = &tfm->crt_flags; in des_set_key() 70 static void des_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in des_encrypt() argument 72 struct des_sparc64_ctx *ctx = crypto_tfm_ctx(tfm); in des_encrypt() 78 static void des_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in des_decrypt() argument 80 struct des_sparc64_ctx *ctx = crypto_tfm_ctx(tfm); in des_decrypt() 97 struct des_sparc64_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in __ecb_crypt() 145 struct des_sparc64_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in cbc_encrypt() 176 struct des_sparc64_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in cbc_decrypt() [all …]
|
D | camellia_glue.c | 35 static int camellia_set_key(struct crypto_tfm *tfm, const u8 *_in_key, in camellia_set_key() argument 38 struct camellia_sparc64_ctx *ctx = crypto_tfm_ctx(tfm); in camellia_set_key() 40 u32 *flags = &tfm->crt_flags; in camellia_set_key() 57 static void camellia_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in camellia_encrypt() argument 59 struct camellia_sparc64_ctx *ctx = crypto_tfm_ctx(tfm); in camellia_encrypt() 66 static void camellia_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in camellia_decrypt() argument 68 struct camellia_sparc64_ctx *ctx = crypto_tfm_ctx(tfm); in camellia_decrypt() 89 struct camellia_sparc64_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in __ecb_crypt() 152 struct camellia_sparc64_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in cbc_encrypt() 191 struct camellia_sparc64_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in cbc_decrypt()
|
D | aes_glue.c | 166 static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in aes_set_key() argument 169 struct crypto_sparc64_aes_ctx *ctx = crypto_tfm_ctx(tfm); in aes_set_key() 170 u32 *flags = &tfm->crt_flags; in aes_set_key() 199 static void aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in aes_encrypt() argument 201 struct crypto_sparc64_aes_ctx *ctx = crypto_tfm_ctx(tfm); in aes_encrypt() 206 static void aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in aes_decrypt() argument 208 struct crypto_sparc64_aes_ctx *ctx = crypto_tfm_ctx(tfm); in aes_decrypt() 219 struct crypto_sparc64_aes_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in ecb_encrypt() 248 struct crypto_sparc64_aes_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in ecb_decrypt() 279 struct crypto_sparc64_aes_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in cbc_encrypt() [all …]
|
D | crc32c_glue.c | 45 u32 *mctx = crypto_shash_ctx(desc->tfm); in crc32c_sparc64_init() 107 return __crc32c_sparc64_finup(crypto_shash_ctx(desc->tfm), data, len, in crc32c_sparc64_digest() 111 static int crc32c_sparc64_cra_init(struct crypto_tfm *tfm) in crc32c_sparc64_cra_init() argument 113 u32 *key = crypto_tfm_ctx(tfm); in crc32c_sparc64_cra_init()
|
/linux-4.4.14/drivers/crypto/qce/ |
D | ablkcipher.c | 30 struct qce_alg_template *tmpl = to_cipher_tmpl(async_req->tfm); in qce_ablkcipher_done() 65 struct qce_alg_template *tmpl = to_cipher_tmpl(async_req->tfm); in qce_ablkcipher_async_req_handle() 155 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(ablk); in qce_ablkcipher_setkey() local 156 struct qce_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in qce_ablkcipher_setkey() 157 unsigned long flags = to_cipher_tmpl(tfm)->alg_flags; in qce_ablkcipher_setkey() 195 struct crypto_tfm *tfm = in qce_ablkcipher_crypt() local 197 struct qce_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in qce_ablkcipher_crypt() 199 struct qce_alg_template *tmpl = to_cipher_tmpl(tfm); in qce_ablkcipher_crypt() 210 ablkcipher_request_set_tfm(req, __crypto_ablkcipher_cast(tfm)); in qce_ablkcipher_crypt() 227 static int qce_ablkcipher_init(struct crypto_tfm *tfm) in qce_ablkcipher_init() argument [all …]
|
D | sha.c | 43 struct qce_alg_template *tmpl = to_ahash_tmpl(async_req->tfm); in qce_ahash_done() 80 struct qce_sha_ctx *ctx = crypto_tfm_ctx(async_req->tfm); in qce_ahash_async_req_handle() 81 struct qce_alg_template *tmpl = to_ahash_tmpl(async_req->tfm); in qce_ahash_async_req_handle() 130 struct qce_alg_template *tmpl = to_ahash_tmpl(req->base.tfm); in qce_ahash_init() 231 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in qce_ahash_update() local 233 struct qce_alg_template *tmpl = to_ahash_tmpl(req->base.tfm); in qce_ahash_update() 241 blocksize = crypto_tfm_alg_blocksize(crypto_ahash_tfm(tfm)); in qce_ahash_update() 308 struct qce_alg_template *tmpl = to_ahash_tmpl(req->base.tfm); in qce_ahash_final() 331 struct qce_alg_template *tmpl = to_ahash_tmpl(req->base.tfm); in qce_ahash_digest() 363 static int qce_ahash_hmac_setkey(struct crypto_ahash *tfm, const u8 *key, in qce_ahash_hmac_setkey() argument [all …]
|
D | cipher.h | 56 static inline struct qce_alg_template *to_cipher_tmpl(struct crypto_tfm *tfm) in to_cipher_tmpl() argument 58 struct crypto_alg *alg = tfm->__crt_alg; in to_cipher_tmpl()
|
D | sha.h | 68 static inline struct qce_alg_template *to_ahash_tmpl(struct crypto_tfm *tfm) in to_ahash_tmpl() argument 70 struct crypto_ahash *ahash = __crypto_ahash_cast(tfm); in to_ahash_tmpl()
|
/linux-4.4.14/drivers/crypto/qat/qat_common/ |
D | qat_algs.c | 125 struct crypto_tfm *tfm; member 163 shash->tfm = ctx->hash_tfm; in qat_alg_do_precomputes() 530 static int qat_alg_aead_init_sessions(struct crypto_aead *tfm, const u8 *key, in qat_alg_aead_init_sessions() argument 542 if (qat_alg_aead_init_enc_session(tfm, alg, &keys, mode)) in qat_alg_aead_init_sessions() 545 if (qat_alg_aead_init_dec_session(tfm, alg, &keys, mode)) in qat_alg_aead_init_sessions() 550 crypto_aead_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); in qat_alg_aead_init_sessions() 570 crypto_tfm_set_flags(ctx->tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); in qat_alg_ablkcipher_init_sessions() 574 static int qat_alg_aead_setkey(struct crypto_aead *tfm, const uint8_t *key, in qat_alg_aead_setkey() argument 577 struct qat_alg_aead_ctx *ctx = crypto_aead_ctx(tfm); in qat_alg_aead_setkey() 611 if (qat_alg_aead_init_sessions(tfm, key, keylen, in qat_alg_aead_setkey() [all …]
|
D | qat_asym_algs.c | 242 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); in qat_rsa_enc() local 243 struct qat_rsa_ctx *ctx = akcipher_tfm_ctx(tfm); in qat_rsa_enc() 373 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); in qat_rsa_dec() local 374 struct qat_rsa_ctx *ctx = akcipher_tfm_ctx(tfm); in qat_rsa_dec() 604 static int qat_rsa_setkey(struct crypto_akcipher *tfm, const void *key, in qat_rsa_setkey() argument 607 struct qat_rsa_ctx *ctx = akcipher_tfm_ctx(tfm); in qat_rsa_setkey() 664 static int qat_rsa_setpubkey(struct crypto_akcipher *tfm, const void *key, in qat_rsa_setpubkey() argument 667 return qat_rsa_setkey(tfm, key, keylen, false); in qat_rsa_setpubkey() 670 static int qat_rsa_setprivkey(struct crypto_akcipher *tfm, const void *key, in qat_rsa_setprivkey() argument 673 return qat_rsa_setkey(tfm, key, keylen, true); in qat_rsa_setprivkey() [all …]
|
/linux-4.4.14/fs/f2fs/ |
D | crypto_key.c | 50 struct crypto_ablkcipher *tfm = crypto_alloc_ablkcipher("ecb(aes)", 0, in f2fs_derive_key_aes() local 53 if (IS_ERR(tfm)) { in f2fs_derive_key_aes() 54 res = PTR_ERR(tfm); in f2fs_derive_key_aes() 55 tfm = NULL; in f2fs_derive_key_aes() 58 crypto_ablkcipher_set_flags(tfm, CRYPTO_TFM_REQ_WEAK_KEY); in f2fs_derive_key_aes() 59 req = ablkcipher_request_alloc(tfm, GFP_NOFS); in f2fs_derive_key_aes() 67 res = crypto_ablkcipher_setkey(tfm, deriving_key, in f2fs_derive_key_aes() 85 if (tfm) in f2fs_derive_key_aes() 86 crypto_free_ablkcipher(tfm); in f2fs_derive_key_aes()
|
/linux-4.4.14/arch/arm64/crypto/ |
D | crc32-arm64.c | 102 struct chksum_ctx *mctx = crypto_shash_ctx(desc->tfm); in chksum_init() 115 static int chksum_setkey(struct crypto_shash *tfm, const u8 *key, in chksum_setkey() argument 118 struct chksum_ctx *mctx = crypto_shash_ctx(tfm); in chksum_setkey() 121 crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); in chksum_setkey() 193 struct chksum_ctx *mctx = crypto_shash_ctx(desc->tfm); in chksum_digest() 201 struct chksum_ctx *mctx = crypto_shash_ctx(desc->tfm); in chksumc_digest() 206 static int crc32_cra_init(struct crypto_tfm *tfm) in crc32_cra_init() argument 208 struct chksum_ctx *mctx = crypto_tfm_ctx(tfm); in crc32_cra_init() 214 static int crc32c_cra_init(struct crypto_tfm *tfm) in crc32c_cra_init() argument 216 struct chksum_ctx *mctx = crypto_tfm_ctx(tfm); in crc32c_cra_init()
|
D | aes-ce-cipher.c | 39 static void aes_cipher_encrypt(struct crypto_tfm *tfm, u8 dst[], u8 const src[]) in aes_cipher_encrypt() argument 41 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm); in aes_cipher_encrypt() 84 static void aes_cipher_decrypt(struct crypto_tfm *tfm, u8 dst[], u8 const src[]) in aes_cipher_decrypt() argument 86 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm); in aes_cipher_decrypt() 222 int ce_aes_setkey(struct crypto_tfm *tfm, const u8 *in_key, in ce_aes_setkey() argument 225 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm); in ce_aes_setkey() 232 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in ce_aes_setkey()
|
D | ghash-ce-glue.c | 56 struct ghash_key *key = crypto_shash_ctx(desc->tfm); in ghash_update() 88 struct ghash_key *key = crypto_shash_ctx(desc->tfm); in ghash_final() 103 static int ghash_setkey(struct crypto_shash *tfm, in ghash_setkey() argument 106 struct ghash_key *key = crypto_shash_ctx(tfm); in ghash_setkey() 110 crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); in ghash_setkey()
|
D | aes-glue.c | 82 static int xts_set_key(struct crypto_tfm *tfm, const u8 *in_key, in xts_set_key() argument 85 struct crypto_aes_xts_ctx *ctx = crypto_tfm_ctx(tfm); in xts_set_key() 95 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in xts_set_key() 102 struct crypto_aes_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in ecb_encrypt() 124 struct crypto_aes_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in ecb_decrypt() 146 struct crypto_aes_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in cbc_encrypt() 169 struct crypto_aes_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in cbc_decrypt() 192 struct crypto_aes_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in ctr_encrypt() 238 struct crypto_aes_xts_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in xts_encrypt() 262 struct crypto_aes_xts_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in xts_decrypt()
|
/linux-4.4.14/arch/powerpc/crypto/ |
D | aes-spe-glue.c | 92 static int ppc_aes_setkey(struct crypto_tfm *tfm, const u8 *in_key, in ppc_aes_setkey() argument 95 struct ppc_aes_ctx *ctx = crypto_tfm_ctx(tfm); in ppc_aes_setkey() 100 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in ppc_aes_setkey() 124 static int ppc_xts_setkey(struct crypto_tfm *tfm, const u8 *in_key, in ppc_xts_setkey() argument 127 struct ppc_xts_ctx *ctx = crypto_tfm_ctx(tfm); in ppc_xts_setkey() 134 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in ppc_xts_setkey() 161 static void ppc_aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in ppc_aes_encrypt() argument 163 struct ppc_aes_ctx *ctx = crypto_tfm_ctx(tfm); in ppc_aes_encrypt() 170 static void ppc_aes_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in ppc_aes_decrypt() argument 172 struct ppc_aes_ctx *ctx = crypto_tfm_ctx(tfm); in ppc_aes_decrypt() [all …]
|
/linux-4.4.14/fs/ext4/ |
D | crypto_key.c | 47 struct crypto_ablkcipher *tfm = crypto_alloc_ablkcipher("ecb(aes)", 0, in ext4_derive_key_aes() local 50 if (IS_ERR(tfm)) { in ext4_derive_key_aes() 51 res = PTR_ERR(tfm); in ext4_derive_key_aes() 52 tfm = NULL; in ext4_derive_key_aes() 55 crypto_ablkcipher_set_flags(tfm, CRYPTO_TFM_REQ_WEAK_KEY); in ext4_derive_key_aes() 56 req = ablkcipher_request_alloc(tfm, GFP_NOFS); in ext4_derive_key_aes() 64 res = crypto_ablkcipher_setkey(tfm, deriving_key, in ext4_derive_key_aes() 81 if (tfm) in ext4_derive_key_aes() 82 crypto_free_ablkcipher(tfm); in ext4_derive_key_aes()
|
/linux-4.4.14/crypto/asymmetric_keys/ |
D | x509_public_key.c | 160 struct crypto_shash *tfm; in x509_get_sig_params() local 181 tfm = crypto_alloc_shash(hash_algo_name[cert->sig.pkey_hash_algo], 0, 0); in x509_get_sig_params() 182 if (IS_ERR(tfm)) { in x509_get_sig_params() 183 if (PTR_ERR(tfm) == -ENOENT) { in x509_get_sig_params() 187 return PTR_ERR(tfm); in x509_get_sig_params() 190 desc_size = crypto_shash_descsize(tfm) + sizeof(*desc); in x509_get_sig_params() 191 digest_size = crypto_shash_digestsize(tfm); in x509_get_sig_params() 206 desc->tfm = tfm; in x509_get_sig_params() 215 crypto_free_shash(tfm); in x509_get_sig_params()
|
D | pkcs7_verify.c | 28 struct crypto_shash *tfm; in pkcs7_digest() local 43 tfm = crypto_alloc_shash(hash_algo_name[sinfo->sig.pkey_hash_algo], in pkcs7_digest() 45 if (IS_ERR(tfm)) in pkcs7_digest() 46 return (PTR_ERR(tfm) == -ENOENT) ? -ENOPKG : PTR_ERR(tfm); in pkcs7_digest() 48 desc_size = crypto_shash_descsize(tfm) + sizeof(*desc); in pkcs7_digest() 49 sinfo->sig.digest_size = digest_size = crypto_shash_digestsize(tfm); in pkcs7_digest() 58 desc->tfm = tfm; in pkcs7_digest() 124 crypto_free_shash(tfm); in pkcs7_digest()
|
D | verify_pefile.c | 325 struct crypto_shash *tfm; in pefile_digest_pe() local 336 tfm = crypto_alloc_shash(hash_algo_name[ctx->digest_algo], 0, 0); in pefile_digest_pe() 337 if (IS_ERR(tfm)) in pefile_digest_pe() 338 return (PTR_ERR(tfm) == -ENOENT) ? -ENOPKG : PTR_ERR(tfm); in pefile_digest_pe() 340 desc_size = crypto_shash_descsize(tfm) + sizeof(*desc); in pefile_digest_pe() 341 digest_size = crypto_shash_digestsize(tfm); in pefile_digest_pe() 356 desc->tfm = tfm; in pefile_digest_pe() 386 crypto_free_shash(tfm); in pefile_digest_pe()
|
/linux-4.4.14/security/keys/encrypted-keys/ |
D | encrypted.c | 88 struct crypto_blkcipher *tfm; in aes_get_sizes() local 90 tfm = crypto_alloc_blkcipher(blkcipher_alg, 0, CRYPTO_ALG_ASYNC); in aes_get_sizes() 91 if (IS_ERR(tfm)) { in aes_get_sizes() 93 PTR_ERR(tfm)); in aes_get_sizes() 94 return PTR_ERR(tfm); in aes_get_sizes() 96 ivsize = crypto_blkcipher_ivsize(tfm); in aes_get_sizes() 97 blksize = crypto_blkcipher_blocksize(tfm); in aes_get_sizes() 98 crypto_free_blkcipher(tfm); in aes_get_sizes() 333 sdesc->shash.tfm = alg; in alloc_sdesc() 410 desc->tfm = crypto_alloc_blkcipher(blkcipher_alg, 0, CRYPTO_ALG_ASYNC); in init_blkcipher_desc() [all …]
|
/linux-4.4.14/net/ipv4/ |
D | tcp_fastopen.c | 35 crypto_free_cipher(ctx->tfm); in tcp_fastopen_ctx_free() 47 ctx->tfm = crypto_alloc_cipher("aes", 0, 0); in tcp_fastopen_reset_cipher() 49 if (IS_ERR(ctx->tfm)) { in tcp_fastopen_reset_cipher() 50 err = PTR_ERR(ctx->tfm); in tcp_fastopen_reset_cipher() 55 err = crypto_cipher_setkey(ctx->tfm, key, len); in tcp_fastopen_reset_cipher() 58 crypto_free_cipher(ctx->tfm); in tcp_fastopen_reset_cipher() 84 crypto_cipher_encrypt_one(ctx->tfm, foc->val, path); in __tcp_fastopen_cookie_gen()
|
/linux-4.4.14/arch/x86/include/asm/crypto/ |
D | twofish.h | 38 extern int lrw_twofish_setkey(struct crypto_tfm *tfm, const u8 *key, 41 extern void lrw_twofish_exit_tfm(struct crypto_tfm *tfm); 43 extern int xts_twofish_setkey(struct crypto_tfm *tfm, const u8 *key,
|
D | serpent-avx.h | 40 extern int lrw_serpent_setkey(struct crypto_tfm *tfm, const u8 *key, 43 extern void lrw_serpent_exit_tfm(struct crypto_tfm *tfm); 45 extern int xts_serpent_setkey(struct crypto_tfm *tfm, const u8 *key,
|
D | camellia.h | 32 extern int lrw_camellia_setkey(struct crypto_tfm *tfm, const u8 *key, 34 extern void lrw_camellia_exit_tfm(struct crypto_tfm *tfm); 36 extern int xts_camellia_setkey(struct crypto_tfm *tfm, const u8 *key,
|
/linux-4.4.14/drivers/crypto/marvell/ |
D | cipher.c | 216 static int mv_cesa_ablkcipher_cra_init(struct crypto_tfm *tfm) in mv_cesa_ablkcipher_cra_init() argument 218 struct mv_cesa_aes_ctx *ctx = crypto_tfm_ctx(tfm); in mv_cesa_ablkcipher_cra_init() 222 tfm->crt_ablkcipher.reqsize = sizeof(struct mv_cesa_ablkcipher_req); in mv_cesa_ablkcipher_cra_init() 230 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in mv_cesa_aes_setkey() local 231 struct mv_cesa_aes_ctx *ctx = crypto_tfm_ctx(tfm); in mv_cesa_aes_setkey() 255 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in mv_cesa_des_setkey() local 256 struct mv_cesa_des_ctx *ctx = crypto_tfm_ctx(tfm); in mv_cesa_des_setkey() 266 if (!ret && (tfm->crt_flags & CRYPTO_TFM_REQ_WEAK_KEY)) { in mv_cesa_des_setkey() 267 tfm->crt_flags |= CRYPTO_TFM_RES_WEAK_KEY; in mv_cesa_des_setkey() 279 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in mv_cesa_des3_ede_setkey() local [all …]
|
D | hash.c | 434 static inline int mv_cesa_ahash_cra_init(struct crypto_tfm *tfm) in mv_cesa_ahash_cra_init() argument 436 struct mv_cesa_hash_ctx *ctx = crypto_tfm_ctx(tfm); in mv_cesa_ahash_cra_init() 440 crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm), in mv_cesa_ahash_cra_init() 1152 struct crypto_ahash *tfm; in mv_cesa_ahmac_setkey() local 1158 tfm = crypto_alloc_ahash(hash_alg_name, CRYPTO_ALG_TYPE_AHASH, in mv_cesa_ahmac_setkey() 1160 if (IS_ERR(tfm)) in mv_cesa_ahmac_setkey() 1161 return PTR_ERR(tfm); in mv_cesa_ahmac_setkey() 1163 req = ahash_request_alloc(tfm, GFP_KERNEL); in mv_cesa_ahmac_setkey() 1169 crypto_ahash_clear_flags(tfm, ~0); in mv_cesa_ahmac_setkey() 1171 blocksize = crypto_tfm_alg_blocksize(crypto_ahash_tfm(tfm)); in mv_cesa_ahmac_setkey() [all …]
|
/linux-4.4.14/arch/x86/crypto/sha-mb/ |
D | sha1_mb.c | 704 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in sha1_mb_async_init() local 705 struct sha1_mb_ctx *ctx = crypto_ahash_ctx(tfm); in sha1_mb_async_init() 718 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in sha1_mb_async_update() local 719 struct sha1_mb_ctx *ctx = crypto_ahash_ctx(tfm); in sha1_mb_async_update() 731 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in sha1_mb_async_finup() local 732 struct sha1_mb_ctx *ctx = crypto_ahash_ctx(tfm); in sha1_mb_async_finup() 744 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in sha1_mb_async_final() local 745 struct sha1_mb_ctx *ctx = crypto_ahash_ctx(tfm); in sha1_mb_async_final() 755 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in sha1_mb_async_digest() local 756 struct sha1_mb_ctx *ctx = crypto_ahash_ctx(tfm); in sha1_mb_async_digest() [all …]
|
/linux-4.4.14/drivers/crypto/ux500/hash/ |
D | hash_core.c | 566 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in hash_init() local 567 struct hash_ctx *ctx = crypto_ahash_ctx(tfm); in hash_init() 871 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in hash_dma_final() local 872 struct hash_ctx *ctx = crypto_ahash_ctx(tfm); in hash_dma_final() 977 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in hash_hw_final() local 978 struct hash_ctx *ctx = crypto_ahash_ctx(tfm); in hash_hw_final() 1084 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in hash_hw_update() local 1085 struct hash_ctx *ctx = crypto_ahash_ctx(tfm); in hash_hw_update() 1346 static int hash_setkey(struct crypto_ahash *tfm, in hash_setkey() argument 1350 struct hash_ctx *ctx = crypto_ahash_ctx(tfm); in hash_setkey() [all …]
|
/linux-4.4.14/net/bluetooth/ |
D | amp.c | 137 struct crypto_shash *tfm; in hmac_sha256() local 144 tfm = crypto_alloc_shash("hmac(sha256)", 0, 0); in hmac_sha256() 145 if (IS_ERR(tfm)) { in hmac_sha256() 146 BT_DBG("crypto_alloc_ahash failed: err %ld", PTR_ERR(tfm)); in hmac_sha256() 147 return PTR_ERR(tfm); in hmac_sha256() 150 ret = crypto_shash_setkey(tfm, key, ksize); in hmac_sha256() 156 shash = kzalloc(sizeof(*shash) + crypto_shash_descsize(tfm), in hmac_sha256() 163 shash->tfm = tfm; in hmac_sha256() 171 crypto_free_shash(tfm); in hmac_sha256()
|
/linux-4.4.14/net/mac802154/ |
D | llsec.c | 133 BUILD_BUG_ON(ARRAY_SIZE(authsizes) != ARRAY_SIZE(key->tfm)); in llsec_key_alloc() 135 for (i = 0; i < ARRAY_SIZE(key->tfm); i++) { in llsec_key_alloc() 136 key->tfm[i] = crypto_alloc_aead("ccm(aes)", 0, in llsec_key_alloc() 138 if (IS_ERR(key->tfm[i])) in llsec_key_alloc() 140 if (crypto_aead_setkey(key->tfm[i], template->key, in llsec_key_alloc() 143 if (crypto_aead_setauthsize(key->tfm[i], authsizes[i])) in llsec_key_alloc() 160 for (i = 0; i < ARRAY_SIZE(key->tfm); i++) in llsec_key_alloc() 161 if (key->tfm[i]) in llsec_key_alloc() 162 crypto_free_aead(key->tfm[i]); in llsec_key_alloc() 175 for (i = 0; i < ARRAY_SIZE(key->tfm); i++) in llsec_key_release() [all …]
|
/linux-4.4.14/fs/ecryptfs/ |
D | crypto.c | 93 .tfm = crypt_stat->hash_tfm, in ecryptfs_calculate_md5() 100 if (!desc.tfm) { in ecryptfs_calculate_md5() 101 desc.tfm = crypto_alloc_hash(ECRYPTFS_DEFAULT_HASH, 0, in ecryptfs_calculate_md5() 103 if (IS_ERR(desc.tfm)) { in ecryptfs_calculate_md5() 104 rc = PTR_ERR(desc.tfm); in ecryptfs_calculate_md5() 110 crypt_stat->hash_tfm = desc.tfm; in ecryptfs_calculate_md5() 237 if (crypt_stat->tfm) in ecryptfs_destroy_crypt_stat() 238 crypto_free_ablkcipher(crypt_stat->tfm); in ecryptfs_destroy_crypt_stat() 349 BUG_ON(!crypt_stat || !crypt_stat->tfm in crypt_scatterlist() 361 req = ablkcipher_request_alloc(crypt_stat->tfm, GFP_NOFS); in crypt_scatterlist() [all …]
|
/linux-4.4.14/drivers/md/ |
D | dm-verity.c | 58 struct crypto_shash *tfm; member 285 desc->tfm = v->tfm; in verity_verify_level() 386 desc->tfm = v->tfm; in verity_verify_io() 681 if (v->tfm) in verity_dtr() 682 crypto_free_shash(v->tfm); in verity_dtr() 816 v->tfm = crypto_alloc_shash(v->alg_name, 0, 0); in verity_ctr() 817 if (IS_ERR(v->tfm)) { in verity_ctr() 819 r = PTR_ERR(v->tfm); in verity_ctr() 820 v->tfm = NULL; in verity_ctr() 823 v->digest_size = crypto_shash_digestsize(v->tfm); in verity_ctr() [all …]
|
/linux-4.4.14/include/linux/sunrpc/ |
D | gss_krb5.h | 74 u32 (*encrypt) (struct crypto_blkcipher *tfm, 77 u32 (*decrypt) (struct crypto_blkcipher *tfm, 273 gss_encrypt_xdr_buf(struct crypto_blkcipher *tfm, struct xdr_buf *outbuf, 277 gss_decrypt_xdr_buf(struct crypto_blkcipher *tfm, struct xdr_buf *inbuf,
|