/crypto/ |
D | cipher.c | 19 static int setkey_unaligned(struct crypto_tfm *tfm, const u8 *key, in setkey_unaligned() argument 22 struct cipher_alg *cia = &tfm->__crt_alg->cra_cipher; in setkey_unaligned() 23 unsigned long alignmask = crypto_tfm_alg_alignmask(tfm); in setkey_unaligned() 35 ret = cia->cia_setkey(tfm, alignbuffer, keylen); in setkey_unaligned() 42 static int setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) in setkey() argument 44 struct cipher_alg *cia = &tfm->__crt_alg->cra_cipher; in setkey() 45 unsigned long alignmask = crypto_tfm_alg_alignmask(tfm); in setkey() 47 tfm->crt_flags &= ~CRYPTO_TFM_RES_MASK; in setkey() 49 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in setkey() 54 return setkey_unaligned(tfm, key, keylen); in setkey() [all …]
|
D | cfb.c | 30 static unsigned int crypto_cfb_bsize(struct crypto_skcipher *tfm) in crypto_cfb_bsize() argument 32 return crypto_cipher_blocksize(skcipher_cipher_simple(tfm)); in crypto_cfb_bsize() 35 static void crypto_cfb_encrypt_one(struct crypto_skcipher *tfm, in crypto_cfb_encrypt_one() argument 38 crypto_cipher_encrypt_one(skcipher_cipher_simple(tfm), dst, src); in crypto_cfb_encrypt_one() 43 struct crypto_skcipher *tfm) in crypto_cfb_final() argument 45 const unsigned long alignmask = crypto_skcipher_alignmask(tfm); in crypto_cfb_final() 53 crypto_cfb_encrypt_one(tfm, iv, stream); in crypto_cfb_final() 58 struct crypto_skcipher *tfm) in crypto_cfb_encrypt_segment() argument 60 const unsigned int bsize = crypto_cfb_bsize(tfm); in crypto_cfb_encrypt_segment() 67 crypto_cfb_encrypt_one(tfm, iv, dst); in crypto_cfb_encrypt_segment() [all …]
|
D | shash.c | 23 int shash_no_setkey(struct crypto_shash *tfm, const u8 *key, in shash_no_setkey() argument 30 static int shash_setkey_unaligned(struct crypto_shash *tfm, const u8 *key, in shash_setkey_unaligned() argument 33 struct shash_alg *shash = crypto_shash_alg(tfm); in shash_setkey_unaligned() 34 unsigned long alignmask = crypto_shash_alignmask(tfm); in shash_setkey_unaligned() 46 err = shash->setkey(tfm, alignbuffer, keylen); in shash_setkey_unaligned() 51 static void shash_set_needkey(struct crypto_shash *tfm, struct shash_alg *alg) in shash_set_needkey() argument 55 crypto_shash_set_flags(tfm, CRYPTO_TFM_NEED_KEY); in shash_set_needkey() 58 int crypto_shash_setkey(struct crypto_shash *tfm, const u8 *key, in crypto_shash_setkey() argument 61 struct shash_alg *shash = crypto_shash_alg(tfm); in crypto_shash_setkey() 62 unsigned long alignmask = crypto_shash_alignmask(tfm); in crypto_shash_setkey() [all …]
|
D | cryptd.c | 136 refcnt = crypto_tfm_ctx(request->tfm); in cryptd_enqueue_request() 187 static inline struct cryptd_queue *cryptd_get_queue(struct crypto_tfm *tfm) in cryptd_get_queue() argument 189 struct crypto_instance *inst = crypto_tfm_alg_instance(tfm); in cryptd_get_queue() 270 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cryptd_skcipher_complete() local 271 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in cryptd_skcipher_complete() 280 crypto_free_skcipher(tfm); in cryptd_skcipher_complete() 288 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cryptd_skcipher_encrypt() local 289 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in cryptd_skcipher_encrypt() 316 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cryptd_skcipher_decrypt() local 317 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in cryptd_skcipher_decrypt() [all …]
|
D | api.c | 292 static int crypto_init_ops(struct crypto_tfm *tfm, u32 type, u32 mask) in crypto_init_ops() argument 294 const struct crypto_type *type_obj = tfm->__crt_alg->cra_type; in crypto_init_ops() 297 return type_obj->init(tfm, type, mask); in crypto_init_ops() 299 switch (crypto_tfm_alg_type(tfm)) { in crypto_init_ops() 301 return crypto_init_cipher_ops(tfm); in crypto_init_ops() 304 return crypto_init_compress_ops(tfm); in crypto_init_ops() 314 static void crypto_exit_ops(struct crypto_tfm *tfm) in crypto_exit_ops() argument 316 const struct crypto_type *type = tfm->__crt_alg->cra_type; in crypto_exit_ops() 318 if (type && tfm->exit) in crypto_exit_ops() 319 tfm->exit(tfm); in crypto_exit_ops() [all …]
|
D | skcipher.c | 451 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in skcipher_walk_skcipher() local 468 walk->blocksize = crypto_skcipher_blocksize(tfm); in skcipher_walk_skcipher() 469 walk->stride = crypto_skcipher_walksize(tfm); in skcipher_walk_skcipher() 470 walk->ivsize = crypto_skcipher_ivsize(tfm); in skcipher_walk_skcipher() 471 walk->alignmask = crypto_skcipher_alignmask(tfm); in skcipher_walk_skcipher() 513 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in skcipher_walk_aead_common() local 539 walk->blocksize = crypto_aead_blocksize(tfm); in skcipher_walk_aead_common() 540 walk->stride = crypto_aead_chunksize(tfm); in skcipher_walk_aead_common() 541 walk->ivsize = crypto_aead_ivsize(tfm); in skcipher_walk_aead_common() 542 walk->alignmask = crypto_aead_alignmask(tfm); in skcipher_walk_aead_common() [all …]
|
D | simd.c | 50 static int simd_skcipher_setkey(struct crypto_skcipher *tfm, const u8 *key, in simd_skcipher_setkey() argument 53 struct simd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in simd_skcipher_setkey() 58 crypto_skcipher_set_flags(child, crypto_skcipher_get_flags(tfm) & in simd_skcipher_setkey() 61 crypto_skcipher_set_flags(tfm, crypto_skcipher_get_flags(child) & in simd_skcipher_setkey() 68 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in simd_skcipher_encrypt() local 69 struct simd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in simd_skcipher_encrypt() 89 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in simd_skcipher_decrypt() local 90 struct simd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in simd_skcipher_decrypt() 108 static void simd_skcipher_exit(struct crypto_skcipher *tfm) in simd_skcipher_exit() argument 110 struct simd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in simd_skcipher_exit() [all …]
|
D | des_generic.c | 19 static int des_setkey(struct crypto_tfm *tfm, const u8 *key, in des_setkey() argument 22 struct des_ctx *dctx = crypto_tfm_ctx(tfm); in des_setkey() 27 if (crypto_tfm_get_flags(tfm) & CRYPTO_TFM_REQ_FORBID_WEAK_KEYS) in des_setkey() 35 crypto_tfm_set_flags(tfm, CRYPTO_TFM_RES_WEAK_KEY); in des_setkey() 40 static void crypto_des_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in crypto_des_encrypt() argument 42 const struct des_ctx *dctx = crypto_tfm_ctx(tfm); in crypto_des_encrypt() 47 static void crypto_des_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in crypto_des_decrypt() argument 49 const struct des_ctx *dctx = crypto_tfm_ctx(tfm); in crypto_des_decrypt() 54 static int des3_ede_setkey(struct crypto_tfm *tfm, const u8 *key, in des3_ede_setkey() argument 57 struct des3_ede_ctx *dctx = crypto_tfm_ctx(tfm); in des3_ede_setkey() [all …]
|
D | blkcipher.c | 296 walk->walk_blocksize = crypto_blkcipher_blocksize(desc->tfm); in blkcipher_walk_virt() 298 walk->ivsize = crypto_blkcipher_ivsize(desc->tfm); in blkcipher_walk_virt() 299 walk->alignmask = crypto_blkcipher_alignmask(desc->tfm); in blkcipher_walk_virt() 308 walk->walk_blocksize = crypto_blkcipher_blocksize(desc->tfm); in blkcipher_walk_phys() 310 walk->ivsize = crypto_blkcipher_ivsize(desc->tfm); in blkcipher_walk_phys() 311 walk->alignmask = crypto_blkcipher_alignmask(desc->tfm); in blkcipher_walk_phys() 347 walk->cipher_blocksize = crypto_blkcipher_blocksize(desc->tfm); in blkcipher_walk_virt_block() 348 walk->ivsize = crypto_blkcipher_ivsize(desc->tfm); in blkcipher_walk_virt_block() 349 walk->alignmask = crypto_blkcipher_alignmask(desc->tfm); in blkcipher_walk_virt_block() 356 struct crypto_aead *tfm, in blkcipher_aead_walk_virt_block() argument [all …]
|
D | ablkcipher.c | 98 struct crypto_tfm *tfm = req->base.tfm; in ablkcipher_walk_done() local 131 memcpy(req->info, walk->iv, tfm->crt_ablkcipher.ivsize); in ablkcipher_walk_done() 178 struct crypto_tfm *tfm, in ablkcipher_copy_iv() argument 182 unsigned int ivsize = tfm->crt_ablkcipher.ivsize; in ablkcipher_copy_iv() 216 struct crypto_tfm *tfm = req->base.tfm; in ablkcipher_walk_next() local 221 alignmask = crypto_tfm_alg_alignmask(tfm); in ablkcipher_walk_next() 223 if (unlikely(n < crypto_tfm_alg_blocksize(tfm))) { in ablkcipher_walk_next() 261 struct crypto_tfm *tfm = req->base.tfm; in ablkcipher_walk_first() local 264 alignmask = crypto_tfm_alg_alignmask(tfm); in ablkcipher_walk_first() 275 int err = ablkcipher_copy_iv(walk, tfm, alignmask); in ablkcipher_walk_first() [all …]
|
D | compress.c | 15 static int crypto_compress(struct crypto_tfm *tfm, in crypto_compress() argument 19 return tfm->__crt_alg->cra_compress.coa_compress(tfm, src, slen, dst, in crypto_compress() 23 static int crypto_decompress(struct crypto_tfm *tfm, in crypto_decompress() argument 27 return tfm->__crt_alg->cra_compress.coa_decompress(tfm, src, slen, dst, in crypto_decompress() 31 int crypto_init_compress_ops(struct crypto_tfm *tfm) in crypto_init_compress_ops() argument 33 struct compress_tfm *ops = &tfm->crt_compress; in crypto_init_compress_ops()
|
D | algif_aead.c | 51 struct crypto_aead *tfm = aeadc->aead; in aead_sufficient_data() local 52 unsigned int as = crypto_aead_authsize(tfm); in aead_sufficient_data() 68 struct crypto_aead *tfm = aeadc->aead; in aead_sendmsg() local 69 unsigned int ivsize = crypto_aead_ivsize(tfm); in aead_sendmsg() 97 struct crypto_aead *tfm = aeadc->aead; in _aead_recvmsg() local 99 unsigned int i, as = crypto_aead_authsize(tfm); in _aead_recvmsg() 154 crypto_aead_reqsize(tfm)); in _aead_recvmsg() 283 aead_request_set_tfm(&areq->cra_u.aead_req, tfm); in _aead_recvmsg() 382 struct aead_tfm *tfm; in aead_check_key() local 392 tfm = pask->private; in aead_check_key() [all …]
|
D | essiv.c | 65 static int essiv_skcipher_setkey(struct crypto_skcipher *tfm, in essiv_skcipher_setkey() argument 68 struct essiv_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in essiv_skcipher_setkey() 75 crypto_skcipher_get_flags(tfm) & in essiv_skcipher_setkey() 78 crypto_skcipher_set_flags(tfm, in essiv_skcipher_setkey() 84 desc->tfm = tctx->hash; in essiv_skcipher_setkey() 91 crypto_skcipher_get_flags(tfm) & in essiv_skcipher_setkey() 95 crypto_skcipher_set_flags(tfm, in essiv_skcipher_setkey() 102 static int essiv_aead_setkey(struct crypto_aead *tfm, const u8 *key, in essiv_aead_setkey() argument 105 struct essiv_tfm_ctx *tctx = crypto_aead_ctx(tfm); in essiv_aead_setkey() 112 crypto_aead_set_flags(tctx->u.aead, crypto_aead_get_flags(tfm) & in essiv_aead_setkey() [all …]
|
D | ctr.c | 28 struct crypto_cipher *tfm) in crypto_ctr_crypt_final() argument 30 unsigned int bsize = crypto_cipher_blocksize(tfm); in crypto_ctr_crypt_final() 31 unsigned long alignmask = crypto_cipher_alignmask(tfm); in crypto_ctr_crypt_final() 39 crypto_cipher_encrypt_one(tfm, keystream, ctrblk); in crypto_ctr_crypt_final() 46 struct crypto_cipher *tfm) in crypto_ctr_crypt_segment() argument 49 crypto_cipher_alg(tfm)->cia_encrypt; in crypto_ctr_crypt_segment() 50 unsigned int bsize = crypto_cipher_blocksize(tfm); in crypto_ctr_crypt_segment() 58 fn(crypto_cipher_tfm(tfm), dst, ctrblk); in crypto_ctr_crypt_segment() 72 struct crypto_cipher *tfm) in crypto_ctr_crypt_inplace() argument 75 crypto_cipher_alg(tfm)->cia_encrypt; in crypto_ctr_crypt_inplace() [all …]
|
D | pcbc.c | 21 struct crypto_cipher *tfm) in crypto_pcbc_encrypt_segment() argument 23 int bsize = crypto_cipher_blocksize(tfm); in crypto_pcbc_encrypt_segment() 31 crypto_cipher_encrypt_one(tfm, dst, iv); in crypto_pcbc_encrypt_segment() 43 struct crypto_cipher *tfm) in crypto_pcbc_encrypt_inplace() argument 45 int bsize = crypto_cipher_blocksize(tfm); in crypto_pcbc_encrypt_inplace() 54 crypto_cipher_encrypt_one(tfm, src, iv); in crypto_pcbc_encrypt_inplace() 65 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in crypto_pcbc_encrypt() local 66 struct crypto_cipher *cipher = skcipher_cipher_simple(tfm); in crypto_pcbc_encrypt() 88 struct crypto_cipher *tfm) in crypto_pcbc_decrypt_segment() argument 90 int bsize = crypto_cipher_blocksize(tfm); in crypto_pcbc_decrypt_segment() [all …]
|
D | 842.c | 31 static void *crypto842_alloc_ctx(struct crypto_scomp *tfm) in crypto842_alloc_ctx() argument 42 static int crypto842_init(struct crypto_tfm *tfm) in crypto842_init() argument 44 struct crypto842_ctx *ctx = crypto_tfm_ctx(tfm); in crypto842_init() 53 static void crypto842_free_ctx(struct crypto_scomp *tfm, void *ctx) in crypto842_free_ctx() argument 58 static void crypto842_exit(struct crypto_tfm *tfm) in crypto842_exit() argument 60 struct crypto842_ctx *ctx = crypto_tfm_ctx(tfm); in crypto842_exit() 65 static int crypto842_compress(struct crypto_tfm *tfm, in crypto842_compress() argument 69 struct crypto842_ctx *ctx = crypto_tfm_ctx(tfm); in crypto842_compress() 74 static int crypto842_scompress(struct crypto_scomp *tfm, in crypto842_scompress() argument 81 static int crypto842_decompress(struct crypto_tfm *tfm, in crypto842_decompress() argument [all …]
|
D | ansi_cprng.c | 46 struct crypto_cipher *tfm; member 155 crypto_cipher_encrypt_one(ctx->tfm, output, tmp); in _get_more_prng_bytes() 272 crypto_free_cipher(ctx->tfm); in free_prng_context() 305 ret = crypto_cipher_setkey(ctx->tfm, prng_key, klen); in reset_prng_context() 308 crypto_cipher_get_flags(ctx->tfm)); in reset_prng_context() 319 static int cprng_init(struct crypto_tfm *tfm) in cprng_init() argument 321 struct prng_context *ctx = crypto_tfm_ctx(tfm); in cprng_init() 324 ctx->tfm = crypto_alloc_cipher("aes", 0, 0); in cprng_init() 325 if (IS_ERR(ctx->tfm)) { in cprng_init() 328 return PTR_ERR(ctx->tfm); in cprng_init() [all …]
|
D | aead.c | 27 static int setkey_unaligned(struct crypto_aead *tfm, const u8 *key, in setkey_unaligned() argument 30 unsigned long alignmask = crypto_aead_alignmask(tfm); in setkey_unaligned() 42 ret = crypto_aead_alg(tfm)->setkey(tfm, alignbuffer, keylen); in setkey_unaligned() 48 int crypto_aead_setkey(struct crypto_aead *tfm, in crypto_aead_setkey() argument 51 unsigned long alignmask = crypto_aead_alignmask(tfm); in crypto_aead_setkey() 55 err = setkey_unaligned(tfm, key, keylen); in crypto_aead_setkey() 57 err = crypto_aead_alg(tfm)->setkey(tfm, key, keylen); in crypto_aead_setkey() 60 crypto_aead_set_flags(tfm, CRYPTO_TFM_NEED_KEY); in crypto_aead_setkey() 64 crypto_aead_clear_flags(tfm, CRYPTO_TFM_NEED_KEY); in crypto_aead_setkey() 69 int crypto_aead_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in crypto_aead_setauthsize() argument [all …]
|
D | ahash.c | 168 static int ahash_setkey_unaligned(struct crypto_ahash *tfm, const u8 *key, in ahash_setkey_unaligned() argument 171 unsigned long alignmask = crypto_ahash_alignmask(tfm); in ahash_setkey_unaligned() 183 ret = tfm->setkey(tfm, alignbuffer, keylen); in ahash_setkey_unaligned() 188 static int ahash_nosetkey(struct crypto_ahash *tfm, const u8 *key, in ahash_nosetkey() argument 194 static void ahash_set_needkey(struct crypto_ahash *tfm) in ahash_set_needkey() argument 196 const struct hash_alg_common *alg = crypto_hash_alg_common(tfm); in ahash_set_needkey() 198 if (tfm->setkey != ahash_nosetkey && in ahash_set_needkey() 200 crypto_ahash_set_flags(tfm, CRYPTO_TFM_NEED_KEY); in ahash_set_needkey() 203 int crypto_ahash_setkey(struct crypto_ahash *tfm, const u8 *key, in crypto_ahash_setkey() argument 206 unsigned long alignmask = crypto_ahash_alignmask(tfm); in crypto_ahash_setkey() [all …]
|
D | lz4.c | 19 static void *lz4_alloc_ctx(struct crypto_scomp *tfm) in lz4_alloc_ctx() argument 30 static int lz4_init(struct crypto_tfm *tfm) in lz4_init() argument 32 struct lz4_ctx *ctx = crypto_tfm_ctx(tfm); in lz4_init() 41 static void lz4_free_ctx(struct crypto_scomp *tfm, void *ctx) in lz4_free_ctx() argument 46 static void lz4_exit(struct crypto_tfm *tfm) in lz4_exit() argument 48 struct lz4_ctx *ctx = crypto_tfm_ctx(tfm); in lz4_exit() 66 static int lz4_scompress(struct crypto_scomp *tfm, const u8 *src, in lz4_scompress() argument 73 static int lz4_compress_crypto(struct crypto_tfm *tfm, const u8 *src, in lz4_compress_crypto() argument 76 struct lz4_ctx *ctx = crypto_tfm_ctx(tfm); in lz4_compress_crypto() 93 static int lz4_sdecompress(struct crypto_scomp *tfm, const u8 *src, in lz4_sdecompress() argument [all …]
|
D | lz4hc.c | 18 static void *lz4hc_alloc_ctx(struct crypto_scomp *tfm) in lz4hc_alloc_ctx() argument 29 static int lz4hc_init(struct crypto_tfm *tfm) in lz4hc_init() argument 31 struct lz4hc_ctx *ctx = crypto_tfm_ctx(tfm); in lz4hc_init() 40 static void lz4hc_free_ctx(struct crypto_scomp *tfm, void *ctx) in lz4hc_free_ctx() argument 45 static void lz4hc_exit(struct crypto_tfm *tfm) in lz4hc_exit() argument 47 struct lz4hc_ctx *ctx = crypto_tfm_ctx(tfm); in lz4hc_exit() 65 static int lz4hc_scompress(struct crypto_scomp *tfm, const u8 *src, in lz4hc_scompress() argument 72 static int lz4hc_compress_crypto(struct crypto_tfm *tfm, const u8 *src, in lz4hc_compress_crypto() argument 76 struct lz4hc_ctx *ctx = crypto_tfm_ctx(tfm); in lz4hc_compress_crypto() 94 static int lz4hc_sdecompress(struct crypto_scomp *tfm, const u8 *src, in lz4hc_sdecompress() argument [all …]
|
D | lzo-rle.c | 18 static void *lzorle_alloc_ctx(struct crypto_scomp *tfm) in lzorle_alloc_ctx() argument 29 static int lzorle_init(struct crypto_tfm *tfm) in lzorle_init() argument 31 struct lzorle_ctx *ctx = crypto_tfm_ctx(tfm); in lzorle_init() 40 static void lzorle_free_ctx(struct crypto_scomp *tfm, void *ctx) in lzorle_free_ctx() argument 45 static void lzorle_exit(struct crypto_tfm *tfm) in lzorle_exit() argument 47 struct lzorle_ctx *ctx = crypto_tfm_ctx(tfm); in lzorle_exit() 67 static int lzorle_compress(struct crypto_tfm *tfm, const u8 *src, in lzorle_compress() argument 70 struct lzorle_ctx *ctx = crypto_tfm_ctx(tfm); in lzorle_compress() 75 static int lzorle_scompress(struct crypto_scomp *tfm, const u8 *src, in lzorle_scompress() argument 97 static int lzorle_decompress(struct crypto_tfm *tfm, const u8 *src, in lzorle_decompress() argument [all …]
|
D | lzo.c | 18 static void *lzo_alloc_ctx(struct crypto_scomp *tfm) in lzo_alloc_ctx() argument 29 static int lzo_init(struct crypto_tfm *tfm) in lzo_init() argument 31 struct lzo_ctx *ctx = crypto_tfm_ctx(tfm); in lzo_init() 40 static void lzo_free_ctx(struct crypto_scomp *tfm, void *ctx) in lzo_free_ctx() argument 45 static void lzo_exit(struct crypto_tfm *tfm) in lzo_exit() argument 47 struct lzo_ctx *ctx = crypto_tfm_ctx(tfm); in lzo_exit() 67 static int lzo_compress(struct crypto_tfm *tfm, const u8 *src, in lzo_compress() argument 70 struct lzo_ctx *ctx = crypto_tfm_ctx(tfm); in lzo_compress() 75 static int lzo_scompress(struct crypto_scomp *tfm, const u8 *src, in lzo_scompress() argument 97 static int lzo_decompress(struct crypto_tfm *tfm, const u8 *src, in lzo_decompress() argument [all …]
|
D | crypto_null.c | 27 static int null_compress(struct crypto_tfm *tfm, const u8 *src, in null_compress() argument 59 static int null_hash_setkey(struct crypto_shash *tfm, const u8 *key, in null_hash_setkey() argument 63 static int null_skcipher_setkey(struct crypto_skcipher *tfm, const u8 *key, in null_skcipher_setkey() argument 67 static int null_setkey(struct crypto_tfm *tfm, const u8 *key, in null_setkey() argument 71 static void null_crypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in null_crypt() argument 155 struct crypto_sync_skcipher *tfm; in crypto_get_default_null_skcipher() local 158 tfm = crypto_default_null_skcipher; in crypto_get_default_null_skcipher() 160 if (!tfm) { in crypto_get_default_null_skcipher() 161 tfm = crypto_alloc_sync_skcipher("ecb(cipher_null)", 0, 0); in crypto_get_default_null_skcipher() 162 if (IS_ERR(tfm)) in crypto_get_default_null_skcipher() [all …]
|
/crypto/asymmetric_keys/ |
D | public_key.c | 106 struct crypto_akcipher *tfm; in software_key_query() local 118 tfm = crypto_alloc_akcipher(alg_name, 0, 0); in software_key_query() 119 if (IS_ERR(tfm)) in software_key_query() 120 return PTR_ERR(tfm); in software_key_query() 133 ret = crypto_akcipher_set_priv_key(tfm, key, pkey->keylen); in software_key_query() 135 ret = crypto_akcipher_set_pub_key(tfm, key, pkey->keylen); in software_key_query() 139 len = crypto_akcipher_maxsize(tfm); in software_key_query() 155 crypto_free_akcipher(tfm); in software_key_query() 168 struct crypto_akcipher *tfm; in software_key_eds_op() local 183 tfm = crypto_alloc_akcipher(alg_name, 0, 0); in software_key_eds_op() [all …]
|