Lines Matching defs:key_sz
146 u16 key_sz, __be32 *ipad, __be32 *opad);
384 static void prepare_kipad(u8 *k_ipad, const u8 *key, u16 key_sz)
388 for (i = 0; i < key_sz; i++)
396 static void prepare_kopad(u8 *k_opad, const u8 *key, u16 key_sz)
400 for (i = 0; i < key_sz; i++)
436 u16 key_sz, __be32 *ipad, __be32 *opad)
449 prepare_kipad(sha.k_pad, key, key_sz);
455 prepare_kopad(sha.k_pad, key, key_sz);
466 static inline int sa_aes_inv_key(u8 *inv_key, const u8 *key, u16 key_sz)
471 if (aes_expandkey(&ctx, key, key_sz)) {
472 dev_err(sa_k3_dev, "%s: bad key len(%d)\n", __func__, key_sz);
477 if (key_sz == AES_KEYSIZE_192) {
483 switch (key_sz) {
486 key_pos = key_sz + 24;
490 key_pos = key_sz + 24 - 4;
494 dev_err(sa_k3_dev, "%s: bad key len(%d)\n", __func__, key_sz);
498 memcpy(inv_key, &ctx.key_enc[key_pos], key_sz);
503 static int sa_set_sc_enc(struct algo_data *ad, const u8 *key, u16 key_sz,
521 if (sa_aes_inv_key(&sc_buf[SC_ENC_KEY_OFFSET], key, key_sz))
525 memcpy(&sc_buf[SC_ENC_KEY_OFFSET], key, key_sz);
532 static void sa_set_sc_auth(struct algo_data *ad, const u8 *key, u16 key_sz,
546 ad->prep_iopad(ad, key, key_sz, ipad, opad);