Lines Matching refs:tfm_aes
90 struct crypto_blkcipher *tfm_aes; member
129 struct crypto_blkcipher *tfm_aes; member
416 static int smp_c1(struct crypto_blkcipher *tfm_aes, const u8 k[16], in smp_c1() argument
441 err = smp_e(tfm_aes, k, res); in smp_c1()
458 err = smp_e(tfm_aes, k, res); in smp_c1()
465 static int smp_s1(struct crypto_blkcipher *tfm_aes, const u8 k[16], in smp_s1() argument
474 err = smp_e(tfm_aes, k, _r); in smp_s1()
523 err = smp_ah(smp->tfm_aes, irk, &bdaddr->b[3], hash); in smp_irk_matches()
546 err = smp_ah(smp->tfm_aes, irk, &rpa->b[3], rpa->b); in smp_generate_rpa()
769 crypto_free_blkcipher(smp->tfm_aes); in smp_chan_destroy()
957 ret = smp_c1(smp->tfm_aes, smp->tk, smp->prnd, smp->preq, smp->prsp, in smp_confirm()
983 if (IS_ERR_OR_NULL(smp->tfm_aes)) in smp_random()
988 ret = smp_c1(smp->tfm_aes, smp->tk, smp->rrnd, smp->preq, smp->prsp, in smp_random()
1004 smp_s1(smp->tfm_aes, smp->tk, smp->rrnd, smp->prnd, stk); in smp_random()
1020 smp_s1(smp->tfm_aes, smp->tk, smp->prnd, smp->rrnd, stk); in smp_random()
1369 smp->tfm_aes = crypto_alloc_blkcipher("ecb(aes)", 0, CRYPTO_ALG_ASYNC); in smp_chan_create()
1370 if (IS_ERR(smp->tfm_aes)) { in smp_chan_create()
1379 crypto_free_blkcipher(smp->tfm_aes); in smp_chan_create()
3130 struct crypto_blkcipher *tfm_aes; in smp_add_cid() local
3142 tfm_aes = crypto_alloc_blkcipher("ecb(aes)", 0, CRYPTO_ALG_ASYNC); in smp_add_cid()
3143 if (IS_ERR(tfm_aes)) { in smp_add_cid()
3146 return ERR_CAST(tfm_aes); in smp_add_cid()
3152 crypto_free_blkcipher(tfm_aes); in smp_add_cid()
3157 smp->tfm_aes = tfm_aes; in smp_add_cid()
3166 crypto_free_blkcipher(smp->tfm_aes); in smp_add_cid()
3213 if (smp->tfm_aes) in smp_del_chan()
3214 crypto_free_blkcipher(smp->tfm_aes); in smp_del_chan()
3452 static int __init test_ah(struct crypto_blkcipher *tfm_aes) in test_ah() argument
3462 err = smp_ah(tfm_aes, irk, r, res); in test_ah()
3472 static int __init test_c1(struct crypto_blkcipher *tfm_aes) in test_c1() argument
3492 err = smp_c1(tfm_aes, k, r, preq, pres, _iat, &ia, _rat, &ra, res); in test_c1()
3502 static int __init test_s1(struct crypto_blkcipher *tfm_aes) in test_s1() argument
3517 err = smp_s1(tfm_aes, k, r1, r2, res); in test_s1()
3698 static int __init run_selftests(struct crypto_blkcipher *tfm_aes, in run_selftests() argument
3707 err = test_ah(tfm_aes); in run_selftests()
3713 err = test_c1(tfm_aes); in run_selftests()
3719 err = test_s1(tfm_aes); in run_selftests()
3776 struct crypto_blkcipher *tfm_aes; in bt_selftest_smp() local
3780 tfm_aes = crypto_alloc_blkcipher("ecb(aes)", 0, CRYPTO_ALG_ASYNC); in bt_selftest_smp()
3781 if (IS_ERR(tfm_aes)) { in bt_selftest_smp()
3783 return PTR_ERR(tfm_aes); in bt_selftest_smp()
3789 crypto_free_blkcipher(tfm_aes); in bt_selftest_smp()
3793 err = run_selftests(tfm_aes, tfm_cmac); in bt_selftest_smp()
3796 crypto_free_blkcipher(tfm_aes); in bt_selftest_smp()