Lines Matching refs:key_sz

145 			   u16 key_sz, __be32 *ipad, __be32 *opad);
383 static void prepare_kipad(u8 *k_ipad, const u8 *key, u16 key_sz) in prepare_kipad() argument
387 for (i = 0; i < key_sz; i++) in prepare_kipad()
395 static void prepare_kopad(u8 *k_opad, const u8 *key, u16 key_sz) in prepare_kopad() argument
399 for (i = 0; i < key_sz; i++) in prepare_kopad()
435 u16 key_sz, __be32 *ipad, __be32 *opad) in sa_prepare_iopads() argument
448 prepare_kipad(sha.k_pad, key, key_sz); in sa_prepare_iopads()
454 prepare_kopad(sha.k_pad, key, key_sz); in sa_prepare_iopads()
465 static inline int sa_aes_inv_key(u8 *inv_key, const u8 *key, u16 key_sz) in sa_aes_inv_key() argument
470 if (aes_expandkey(&ctx, key, key_sz)) { in sa_aes_inv_key()
471 dev_err(sa_k3_dev, "%s: bad key len(%d)\n", __func__, key_sz); in sa_aes_inv_key()
476 if (key_sz == AES_KEYSIZE_192) { in sa_aes_inv_key()
482 switch (key_sz) { in sa_aes_inv_key()
485 key_pos = key_sz + 24; in sa_aes_inv_key()
489 key_pos = key_sz + 24 - 4; in sa_aes_inv_key()
493 dev_err(sa_k3_dev, "%s: bad key len(%d)\n", __func__, key_sz); in sa_aes_inv_key()
497 memcpy(inv_key, &ctx.key_enc[key_pos], key_sz); in sa_aes_inv_key()
502 static int sa_set_sc_enc(struct algo_data *ad, const u8 *key, u16 key_sz, in sa_set_sc_enc() argument
520 if (sa_aes_inv_key(&sc_buf[SC_ENC_KEY_OFFSET], key, key_sz)) in sa_set_sc_enc()
524 memcpy(&sc_buf[SC_ENC_KEY_OFFSET], key, key_sz); in sa_set_sc_enc()
531 static void sa_set_sc_auth(struct algo_data *ad, const u8 *key, u16 key_sz, in sa_set_sc_auth() argument
545 ad->prep_iopad(ad, key, key_sz, ipad, opad); in sa_set_sc_auth()