/crypto/ |
D | shash.c | 23 static int shash_no_setkey(struct crypto_shash *tfm, const u8 *key, in shash_no_setkey() argument 42 static int shash_setkey_unaligned(struct crypto_shash *tfm, const u8 *key, in shash_setkey_unaligned() argument 45 struct shash_alg *shash = crypto_shash_alg(tfm); in shash_setkey_unaligned() 46 unsigned long alignmask = crypto_shash_alignmask(tfm); in shash_setkey_unaligned() 58 err = shash->setkey(tfm, alignbuffer, keylen); in shash_setkey_unaligned() 63 static void shash_set_needkey(struct crypto_shash *tfm, struct shash_alg *alg) in shash_set_needkey() argument 66 crypto_shash_set_flags(tfm, CRYPTO_TFM_NEED_KEY); in shash_set_needkey() 69 int crypto_shash_setkey(struct crypto_shash *tfm, const u8 *key, in crypto_shash_setkey() argument 72 struct shash_alg *shash = crypto_shash_alg(tfm); in crypto_shash_setkey() 73 unsigned long alignmask = crypto_shash_alignmask(tfm); in crypto_shash_setkey() [all …]
|
D | cfb.c | 31 static unsigned int crypto_cfb_bsize(struct crypto_skcipher *tfm) in crypto_cfb_bsize() argument 33 return crypto_cipher_blocksize(skcipher_cipher_simple(tfm)); in crypto_cfb_bsize() 36 static void crypto_cfb_encrypt_one(struct crypto_skcipher *tfm, in crypto_cfb_encrypt_one() argument 39 crypto_cipher_encrypt_one(skcipher_cipher_simple(tfm), dst, src); in crypto_cfb_encrypt_one() 44 struct crypto_skcipher *tfm) in crypto_cfb_final() argument 46 const unsigned long alignmask = crypto_skcipher_alignmask(tfm); in crypto_cfb_final() 54 crypto_cfb_encrypt_one(tfm, iv, stream); in crypto_cfb_final() 59 struct crypto_skcipher *tfm) in crypto_cfb_encrypt_segment() argument 61 const unsigned int bsize = crypto_cfb_bsize(tfm); in crypto_cfb_encrypt_segment() 68 crypto_cfb_encrypt_one(tfm, iv, dst); in crypto_cfb_encrypt_segment() [all …]
|
D | cipher.c | 20 static int setkey_unaligned(struct crypto_cipher *tfm, const u8 *key, in setkey_unaligned() argument 23 struct cipher_alg *cia = crypto_cipher_alg(tfm); in setkey_unaligned() 24 unsigned long alignmask = crypto_cipher_alignmask(tfm); in setkey_unaligned() 36 ret = cia->cia_setkey(crypto_cipher_tfm(tfm), alignbuffer, keylen); in setkey_unaligned() 43 int crypto_cipher_setkey(struct crypto_cipher *tfm, in crypto_cipher_setkey() argument 46 struct cipher_alg *cia = crypto_cipher_alg(tfm); in crypto_cipher_setkey() 47 unsigned long alignmask = crypto_cipher_alignmask(tfm); in crypto_cipher_setkey() 53 return setkey_unaligned(tfm, key, keylen); in crypto_cipher_setkey() 55 return cia->cia_setkey(crypto_cipher_tfm(tfm), key, keylen); in crypto_cipher_setkey() 59 static inline void cipher_crypt_one(struct crypto_cipher *tfm, in cipher_crypt_one() argument [all …]
|
D | cryptd.c | 141 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() 242 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cryptd_skcipher_complete() local 243 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in cryptd_skcipher_complete() 252 crypto_free_skcipher(tfm); in cryptd_skcipher_complete() 260 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cryptd_skcipher_encrypt() local 261 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in cryptd_skcipher_encrypt() 288 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cryptd_skcipher_decrypt() local 289 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in cryptd_skcipher_decrypt() [all …]
|
D | api.c | 333 static int crypto_init_ops(struct crypto_tfm *tfm, u32 type, u32 mask) in crypto_init_ops() argument 335 const struct crypto_type *type_obj = tfm->__crt_alg->cra_type; in crypto_init_ops() 338 return type_obj->init(tfm, type, mask); in crypto_init_ops() 342 static void crypto_exit_ops(struct crypto_tfm *tfm) in crypto_exit_ops() argument 344 const struct crypto_type *type = tfm->__crt_alg->cra_type; in crypto_exit_ops() 346 if (type && tfm->exit) in crypto_exit_ops() 347 tfm->exit(tfm); in crypto_exit_ops() 386 struct crypto_tfm *tfm = NULL; in __crypto_alloc_tfm() local 390 tfm_size = sizeof(*tfm) + crypto_ctxsize(alg, type, mask); in __crypto_alloc_tfm() 391 tfm = kzalloc(tfm_size, GFP_KERNEL); in __crypto_alloc_tfm() [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() 57 crypto_skcipher_set_flags(child, crypto_skcipher_get_flags(tfm) & in simd_skcipher_setkey() 64 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in simd_skcipher_encrypt() local 65 struct simd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in simd_skcipher_encrypt() 85 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in simd_skcipher_decrypt() local 86 struct simd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in simd_skcipher_decrypt() 104 static void simd_skcipher_exit(struct crypto_skcipher *tfm) in simd_skcipher_exit() argument 106 struct simd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in simd_skcipher_exit() 111 static int simd_skcipher_init(struct crypto_skcipher *tfm) in simd_skcipher_init() argument [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() 37 static void crypto_des_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in crypto_des_encrypt() argument 39 const struct des_ctx *dctx = crypto_tfm_ctx(tfm); in crypto_des_encrypt() 44 static void crypto_des_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in crypto_des_decrypt() argument 46 const struct des_ctx *dctx = crypto_tfm_ctx(tfm); in crypto_des_decrypt() 51 static int des3_ede_setkey(struct crypto_tfm *tfm, const u8 *key, in des3_ede_setkey() argument 54 struct des3_ede_ctx *dctx = crypto_tfm_ctx(tfm); in des3_ede_setkey() 59 if (crypto_tfm_get_flags(tfm) & CRYPTO_TFM_REQ_FORBID_WEAK_KEYS) in des3_ede_setkey() [all …]
|
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() 381 struct aead_tfm *tfm; in aead_check_key() local 391 tfm = pask->private; in aead_check_key() [all …]
|
D | ctr.c | 29 struct crypto_cipher *tfm) in crypto_ctr_crypt_final() argument 31 unsigned int bsize = crypto_cipher_blocksize(tfm); in crypto_ctr_crypt_final() 32 unsigned long alignmask = crypto_cipher_alignmask(tfm); in crypto_ctr_crypt_final() 40 crypto_cipher_encrypt_one(tfm, keystream, ctrblk); in crypto_ctr_crypt_final() 47 struct crypto_cipher *tfm) in crypto_ctr_crypt_segment() argument 50 crypto_cipher_alg(tfm)->cia_encrypt; in crypto_ctr_crypt_segment() 51 unsigned int bsize = crypto_cipher_blocksize(tfm); in crypto_ctr_crypt_segment() 59 fn(crypto_cipher_tfm(tfm), dst, ctrblk); in crypto_ctr_crypt_segment() 73 struct crypto_cipher *tfm) in crypto_ctr_crypt_inplace() argument 76 crypto_cipher_alg(tfm)->cia_encrypt; in crypto_ctr_crypt_inplace() [all …]
|
D | aead.c | 22 static int setkey_unaligned(struct crypto_aead *tfm, const u8 *key, in setkey_unaligned() argument 25 unsigned long alignmask = crypto_aead_alignmask(tfm); in setkey_unaligned() 37 ret = crypto_aead_alg(tfm)->setkey(tfm, alignbuffer, keylen); in setkey_unaligned() 43 int crypto_aead_setkey(struct crypto_aead *tfm, in crypto_aead_setkey() argument 46 unsigned long alignmask = crypto_aead_alignmask(tfm); in crypto_aead_setkey() 50 err = setkey_unaligned(tfm, key, keylen); in crypto_aead_setkey() 52 err = crypto_aead_alg(tfm)->setkey(tfm, key, keylen); in crypto_aead_setkey() 55 crypto_aead_set_flags(tfm, CRYPTO_TFM_NEED_KEY); in crypto_aead_setkey() 59 crypto_aead_clear_flags(tfm, CRYPTO_TFM_NEED_KEY); in crypto_aead_setkey() 64 int crypto_aead_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in crypto_aead_setauthsize() argument [all …]
|
D | fips140-alg-registration.c | 134 static int fips140_alg_init_tfm(struct crypto_tfm *tfm) in fips140_alg_init_tfm() argument 136 struct crypto_alg *alg = tfm->__crt_alg; in fips140_alg_init_tfm() 137 int (*cra_init)(struct crypto_tfm *tfm) = in fips140_alg_init_tfm() 142 return cra_init ? cra_init(tfm) : 0; in fips140_alg_init_tfm() 145 static int fips140_aead_init_tfm(struct crypto_aead *tfm) in fips140_aead_init_tfm() argument 147 struct aead_alg *alg = crypto_aead_alg(tfm); in fips140_aead_init_tfm() 148 int (*init)(struct crypto_aead *tfm) = in fips140_aead_init_tfm() 153 return init ? init(tfm) : 0; in fips140_aead_init_tfm() 156 static int fips140_ahash_init_tfm(struct crypto_ahash *tfm) in fips140_ahash_init_tfm() argument 158 struct hash_alg_common *halg = crypto_hash_alg_common(tfm); in fips140_ahash_init_tfm() [all …]
|
D | ahash.c | 137 static int ahash_setkey_unaligned(struct crypto_ahash *tfm, const u8 *key, in ahash_setkey_unaligned() argument 140 unsigned long alignmask = crypto_ahash_alignmask(tfm); in ahash_setkey_unaligned() 152 ret = tfm->setkey(tfm, alignbuffer, keylen); in ahash_setkey_unaligned() 157 static int ahash_nosetkey(struct crypto_ahash *tfm, const u8 *key, in ahash_nosetkey() argument 163 static void ahash_set_needkey(struct crypto_ahash *tfm) in ahash_set_needkey() argument 165 const struct hash_alg_common *alg = crypto_hash_alg_common(tfm); in ahash_set_needkey() 167 if (tfm->setkey != ahash_nosetkey && in ahash_set_needkey() 169 crypto_ahash_set_flags(tfm, CRYPTO_TFM_NEED_KEY); in ahash_set_needkey() 172 int crypto_ahash_setkey(struct crypto_ahash *tfm, const u8 *key, in crypto_ahash_setkey() argument 175 unsigned long alignmask = crypto_ahash_alignmask(tfm); in crypto_ahash_setkey() [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 | pcbc.c | 22 struct crypto_cipher *tfm) in crypto_pcbc_encrypt_segment() argument 24 int bsize = crypto_cipher_blocksize(tfm); in crypto_pcbc_encrypt_segment() 32 crypto_cipher_encrypt_one(tfm, dst, iv); in crypto_pcbc_encrypt_segment() 44 struct crypto_cipher *tfm) in crypto_pcbc_encrypt_inplace() argument 46 int bsize = crypto_cipher_blocksize(tfm); in crypto_pcbc_encrypt_inplace() 55 crypto_cipher_encrypt_one(tfm, src, iv); in crypto_pcbc_encrypt_inplace() 66 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in crypto_pcbc_encrypt() local 67 struct crypto_cipher *cipher = skcipher_cipher_simple(tfm); in crypto_pcbc_encrypt() 89 struct crypto_cipher *tfm) in crypto_pcbc_decrypt_segment() argument 91 int bsize = crypto_cipher_blocksize(tfm); in crypto_pcbc_decrypt_segment() [all …]
|
D | ansi_cprng.c | 47 struct crypto_cipher *tfm; member 156 crypto_cipher_encrypt_one(ctx->tfm, output, tmp); in _get_more_prng_bytes() 273 crypto_free_cipher(ctx->tfm); in free_prng_context() 306 ret = crypto_cipher_setkey(ctx->tfm, prng_key, klen); in reset_prng_context() 309 crypto_cipher_get_flags(ctx->tfm)); in reset_prng_context() 320 static int cprng_init(struct crypto_tfm *tfm) in cprng_init() argument 322 struct prng_context *ctx = crypto_tfm_ctx(tfm); in cprng_init() 325 ctx->tfm = crypto_alloc_cipher("aes", 0, 0); in cprng_init() 326 if (IS_ERR(ctx->tfm)) { in cprng_init() 329 return PTR_ERR(ctx->tfm); in cprng_init() [all …]
|
D | skcipher.c | 452 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in skcipher_walk_skcipher() local 469 walk->blocksize = crypto_skcipher_blocksize(tfm); in skcipher_walk_skcipher() 470 walk->stride = crypto_skcipher_walksize(tfm); in skcipher_walk_skcipher() 471 walk->ivsize = crypto_skcipher_ivsize(tfm); in skcipher_walk_skcipher() 472 walk->alignmask = crypto_skcipher_alignmask(tfm); in skcipher_walk_skcipher() 508 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in skcipher_walk_aead_common() local 534 walk->blocksize = crypto_aead_blocksize(tfm); in skcipher_walk_aead_common() 535 walk->stride = crypto_aead_chunksize(tfm); in skcipher_walk_aead_common() 536 walk->ivsize = crypto_aead_ivsize(tfm); in skcipher_walk_aead_common() 537 walk->alignmask = crypto_aead_alignmask(tfm); in skcipher_walk_aead_common() [all …]
|
D | ecdh.c | 21 static inline struct ecdh_ctx *ecdh_get_ctx(struct crypto_kpp *tfm) in ecdh_get_ctx() argument 23 return kpp_tfm_ctx(tfm); in ecdh_get_ctx() 26 static int ecdh_set_secret(struct crypto_kpp *tfm, const void *buf, in ecdh_set_secret() argument 29 struct ecdh_ctx *ctx = ecdh_get_ctx(tfm); in ecdh_set_secret() 52 struct crypto_kpp *tfm = crypto_kpp_reqtfm(req); in ecdh_compute_value() local 53 struct ecdh_ctx *ctx = ecdh_get_ctx(tfm); in ecdh_compute_value() 118 static unsigned int ecdh_max_size(struct crypto_kpp *tfm) in ecdh_max_size() argument 120 struct ecdh_ctx *ctx = ecdh_get_ctx(tfm); in ecdh_max_size() 126 static int ecdh_nist_p192_init_tfm(struct crypto_kpp *tfm) in ecdh_nist_p192_init_tfm() argument 128 struct ecdh_ctx *ctx = ecdh_get_ctx(tfm); in ecdh_nist_p192_init_tfm() [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 | 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 | 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 | 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 | 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 …]
|
D | essiv.c | 66 static int essiv_skcipher_setkey(struct crypto_skcipher *tfm, in essiv_skcipher_setkey() argument 69 struct essiv_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in essiv_skcipher_setkey() 75 crypto_skcipher_get_flags(tfm) & in essiv_skcipher_setkey() 87 crypto_skcipher_get_flags(tfm) & in essiv_skcipher_setkey() 93 static int essiv_aead_setkey(struct crypto_aead *tfm, const u8 *key, in essiv_aead_setkey() argument 96 struct essiv_tfm_ctx *tctx = crypto_aead_ctx(tfm); in essiv_aead_setkey() 103 crypto_aead_set_flags(tctx->u.aead, crypto_aead_get_flags(tfm) & in essiv_aead_setkey() 112 desc->tfm = tctx->hash; in essiv_aead_setkey() 120 crypto_cipher_set_flags(tctx->essiv_cipher, crypto_aead_get_flags(tfm) & in essiv_aead_setkey() 126 static int essiv_aead_setauthsize(struct crypto_aead *tfm, in essiv_aead_setauthsize() argument [all …]
|
D | rsa.c | 49 static inline struct rsa_mpi_key *rsa_get_key(struct crypto_akcipher *tfm) in rsa_get_key() argument 51 return akcipher_tfm_ctx(tfm); in rsa_get_key() 56 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); in rsa_enc() local 57 const struct rsa_mpi_key *pkey = rsa_get_key(tfm); in rsa_enc() 95 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); in rsa_dec() local 96 const struct rsa_mpi_key *pkey = rsa_get_key(tfm); in rsa_dec() 156 static int rsa_set_pub_key(struct crypto_akcipher *tfm, const void *key, in rsa_set_pub_key() argument 159 struct rsa_mpi_key *mpi_key = akcipher_tfm_ctx(tfm); in rsa_set_pub_key() 190 static int rsa_set_priv_key(struct crypto_akcipher *tfm, const void *key, in rsa_set_priv_key() argument 193 struct rsa_mpi_key *mpi_key = akcipher_tfm_ctx(tfm); in rsa_set_priv_key() [all …]
|
/crypto/asymmetric_keys/ |
D | public_key.c | 154 struct crypto_akcipher *tfm; in software_key_query() local 165 tfm = crypto_alloc_akcipher(alg_name, 0, 0); in software_key_query() 166 if (IS_ERR(tfm)) in software_key_query() 167 return PTR_ERR(tfm); in software_key_query() 181 ret = crypto_akcipher_set_priv_key(tfm, key, pkey->keylen); in software_key_query() 183 ret = crypto_akcipher_set_pub_key(tfm, key, pkey->keylen); in software_key_query() 187 len = crypto_akcipher_maxsize(tfm); in software_key_query() 223 crypto_free_akcipher(tfm); in software_key_query() 236 struct crypto_akcipher *tfm; in software_key_eds_op() local 250 tfm = crypto_alloc_akcipher(alg_name, 0, 0); in software_key_eds_op() [all …]
|