Lines Matching defs:key
163 __be32 key[AES_KEYSIZE_256 / sizeof(u32)];
431 * ux500_swizzle_key() - Shuffle around words and bits in the AES key
432 * @in: key to swizzle
433 * @out: swizzled key
434 * @len: length of key, in bytes
436 * This "key swizzling procedure" is described in the examples in the
464 stm32_cryp_write(c, c->caps->k1l, be32_to_cpu(c->ctx->key[0]));
465 stm32_cryp_write(c, c->caps->k1r, be32_to_cpu(c->ctx->key[1]));
470 * On the Ux500 the AES key is considered as a single bit sequence
478 ux500_swizzle_key((u8 *)c->ctx->key,
490 stm32_cryp_write(c, r_id, be32_to_cpu(c->ctx->key[i - 1]));
731 /* AES ECB/CBC decrypt: run key preparation first */
734 /* Configure in key preparation mode */
742 /* Set key only after full configuration done */
745 /* Start prepare key */
750 dev_err(cryp->dev, "Timeout (key preparation)\n");
766 /* Set key only after configuration done */
875 static int stm32_cryp_setkey(struct crypto_skcipher *tfm, const u8 *key,
880 memcpy(ctx->key, key, keylen);
886 static int stm32_cryp_aes_setkey(struct crypto_skcipher *tfm, const u8 *key,
893 return stm32_cryp_setkey(tfm, key, keylen);
896 static int stm32_cryp_des_setkey(struct crypto_skcipher *tfm, const u8 *key,
899 return verify_skcipher_des_key(tfm, key) ?:
900 stm32_cryp_setkey(tfm, key, keylen);
903 static int stm32_cryp_tdes_setkey(struct crypto_skcipher *tfm, const u8 *key,
906 return verify_skcipher_des3_key(tfm, key) ?:
907 stm32_cryp_setkey(tfm, key, keylen);
910 static int stm32_cryp_aes_aead_setkey(struct crypto_aead *tfm, const u8 *key,
919 memcpy(ctx->key, key, keylen);