Lines Matching defs:tfm
141 static int __init test_ecdh_sample(struct crypto_kpp *tfm, const u8 priv_a[32],
155 ret = set_ecdh_privkey(tfm, priv_a);
159 ret = compute_ecdh_secret(tfm, pub_b, dhkey_a);
168 ret = set_ecdh_privkey(tfm, priv_b);
172 ret = compute_ecdh_secret(tfm, pub_a, dhkey_b);
201 struct crypto_kpp *tfm;
208 tfm = crypto_alloc_kpp("ecdh-nist-p256", 0, 0);
209 if (IS_ERR(tfm)) {
211 err = PTR_ERR(tfm);
215 err = test_ecdh_sample(tfm, priv_a_1, priv_b_1, pub_a_1, pub_b_1,
222 err = test_ecdh_sample(tfm, priv_a_2, priv_b_2, pub_a_2, pub_b_2,
229 err = test_ecdh_sample(tfm, priv_a_3, priv_a_3, pub_a_3, pub_a_3,
236 crypto_free_kpp(tfm);