Lines Matching refs:tfm_cmac
93 struct crypto_shash *tfm_cmac;
131 struct crypto_shash *tfm_cmac;
210 static int smp_f4(struct crypto_shash *tfm_cmac, const u8 u[32],
224 err = aes_cmac(tfm_cmac, x, m, sizeof(m), res);
233 static int smp_f5(struct crypto_shash *tfm_cmac, const u8 w[32],
254 err = aes_cmac(tfm_cmac, salt, w, 32, t);
269 err = aes_cmac(tfm_cmac, t, m, sizeof(m), mackey);
277 err = aes_cmac(tfm_cmac, t, m, sizeof(m), ltk);
286 static int smp_f6(struct crypto_shash *tfm_cmac, const u8 w[16],
305 err = aes_cmac(tfm_cmac, w, m, sizeof(m), res);
314 static int smp_g2(struct crypto_shash *tfm_cmac, const u8 u[32], const u8 v[32],
328 err = aes_cmac(tfm_cmac, x, m, sizeof(m), tmp);
340 static int smp_h6(struct crypto_shash *tfm_cmac, const u8 w[16],
347 err = aes_cmac(tfm_cmac, w, key_id, 4, res);
356 static int smp_h7(struct crypto_shash *tfm_cmac, const u8 w[16],
363 err = aes_cmac(tfm_cmac, salt, w, 16, res);
578 err = smp_f4(smp->tfm_cmac, smp->local_pk, smp->local_pk,
761 crypto_free_shash(smp->tfm_cmac);
1173 if (smp_h7(smp->tfm_cmac, smp->tk, salt, smp->link_key)) {
1182 if (smp_h6(smp->tfm_cmac, smp->tk, tmp1, smp->link_key)) {
1189 if (smp_h6(smp->tfm_cmac, smp->link_key, lebr, smp->link_key)) {
1231 if (smp_h7(smp->tfm_cmac, key->val, salt, smp->tk))
1237 if (smp_h6(smp->tfm_cmac, key->val, tmp2, smp->tk))
1241 if (smp_h6(smp->tfm_cmac, smp->tk, brle, smp->tk))
1401 smp->tfm_cmac = crypto_alloc_shash("cmac(aes)", 0, 0);
1402 if (IS_ERR(smp->tfm_cmac)) {
1425 crypto_free_shash(smp->tfm_cmac);
1449 return smp_f5(smp->tfm_cmac, smp->dhkey, na, nb, a, b, mackey, ltk);
1482 smp_f6(smp->tfm_cmac, smp->mackey, smp->prnd, smp->rrnd, r, io_cap,
1500 if (smp_f4(smp->tfm_cmac, smp->local_pk, smp->remote_pk, smp->prnd, r,
1525 if (smp_f4(smp->tfm_cmac, smp->remote_pk, smp->local_pk,
2187 err = smp_f4(smp->tfm_cmac, smp->remote_pk, smp->local_pk,
2232 err = smp_g2(smp->tfm_cmac, pkax, pkbx, na, nb, &passkey);
2769 err = smp_f4(smp->tfm_cmac, smp->remote_pk, smp->remote_pk,
2870 err = smp_f4(smp->tfm_cmac, smp->local_pk, smp->remote_pk, smp->prnd,
2918 err = smp_f6(smp->tfm_cmac, smp->mackey, smp->rrnd, smp->prnd, r,
3296 struct crypto_shash *tfm_cmac;
3308 tfm_cmac = crypto_alloc_shash("cmac(aes)", 0, 0);
3309 if (IS_ERR(tfm_cmac)) {
3312 return ERR_CAST(tfm_cmac);
3318 crypto_free_shash(tfm_cmac);
3324 smp->tfm_cmac = tfm_cmac;
3331 crypto_free_shash(smp->tfm_cmac);
3378 crypto_free_shash(smp->tfm_cmac);
3575 static int __init test_f4(struct crypto_shash *tfm_cmac)
3597 err = smp_f4(tfm_cmac, u, v, x, z, res);
3607 static int __init test_f5(struct crypto_shash *tfm_cmac)
3631 err = smp_f5(tfm_cmac, w, n1, n2, a1, a2, mackey, ltk);
3644 static int __init test_f6(struct crypto_shash *tfm_cmac)
3667 err = smp_f6(tfm_cmac, w, n1, n2, r, io_cap, a1, a2, res);
3677 static int __init test_g2(struct crypto_shash *tfm_cmac)
3699 err = smp_g2(tfm_cmac, u, v, x, y, &val);
3709 static int __init test_h6(struct crypto_shash *tfm_cmac)
3721 err = smp_h6(tfm_cmac, w, key_id, res);
3746 static int __init run_selftests(struct crypto_shash *tfm_cmac,
3779 err = test_f4(tfm_cmac);
3785 err = test_f5(tfm_cmac);
3791 err = test_f6(tfm_cmac);
3797 err = test_g2(tfm_cmac);
3803 err = test_h6(tfm_cmac);
3830 struct crypto_shash *tfm_cmac;
3834 tfm_cmac = crypto_alloc_shash("cmac(aes)", 0, 0);
3835 if (IS_ERR(tfm_cmac)) {
3837 return PTR_ERR(tfm_cmac);
3843 crypto_free_shash(tfm_cmac);
3847 err = run_selftests(tfm_cmac, tfm_ecdh);
3849 crypto_free_shash(tfm_cmac);