/Linux-v4.19/crypto/ |
D | aes_generic.c | 1217 int crypto_aes_expand_key(struct crypto_aes_ctx *ctx, const u8 *in_key, in crypto_aes_expand_key() argument 1228 ctx->key_enc[0] = get_unaligned_le32(in_key); in crypto_aes_expand_key() 1229 ctx->key_enc[1] = get_unaligned_le32(in_key + 4); in crypto_aes_expand_key() 1230 ctx->key_enc[2] = get_unaligned_le32(in_key + 8); in crypto_aes_expand_key() 1231 ctx->key_enc[3] = get_unaligned_le32(in_key + 12); in crypto_aes_expand_key() 1246 ctx->key_enc[4] = get_unaligned_le32(in_key + 16); in crypto_aes_expand_key() 1247 t = ctx->key_enc[5] = get_unaligned_le32(in_key + 20); in crypto_aes_expand_key() 1253 ctx->key_enc[4] = get_unaligned_le32(in_key + 16); in crypto_aes_expand_key() 1254 ctx->key_enc[5] = get_unaligned_le32(in_key + 20); in crypto_aes_expand_key() 1255 ctx->key_enc[6] = get_unaligned_le32(in_key + 24); in crypto_aes_expand_key() [all …]
|
D | sm4_generic.c | 116 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()
|
D | tea.c | 47 static int tea_setkey(struct crypto_tfm *tfm, const u8 *in_key, in tea_setkey() argument 51 const __le32 *key = (const __le32 *)in_key; in tea_setkey() 120 static int xtea_setkey(struct crypto_tfm *tfm, const u8 *in_key, in xtea_setkey() argument 124 const __le32 *key = (const __le32 *)in_key; in xtea_setkey()
|
D | aes_ti.c | 170 static int aesti_expand_key(struct crypto_aes_ctx *ctx, const u8 *in_key, in aesti_expand_key() argument 184 ctx->key_enc[i] = get_unaligned_le32(in_key + i * sizeof(u32)); in aesti_expand_key() 236 static int aesti_set_key(struct crypto_tfm *tfm, const u8 *in_key, in aesti_set_key() argument 242 err = aesti_expand_key(ctx, in_key, key_len); in aesti_set_key()
|
D | arc4.c | 29 static int arc4_set_key(struct crypto_tfm *tfm, const u8 *in_key, in arc4_set_key() argument 43 j = (j + in_key[k] + a) & 0xff; in arc4_set_key()
|
D | khazad.c | 756 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()
|
D | seed.c | 331 static int seed_set_key(struct crypto_tfm *tfm, const u8 *in_key, in seed_set_key() argument 336 const __be32 *key = (const __be32 *)in_key; in seed_set_key()
|
/Linux-v4.19/drivers/crypto/nx/ |
D | nx-aes-ctr.c | 35 const u8 *in_key, in ctr_aes_nx_set_key() argument 61 memcpy(csbcpb->cpb.aes_ctr.key, in_key, key_len); in ctr_aes_nx_set_key() 67 const u8 *in_key, in ctr3686_aes_nx_set_key() argument 76 in_key + key_len - CTR_RFC3686_NONCE_SIZE, in ctr3686_aes_nx_set_key() 81 return ctr_aes_nx_set_key(tfm, in_key, key_len); in ctr3686_aes_nx_set_key()
|
D | nx-aes-ccm.c | 36 const u8 *in_key, in ccm_aes_nx_set_key() argument 56 memcpy(csbcpb->cpb.aes_ccm.key, in_key, key_len); in ccm_aes_nx_set_key() 59 memcpy(csbcpb_aead->cpb.aes_cca.key, in_key, key_len); in ccm_aes_nx_set_key() 66 const u8 *in_key, in ccm4309_aes_nx_set_key() argument 76 memcpy(nx_ctx->priv.ccm.nonce, in_key + key_len, 3); in ccm4309_aes_nx_set_key() 78 return ccm_aes_nx_set_key(tfm, in_key, key_len); in ccm4309_aes_nx_set_key()
|
D | nx-aes-gcm.c | 36 const u8 *in_key, in gcm_aes_nx_set_key() argument 66 memcpy(csbcpb->cpb.aes_gcm.key, in_key, key_len); in gcm_aes_nx_set_key() 69 memcpy(csbcpb_aead->cpb.aes_gca.key, in_key, key_len); in gcm_aes_nx_set_key() 75 const u8 *in_key, in gcm4106_aes_nx_set_key() argument 87 rc = gcm_aes_nx_set_key(tfm, in_key, key_len); in gcm4106_aes_nx_set_key() 91 memcpy(nonce, in_key + key_len, 4); in gcm4106_aes_nx_set_key()
|
D | nx-aes-ecb.c | 34 const u8 *in_key, in ecb_aes_nx_set_key() argument 60 memcpy(csbcpb->cpb.aes_ecb.key, in_key, key_len); in ecb_aes_nx_set_key()
|
D | nx-aes-cbc.c | 34 const u8 *in_key, in cbc_aes_nx_set_key() argument 60 memcpy(csbcpb->cpb.aes_cbc.key, in_key, key_len); in cbc_aes_nx_set_key()
|
/Linux-v4.19/arch/powerpc/crypto/ |
D | aes-spe-glue.c | 94 static int ppc_aes_setkey(struct crypto_tfm *tfm, const u8 *in_key, in ppc_aes_setkey() argument 109 ppc_expand_key_128(ctx->key_enc, in_key); in ppc_aes_setkey() 113 ppc_expand_key_192(ctx->key_enc, in_key); in ppc_aes_setkey() 117 ppc_expand_key_256(ctx->key_enc, in_key); in ppc_aes_setkey() 126 static int ppc_xts_setkey(struct crypto_tfm *tfm, const u8 *in_key, in ppc_xts_setkey() argument 132 err = xts_check_key(tfm, in_key, key_len); in ppc_xts_setkey() 148 ppc_expand_key_128(ctx->key_enc, in_key); in ppc_xts_setkey() 149 ppc_expand_key_128(ctx->key_twk, in_key + AES_KEYSIZE_128); in ppc_xts_setkey() 153 ppc_expand_key_192(ctx->key_enc, in_key); in ppc_xts_setkey() 154 ppc_expand_key_192(ctx->key_twk, in_key + AES_KEYSIZE_192); in ppc_xts_setkey() [all …]
|
/Linux-v4.19/arch/arm64/crypto/ |
D | aes-ce-setkey.h | 3 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,
|
D | aes-neonbs-glue.c | 73 static int aesbs_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in aesbs_setkey() argument 80 err = crypto_aes_expand_key(&rk, in_key, key_len); in aesbs_setkey() 132 static int aesbs_cbc_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in aesbs_cbc_setkey() argument 139 err = crypto_aes_expand_key(&rk, in_key, key_len); in aesbs_cbc_setkey() 205 static int aesbs_ctr_setkey_sync(struct crypto_skcipher *tfm, const u8 *in_key, in aesbs_ctr_setkey_sync() argument 211 err = crypto_aes_expand_key(&ctx->fallback, in_key, key_len); in aesbs_ctr_setkey_sync() 265 static int aesbs_xts_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in aesbs_xts_setkey() argument 272 err = xts_verify_key(tfm, in_key, key_len); in aesbs_xts_setkey() 277 err = crypto_aes_expand_key(&rk, in_key + key_len, key_len); in aesbs_xts_setkey() 283 return aesbs_setkey(tfm, in_key, key_len); in aesbs_xts_setkey()
|
D | aes-ce-glue.c | 79 int ce_aes_expandkey(struct crypto_aes_ctx *ctx, const u8 *in_key, in ce_aes_expandkey() argument 100 ctx->key_enc[i] = get_unaligned_le32(in_key + i * sizeof(u32)); in ce_aes_expandkey() 147 int ce_aes_setkey(struct crypto_tfm *tfm, const u8 *in_key, in ce_aes_setkey() argument 153 ret = ce_aes_expandkey(ctx, in_key, key_len); in ce_aes_setkey()
|
D | aes-glue.c | 105 static int skcipher_aes_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in skcipher_aes_setkey() argument 108 return aes_setkey(crypto_skcipher_tfm(tfm), in_key, key_len); in skcipher_aes_setkey() 111 static int xts_set_key(struct crypto_skcipher *tfm, const u8 *in_key, in xts_set_key() argument 117 ret = xts_verify_key(tfm, in_key, key_len); in xts_set_key() 121 ret = aes_expandkey(&ctx->key1, in_key, key_len / 2); in xts_set_key() 123 ret = aes_expandkey(&ctx->key2, &in_key[key_len / 2], in xts_set_key() 388 static int cbcmac_setkey(struct crypto_shash *tfm, const u8 *in_key, in cbcmac_setkey() argument 394 err = aes_expandkey(&ctx->key, in_key, key_len); in cbcmac_setkey() 410 static int cmac_setkey(struct crypto_shash *tfm, const u8 *in_key, in cmac_setkey() argument 419 err = cbcmac_setkey(tfm, in_key, key_len); in cmac_setkey() [all …]
|
/Linux-v4.19/arch/arm/crypto/ |
D | aes-neonbs-glue.c | 60 static int aesbs_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in aesbs_setkey() argument 67 err = crypto_aes_expand_key(&rk, in_key, key_len); in aesbs_setkey() 119 static int aesbs_cbc_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in aesbs_cbc_setkey() argument 126 err = crypto_aes_expand_key(&rk, in_key, key_len); in aesbs_cbc_setkey() 136 return crypto_cipher_setkey(ctx->enc_tfm, in_key, key_len); in aesbs_cbc_setkey() 237 static int aesbs_xts_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in aesbs_xts_setkey() argument 243 err = xts_verify_key(tfm, in_key, key_len); in aesbs_xts_setkey() 248 err = crypto_cipher_setkey(ctx->tweak_tfm, in_key + key_len, key_len); in aesbs_xts_setkey() 252 return aesbs_setkey(tfm, in_key, key_len); in aesbs_xts_setkey()
|
D | aes-ce-glue.c | 65 static int ce_aes_expandkey(struct crypto_aes_ctx *ctx, const u8 *in_key, in ce_aes_expandkey() argument 84 memcpy(ctx->key_enc, in_key, key_len); 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-v4.19/arch/s390/crypto/ |
D | aes_s390.c | 71 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() 236 static int ecb_aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in ecb_aes_set_key() argument 250 return setkey_fallback_blk(tfm, in_key, key_len); in ecb_aes_set_key() 253 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 …]
|
D | paes_s390.c | 78 static int ecb_paes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in ecb_paes_set_key() argument 86 memcpy(ctx->sk.seckey, in_key, SECKEYBLOBSIZE); in ecb_paes_set_key() 177 static int cbc_paes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in cbc_paes_set_key() argument 182 memcpy(ctx->sk.seckey, in_key, SECKEYBLOBSIZE); in cbc_paes_set_key() 285 static int xts_paes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in xts_paes_set_key() argument 292 memcpy(ctx->sk[0].seckey, in_key, SECKEYBLOBSIZE); in xts_paes_set_key() 293 memcpy(ctx->sk[1].seckey, in_key + SECKEYBLOBSIZE, SECKEYBLOBSIZE); in xts_paes_set_key() 418 static int ctr_paes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in ctr_paes_set_key() argument 423 memcpy(ctx->sk.seckey, in_key, key_len); in ctr_paes_set_key()
|
/Linux-v4.19/include/crypto/ |
D | sm4.h | 23 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,
|
D | aes.h | 36 int crypto_aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, 38 int crypto_aes_expand_key(struct crypto_aes_ctx *ctx, const u8 *in_key,
|
/Linux-v4.19/arch/sparc/crypto/ |
D | camellia_glue.c | 32 extern void camellia_sparc64_key_expand(const u32 *in_key, u64 *encrypt_key, 39 const u32 *in_key = (const u32 *) _in_key; in camellia_set_key() local 49 camellia_sparc64_key_expand(in_key, &ctx->encrypt_key[0], in camellia_set_key()
|
/Linux-v4.19/net/mac802154/ |
D | llsec.c | 916 const struct ieee802154_llsec_key_id *in_key) in llsec_update_devkey_record() argument 920 devkey = llsec_devkey_find(dev, in_key); in llsec_update_devkey_record() 929 next->devkey.key_id = *in_key; in llsec_update_devkey_record() 933 devkey = llsec_devkey_find(dev, in_key); in llsec_update_devkey_record() 947 const struct ieee802154_llsec_key_id *in_key, in llsec_update_devkey_info() argument 953 devkey = llsec_devkey_find(dev, in_key); in llsec_update_devkey_info() 959 int rc = llsec_update_devkey_record(dev, in_key); in llsec_update_devkey_info()
|