Lines Matching refs:pk

351 					       struct ecc_point *pk)
358 if (WARN_ON(pk->ndigits != curve->g.ndigits))
362 if (ecc_point_is_zero(pk))
366 if (vli_cmp(curve->p, pk->x, pk->ndigits) != 1)
369 if (vli_cmp(curve->p, pk->y, pk->ndigits) != 1)
376 rc = kmb_ecc_do_scalar_op(ecc_dev, yy, pk->y, pk->y, curve, pk->ndigits,
385 rc = kmb_ecc_do_scalar_op(ecc_dev, xxx, pk->x, w, curve, pk->ndigits,
391 rc = kmb_ecc_do_scalar_op(ecc_dev, w, curve->a, pk->x, curve,
392 pk->ndigits,
399 pk->ndigits,
405 rc = kmb_ecc_do_scalar_op(ecc_dev, w, xxx, w, curve, pk->ndigits,
411 rc = vli_cmp(yy, w, pk->ndigits);
426 struct ecc_point *pk)
432 rc = kmb_ocs_ecc_is_pubkey_valid_partial(ecc_dev, curve, pk);
437 nQ = ecc_alloc_point(pk->ndigits);
441 rc = kmb_ecc_point_mult(ecc_dev, nQ, pk, curve->n, curve);
583 struct ecc_point *pk, *result;
599 pk = ecc_alloc_point(curve->g.ndigits);
600 if (!pk)
603 ecc_swap_digits(pubk_buf, pk->x, curve->g.ndigits);
604 ecc_swap_digits(&pubk_buf[curve->g.ndigits], pk->y, curve->g.ndigits);
612 rc = kmb_ocs_ecc_is_pubkey_valid_partial(ecc_dev, curve, pk);
617 result = ecc_alloc_point(pk->ndigits);
624 rc = kmb_ecc_point_mult(ecc_dev, result, pk, tctx->private_key, curve);
652 ecc_free_point(pk);
663 struct ecc_point *pk;
671 pk = ecc_alloc_point(curve->g.ndigits);
672 if (!pk)
675 /* Public Key(pk) = priv * G. */
676 rc = kmb_ecc_point_mult(tctx->ecc_dev, pk, &curve->g, tctx->private_key,
682 if (kmb_ocs_ecc_is_pubkey_valid_full(tctx->ecc_dev, curve, pk)) {
688 ecc_swap_digits(pk->x, pubk_buf, pk->ndigits);
689 ecc_swap_digits(pk->y, &pubk_buf[pk->ndigits], pk->ndigits);
700 ecc_free_point(pk);