Home
last modified time | relevance | path

Searched refs:in_key (Results 1 – 25 of 37) sorted by relevance

12

/Linux-v5.4/drivers/crypto/nx/
Dnx-aes-ctr.c23 const u8 *in_key, in ctr_aes_nx_set_key() argument
49 memcpy(csbcpb->cpb.aes_ctr.key, in_key, key_len); in ctr_aes_nx_set_key()
55 const u8 *in_key, in ctr3686_aes_nx_set_key() argument
64 in_key + key_len - CTR_RFC3686_NONCE_SIZE, in ctr3686_aes_nx_set_key()
69 return ctr_aes_nx_set_key(tfm, in_key, key_len); in ctr3686_aes_nx_set_key()
Dnx-aes-ccm.c24 const u8 *in_key, in ccm_aes_nx_set_key() argument
44 memcpy(csbcpb->cpb.aes_ccm.key, in_key, key_len); in ccm_aes_nx_set_key()
47 memcpy(csbcpb_aead->cpb.aes_cca.key, in_key, key_len); in ccm_aes_nx_set_key()
54 const u8 *in_key, in ccm4309_aes_nx_set_key() argument
64 memcpy(nx_ctx->priv.ccm.nonce, in_key + key_len, 3); in ccm4309_aes_nx_set_key()
66 return ccm_aes_nx_set_key(tfm, in_key, key_len); in ccm4309_aes_nx_set_key()
Dnx-aes-gcm.c24 const u8 *in_key, in gcm_aes_nx_set_key() argument
54 memcpy(csbcpb->cpb.aes_gcm.key, in_key, key_len); in gcm_aes_nx_set_key()
57 memcpy(csbcpb_aead->cpb.aes_gca.key, in_key, key_len); in gcm_aes_nx_set_key()
63 const u8 *in_key, in gcm4106_aes_nx_set_key() argument
75 rc = gcm_aes_nx_set_key(tfm, in_key, key_len); in gcm4106_aes_nx_set_key()
79 memcpy(nonce, in_key + key_len, 4); in gcm4106_aes_nx_set_key()
Dnx-aes-cbc.c22 const u8 *in_key, in cbc_aes_nx_set_key() argument
48 memcpy(csbcpb->cpb.aes_cbc.key, in_key, key_len); in cbc_aes_nx_set_key()
Dnx-aes-ecb.c22 const u8 *in_key, in ecb_aes_nx_set_key() argument
48 memcpy(csbcpb->cpb.aes_ecb.key, in_key, key_len); in ecb_aes_nx_set_key()
/Linux-v5.4/arch/powerpc/crypto/
Daes-spe-glue.c89 static int ppc_aes_setkey(struct crypto_tfm *tfm, const u8 *in_key, in ppc_aes_setkey() argument
104 ppc_expand_key_128(ctx->key_enc, in_key); in ppc_aes_setkey()
108 ppc_expand_key_192(ctx->key_enc, in_key); in ppc_aes_setkey()
112 ppc_expand_key_256(ctx->key_enc, in_key); in ppc_aes_setkey()
121 static int ppc_xts_setkey(struct crypto_tfm *tfm, const u8 *in_key, in ppc_xts_setkey() argument
127 err = xts_check_key(tfm, in_key, key_len); in ppc_xts_setkey()
143 ppc_expand_key_128(ctx->key_enc, in_key); in ppc_xts_setkey()
144 ppc_expand_key_128(ctx->key_twk, in_key + AES_KEYSIZE_128); in ppc_xts_setkey()
148 ppc_expand_key_192(ctx->key_enc, in_key); in ppc_xts_setkey()
149 ppc_expand_key_192(ctx->key_twk, in_key + AES_KEYSIZE_192); in ppc_xts_setkey()
[all …]
/Linux-v5.4/arch/arm/crypto/
Daes-neonbs-glue.c66 static int aesbs_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in aesbs_setkey() argument
73 err = aes_expandkey(&rk, in_key, key_len); in aesbs_setkey()
125 static int aesbs_cbc_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in aesbs_cbc_setkey() argument
132 err = aes_expandkey(&rk, in_key, key_len); in aesbs_cbc_setkey()
142 return crypto_cipher_setkey(ctx->enc_tfm, in_key, key_len); in aesbs_cbc_setkey()
201 static int aesbs_ctr_setkey_sync(struct crypto_skcipher *tfm, const u8 *in_key, in aesbs_ctr_setkey_sync() argument
207 err = aes_expandkey(&ctx->fallback, in_key, key_len); in aesbs_ctr_setkey_sync()
285 static int aesbs_xts_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in aesbs_xts_setkey() argument
291 err = xts_verify_key(tfm, in_key, key_len); in aesbs_xts_setkey()
296 err = crypto_cipher_setkey(ctx->cts_tfm, in_key, key_len); in aesbs_xts_setkey()
[all …]
Daes-ce-glue.c69 static int ce_aes_expandkey(struct crypto_aes_ctx *ctx, const u8 *in_key, in ce_aes_expandkey() argument
90 ctx->key_enc[i] = get_unaligned_le32(in_key + i * sizeof(u32)); in ce_aes_expandkey()
137 static int ce_aes_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in ce_aes_setkey() argument
143 ret = ce_aes_expandkey(ctx, in_key, key_len); in ce_aes_setkey()
156 static int xts_set_key(struct crypto_skcipher *tfm, const u8 *in_key, in xts_set_key() argument
162 ret = xts_verify_key(tfm, in_key, key_len); in xts_set_key()
166 ret = ce_aes_expandkey(&ctx->key1, in_key, key_len / 2); in xts_set_key()
168 ret = ce_aes_expandkey(&ctx->key2, &in_key[key_len / 2], in xts_set_key()
/Linux-v5.4/arch/arm64/crypto/
Daes-ce-setkey.h3 int ce_aes_setkey(struct crypto_tfm *tfm, const u8 *in_key,
5 int ce_aes_expandkey(struct crypto_aes_ctx *ctx, const u8 *in_key,
Daes-neonbs-glue.c77 static int aesbs_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in aesbs_setkey() argument
84 err = aes_expandkey(&rk, in_key, key_len); in aesbs_setkey()
136 static int aesbs_cbc_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in aesbs_cbc_setkey() argument
143 err = aes_expandkey(&rk, in_key, key_len); in aesbs_cbc_setkey()
209 static int aesbs_ctr_setkey_sync(struct crypto_skcipher *tfm, const u8 *in_key, in aesbs_ctr_setkey_sync() argument
215 err = aes_expandkey(&ctx->fallback, in_key, key_len); in aesbs_ctr_setkey_sync()
269 static int aesbs_xts_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in aesbs_xts_setkey() argument
276 err = xts_verify_key(tfm, in_key, key_len); in aesbs_xts_setkey()
281 err = aes_expandkey(&ctx->cts, in_key, key_len); in aesbs_xts_setkey()
285 err = aes_expandkey(&rk, in_key + key_len, key_len); in aesbs_xts_setkey()
[all …]
Daes-ce-glue.c74 int ce_aes_expandkey(struct crypto_aes_ctx *ctx, const u8 *in_key, in ce_aes_expandkey() argument
95 ctx->key_enc[i] = get_unaligned_le32(in_key + i * sizeof(u32)); in ce_aes_expandkey()
142 int ce_aes_setkey(struct crypto_tfm *tfm, const u8 *in_key, in ce_aes_setkey() argument
148 ret = ce_aes_expandkey(ctx, in_key, key_len); in ce_aes_setkey()
Daes-glue.c131 static int skcipher_aes_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in skcipher_aes_setkey() argument
137 ret = aes_expandkey(ctx, in_key, key_len); in skcipher_aes_setkey()
145 const u8 *in_key, unsigned int key_len) in xts_set_key() argument
150 ret = xts_verify_key(tfm, in_key, key_len); in xts_set_key()
154 ret = aes_expandkey(&ctx->key1, in_key, key_len / 2); in xts_set_key()
156 ret = aes_expandkey(&ctx->key2, &in_key[key_len / 2], in xts_set_key()
166 const u8 *in_key, in essiv_cbc_set_key() argument
174 ret = aes_expandkey(&ctx->key1, in_key, key_len); in essiv_cbc_set_key()
179 crypto_shash_digest(desc, in_key, key_len, digest); in essiv_cbc_set_key()
790 static int cbcmac_setkey(struct crypto_shash *tfm, const u8 *in_key, in cbcmac_setkey() argument
[all …]
/Linux-v5.4/crypto/
Dsm4_generic.c116 int crypto_sm4_expand_key(struct crypto_sm4_ctx *ctx, const u8 *in_key, in crypto_sm4_expand_key() argument
120 const u32 *key = (u32 *)in_key; in crypto_sm4_expand_key()
156 int crypto_sm4_set_key(struct crypto_tfm *tfm, const u8 *in_key, in crypto_sm4_set_key() argument
163 ret = crypto_sm4_expand_key(ctx, in_key, key_len); in crypto_sm4_set_key()
Darc4.c16 static int crypto_arc4_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in crypto_arc4_setkey() argument
21 return arc4_setkey(ctx, in_key, key_len); in crypto_arc4_setkey()
Daes_ti.c12 static int aesti_set_key(struct crypto_tfm *tfm, const u8 *in_key, in aesti_set_key() argument
17 return aes_expandkey(ctx, in_key, key_len); in aesti_set_key()
Dtea.c42 static int tea_setkey(struct crypto_tfm *tfm, const u8 *in_key, in tea_setkey() argument
46 const __le32 *key = (const __le32 *)in_key; in tea_setkey()
115 static int xtea_setkey(struct crypto_tfm *tfm, const u8 *in_key, in xtea_setkey() argument
119 const __le32 *key = (const __le32 *)in_key; in xtea_setkey()
Dkhazad.c756 static int khazad_setkey(struct crypto_tfm *tfm, const u8 *in_key, in khazad_setkey() argument
760 const __be32 *key = (const __be32 *)in_key; in khazad_setkey()
/Linux-v5.4/include/crypto/
Dsm4.h23 int crypto_sm4_set_key(struct crypto_tfm *tfm, const u8 *in_key,
25 int crypto_sm4_expand_key(struct crypto_sm4_ctx *ctx, const u8 *in_key,
Daes.h51 int crypto_aes_set_key(struct crypto_tfm *tfm, const u8 *in_key,
68 int aes_expandkey(struct crypto_aes_ctx *ctx, const u8 *in_key,
Darc4.h20 int arc4_setkey(struct arc4_ctx *ctx, const u8 *in_key, unsigned int key_len);
/Linux-v5.4/arch/s390/crypto/
Daes_s390.c71 static int setkey_fallback_cip(struct crypto_tfm *tfm, const u8 *in_key, in setkey_fallback_cip() argument
81 ret = crypto_cipher_setkey(sctx->fallback.cip, in_key, key_len); in setkey_fallback_cip()
90 static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in aes_set_key() argument
104 return setkey_fallback_cip(tfm, in_key, key_len); in aes_set_key()
107 memcpy(sctx->key, in_key, key_len); in aes_set_key()
237 static int ecb_aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in ecb_aes_set_key() argument
251 return setkey_fallback_blk(tfm, in_key, key_len); in ecb_aes_set_key()
254 memcpy(sctx->key, in_key, key_len); in ecb_aes_set_key()
352 static int cbc_aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in cbc_aes_set_key() argument
366 return setkey_fallback_blk(tfm, in_key, key_len); in cbc_aes_set_key()
[all …]
Dpaes_s390.c142 static int ecb_paes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in ecb_paes_set_key() argument
149 rc = _copy_key_to_kb(&ctx->kb, in_key, key_len); in ecb_paes_set_key()
261 static int cbc_paes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in cbc_paes_set_key() argument
268 rc = _copy_key_to_kb(&ctx->kb, in_key, key_len); in cbc_paes_set_key()
394 static int xts_paes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in xts_paes_set_key() argument
409 rc = _copy_key_to_kb(&ctx->kb[0], in_key, key_len); in xts_paes_set_key()
412 rc = _copy_key_to_kb(&ctx->kb[1], in_key + key_len, key_len); in xts_paes_set_key()
558 static int ctr_paes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in ctr_paes_set_key() argument
565 rc = _copy_key_to_kb(&ctx->kb, in_key, key_len); in ctr_paes_set_key()
/Linux-v5.4/lib/crypto/
Darc4.c13 int arc4_setkey(struct arc4_ctx *ctx, const u8 *in_key, unsigned int key_len) in arc4_setkey() argument
26 j = (j + in_key[k] + a) & 0xff; in arc4_setkey()
/Linux-v5.4/arch/sparc/crypto/
Dcamellia_glue.c33 extern void camellia_sparc64_key_expand(const u32 *in_key, u64 *encrypt_key,
40 const u32 *in_key = (const u32 *) _in_key; in camellia_set_key() local
50 camellia_sparc64_key_expand(in_key, &ctx->encrypt_key[0], in camellia_set_key()
/Linux-v5.4/net/mac802154/
Dllsec.c908 const struct ieee802154_llsec_key_id *in_key) in llsec_update_devkey_record() argument
912 devkey = llsec_devkey_find(dev, in_key); in llsec_update_devkey_record()
921 next->devkey.key_id = *in_key; in llsec_update_devkey_record()
925 devkey = llsec_devkey_find(dev, in_key); in llsec_update_devkey_record()
939 const struct ieee802154_llsec_key_id *in_key, in llsec_update_devkey_info() argument
945 devkey = llsec_devkey_find(dev, in_key); in llsec_update_devkey_info()
951 int rc = llsec_update_devkey_record(dev, in_key); in llsec_update_devkey_info()

12