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