Lines Matching refs:tfm_aes
94 struct crypto_cipher *tfm_aes; member
133 struct crypto_cipher *tfm_aes; member
418 static int smp_c1(struct crypto_cipher *tfm_aes, const u8 k[16], in smp_c1() argument
443 err = smp_e(tfm_aes, k, res); in smp_c1()
460 err = smp_e(tfm_aes, k, res); in smp_c1()
467 static int smp_s1(struct crypto_cipher *tfm_aes, const u8 k[16], in smp_s1() argument
476 err = smp_e(tfm_aes, k, _r); in smp_s1()
525 err = smp_ah(smp->tfm_aes, irk, &bdaddr->b[3], hash); in smp_irk_matches()
548 err = smp_ah(smp->tfm_aes, irk, &rpa->b[3], rpa->b); in smp_generate_rpa()
775 crypto_free_cipher(smp->tfm_aes); in smp_chan_destroy()
964 ret = smp_c1(smp->tfm_aes, smp->tk, smp->prnd, smp->preq, smp->prsp, in smp_confirm()
990 if (IS_ERR_OR_NULL(smp->tfm_aes)) in smp_random()
995 ret = smp_c1(smp->tfm_aes, smp->tk, smp->rrnd, smp->preq, smp->prsp, in smp_random()
1012 smp_s1(smp->tfm_aes, smp->tk, smp->rrnd, smp->prnd, stk); in smp_random()
1028 smp_s1(smp->tfm_aes, smp->tk, smp->prnd, smp->rrnd, stk); in smp_random()
1396 smp->tfm_aes = crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC); in smp_chan_create()
1397 if (IS_ERR(smp->tfm_aes)) { in smp_chan_create()
1428 crypto_free_cipher(smp->tfm_aes); in smp_chan_create()
3226 struct crypto_cipher *tfm_aes; in smp_add_cid() local
3239 tfm_aes = crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC); in smp_add_cid()
3240 if (IS_ERR(tfm_aes)) { in smp_add_cid()
3243 return ERR_CAST(tfm_aes); in smp_add_cid()
3249 crypto_free_cipher(tfm_aes); in smp_add_cid()
3258 crypto_free_cipher(tfm_aes); in smp_add_cid()
3264 smp->tfm_aes = tfm_aes; in smp_add_cid()
3274 crypto_free_cipher(smp->tfm_aes); in smp_add_cid()
3322 crypto_free_cipher(smp->tfm_aes); in smp_del_chan()
3578 static int __init test_ah(struct crypto_cipher *tfm_aes) in test_ah() argument
3588 err = smp_ah(tfm_aes, irk, r, res); in test_ah()
3598 static int __init test_c1(struct crypto_cipher *tfm_aes) in test_c1() argument
3618 err = smp_c1(tfm_aes, k, r, preq, pres, _iat, &ia, _rat, &ra, res); in test_c1()
3628 static int __init test_s1(struct crypto_cipher *tfm_aes) in test_s1() argument
3643 err = smp_s1(tfm_aes, k, r1, r2, res); in test_s1()
3824 static int __init run_selftests(struct crypto_cipher *tfm_aes, in run_selftests() argument
3840 err = test_ah(tfm_aes); in run_selftests()
3846 err = test_c1(tfm_aes); in run_selftests()
3852 err = test_s1(tfm_aes); in run_selftests()
3909 struct crypto_cipher *tfm_aes; in bt_selftest_smp() local
3914 tfm_aes = crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC); in bt_selftest_smp()
3915 if (IS_ERR(tfm_aes)) { in bt_selftest_smp()
3917 return PTR_ERR(tfm_aes); in bt_selftest_smp()
3923 crypto_free_cipher(tfm_aes); in bt_selftest_smp()
3931 crypto_free_cipher(tfm_aes); in bt_selftest_smp()
3935 err = run_selftests(tfm_aes, tfm_cmac, tfm_ecdh); in bt_selftest_smp()
3938 crypto_free_cipher(tfm_aes); in bt_selftest_smp()