Home
last modified time | relevance | path

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

/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-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
147 return ce_aes_expandkey(ctx, in_key, key_len); in ce_aes_setkey()
Daes-neonbs-glue.c72 static int aesbs_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in aesbs_setkey() argument
79 err = aes_expandkey(&rk, in_key, key_len); in aesbs_setkey()
131 static int aesbs_cbc_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in aesbs_cbc_setkey() argument
138 err = aes_expandkey(&rk, in_key, key_len); in aesbs_cbc_setkey()
246 static int aesbs_xts_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in aesbs_xts_setkey() argument
253 err = xts_verify_key(tfm, in_key, key_len); in aesbs_xts_setkey()
258 err = aes_expandkey(&ctx->cts, in_key, key_len); in aesbs_xts_setkey()
262 err = aes_expandkey(&rk, in_key + key_len, key_len); in aesbs_xts_setkey()
268 return aesbs_setkey(tfm, in_key, key_len); in aesbs_xts_setkey()
Daes-glue.c137 static int skcipher_aes_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in skcipher_aes_setkey() argument
142 return aes_expandkey(ctx, in_key, key_len); in skcipher_aes_setkey()
146 const u8 *in_key, unsigned int key_len) in xts_set_key() argument
151 ret = xts_verify_key(tfm, in_key, key_len); in xts_set_key()
155 ret = aes_expandkey(&ctx->key1, in_key, key_len / 2); in xts_set_key()
157 ret = aes_expandkey(&ctx->key2, &in_key[key_len / 2], in xts_set_key()
163 const u8 *in_key, in essiv_cbc_set_key() argument
170 ret = aes_expandkey(&ctx->key1, in_key, key_len); in essiv_cbc_set_key()
174 crypto_shash_tfm_digest(ctx->hash, in_key, key_len, digest); in essiv_cbc_set_key()
800 static int cbcmac_setkey(struct crypto_shash *tfm, const u8 *in_key, in cbcmac_setkey() argument
[all …]
Daes-ce-ccm-glue.c46 static int ccm_setkey(struct crypto_aead *tfm, const u8 *in_key, in ccm_setkey() argument
51 return ce_aes_expandkey(ctx, in_key, key_len); in ccm_setkey()
/arch/powerpc/crypto/
Daes-spe-glue.c92 static int ppc_aes_setkey(struct crypto_tfm *tfm, const u8 *in_key, in ppc_aes_setkey() argument
100 ppc_expand_key_128(ctx->key_enc, in_key); in ppc_aes_setkey()
104 ppc_expand_key_192(ctx->key_enc, in_key); in ppc_aes_setkey()
108 ppc_expand_key_256(ctx->key_enc, in_key); in ppc_aes_setkey()
120 const u8 *in_key, unsigned int key_len) in ppc_aes_setkey_skcipher() argument
122 return ppc_aes_setkey(crypto_skcipher_tfm(tfm), in_key, key_len); in ppc_aes_setkey_skcipher()
125 static int ppc_xts_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in ppc_xts_setkey() argument
131 err = xts_verify_key(tfm, in_key, key_len); in ppc_xts_setkey()
140 ppc_expand_key_128(ctx->key_enc, in_key); in ppc_xts_setkey()
141 ppc_expand_key_128(ctx->key_twk, in_key + AES_KEYSIZE_128); in ppc_xts_setkey()
[all …]
/arch/arm/crypto/
Daes-neonbs-glue.c68 static int aesbs_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in aesbs_setkey() argument
75 err = aes_expandkey(&rk, in_key, key_len); in aesbs_setkey()
127 static int aesbs_cbc_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in aesbs_cbc_setkey() argument
134 err = aes_expandkey(&rk, in_key, key_len); in aesbs_cbc_setkey()
145 return crypto_skcipher_setkey(ctx->enc_tfm, in_key, key_len); in aesbs_cbc_setkey()
216 static int aesbs_ctr_setkey_sync(struct crypto_skcipher *tfm, const u8 *in_key, in aesbs_ctr_setkey_sync() argument
222 err = aes_expandkey(&ctx->fallback, in_key, key_len); in aesbs_ctr_setkey_sync()
300 static int aesbs_xts_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in aesbs_xts_setkey() argument
306 err = xts_verify_key(tfm, in_key, key_len); in aesbs_xts_setkey()
311 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
142 return ce_aes_expandkey(ctx, in_key, key_len); in ce_aes_setkey()
150 static int xts_set_key(struct crypto_skcipher *tfm, const u8 *in_key, in xts_set_key() argument
156 ret = xts_verify_key(tfm, in_key, key_len); in xts_set_key()
160 ret = ce_aes_expandkey(&ctx->key1, in_key, key_len / 2); in xts_set_key()
162 ret = ce_aes_expandkey(&ctx->key2, &in_key[key_len / 2], in xts_set_key()
/arch/s390/crypto/
Daes_s390.c72 static int setkey_fallback_cip(struct crypto_tfm *tfm, const u8 *in_key, in setkey_fallback_cip() argument
81 return crypto_cipher_setkey(sctx->fallback.cip, in_key, key_len); in setkey_fallback_cip()
84 static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in aes_set_key() argument
98 return setkey_fallback_cip(tfm, in_key, key_len); in aes_set_key()
101 memcpy(sctx->key, in_key, key_len); in aes_set_key()
201 static int ecb_aes_set_key(struct crypto_skcipher *tfm, const u8 *in_key, in ecb_aes_set_key() argument
215 return setkey_fallback_skcipher(tfm, in_key, key_len); in ecb_aes_set_key()
218 memcpy(sctx->key, in_key, key_len); in ecb_aes_set_key()
297 static int cbc_aes_set_key(struct crypto_skcipher *tfm, const u8 *in_key, in cbc_aes_set_key() argument
311 return setkey_fallback_skcipher(tfm, in_key, key_len); in cbc_aes_set_key()
[all …]
Dpaes_s390.c196 static int ecb_paes_set_key(struct crypto_skcipher *tfm, const u8 *in_key, in ecb_paes_set_key() argument
203 rc = _key_to_kb(&ctx->kb, in_key, key_len); in ecb_paes_set_key()
311 static int cbc_paes_set_key(struct crypto_skcipher *tfm, const u8 *in_key, in cbc_paes_set_key() argument
318 rc = _key_to_kb(&ctx->kb, in_key, key_len); in cbc_paes_set_key()
450 static int xts_paes_set_key(struct crypto_skcipher *tfm, const u8 *in_key, in xts_paes_set_key() argument
465 rc = _key_to_kb(&ctx->kb[0], in_key, key_len); in xts_paes_set_key()
468 rc = _key_to_kb(&ctx->kb[1], in_key + key_len, key_len); in xts_paes_set_key()
609 static int ctr_paes_set_key(struct crypto_skcipher *tfm, const u8 *in_key, in ctr_paes_set_key() argument
616 rc = _key_to_kb(&ctx->kb, in_key, key_len); in ctr_paes_set_key()
/arch/sparc/crypto/
Dcamellia_glue.c34 extern void camellia_sparc64_key_expand(const u32 *in_key, u64 *encrypt_key,
41 const u32 *in_key = (const u32 *) _in_key; in camellia_set_key() local
48 camellia_sparc64_key_expand(in_key, &ctx->encrypt_key[0], in camellia_set_key()
54 const u8 *in_key, unsigned int key_len) in camellia_set_key_skcipher() argument
56 return camellia_set_key(crypto_skcipher_tfm(tfm), in_key, key_len); in camellia_set_key_skcipher()
Daes_glue.c165 extern void aes_sparc64_key_expand(const u32 *in_key, u64 *output_key,
168 static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in aes_set_key() argument
193 aes_sparc64_key_expand((const u32 *)in_key, &ctx->key[0], key_len); in aes_set_key()
199 static int aes_set_key_skcipher(struct crypto_skcipher *tfm, const u8 *in_key, in aes_set_key_skcipher() argument
202 return aes_set_key(crypto_skcipher_tfm(tfm), in_key, key_len); in aes_set_key_skcipher()
/arch/x86/crypto/
Daesni-intel_glue.c83 asmlinkage int aesni_set_key(struct crypto_aes_ctx *ctx, const u8 *in_key,
233 const u8 *in_key, unsigned int key_len) in aes_set_key_common() argument
243 err = aes_expandkey(ctx, in_key, key_len); in aes_set_key_common()
246 err = aesni_set_key(ctx, in_key, key_len); in aes_set_key_common()
253 static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in aes_set_key() argument
256 return aes_set_key_common(tfm, crypto_tfm_ctx(tfm), in_key, key_len); in aes_set_key()
Daesni-intel_asm.S1833 movl (FRAME_OFFSET+12)(%esp), UKEYP # in_key