Lines Matching defs:key_sz
126 u16 key_sz, __be32 *ipad, __be32 *opad);
364 static void prepare_kiopad(u8 *k_ipad, u8 *k_opad, const u8 *key, u16 key_sz)
368 for (i = 0; i < key_sz; i++) {
414 u16 key_sz, __be32 *ipad, __be32 *opad)
424 prepare_kiopad(k_ipad, k_opad, key, key_sz);
440 static inline int sa_aes_inv_key(u8 *inv_key, const u8 *key, u16 key_sz)
445 if (aes_expandkey(&ctx, key, key_sz)) {
446 dev_err(sa_k3_dev, "%s: bad key len(%d)\n", __func__, key_sz);
451 if (key_sz == AES_KEYSIZE_192) {
457 switch (key_sz) {
460 key_pos = key_sz + 24;
464 key_pos = key_sz + 24 - 4;
468 dev_err(sa_k3_dev, "%s: bad key len(%d)\n", __func__, key_sz);
472 memcpy(inv_key, &ctx.key_enc[key_pos], key_sz);
477 static int sa_set_sc_enc(struct algo_data *ad, const u8 *key, u16 key_sz,
495 if (sa_aes_inv_key(&sc_buf[SC_ENC_KEY_OFFSET], key, key_sz))
499 memcpy(&sc_buf[SC_ENC_KEY_OFFSET], key, key_sz);
506 static void sa_set_sc_auth(struct algo_data *ad, const u8 *key, u16 key_sz,
519 ad->prep_iopad(ad, key, key_sz, ipad, opad);