Skip to content

Commit

Permalink
Merge pull request #1668 from Gorachya/master
Browse files Browse the repository at this point in the history
Update sm9_z256.c
  • Loading branch information
guanzhi committed Apr 29, 2024
2 parents bce16e1 + 0be17d5 commit f17d25a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/sm9_z256.c
Original file line number Diff line number Diff line change
Expand Up @@ -2849,14 +2849,10 @@ void sm9_z256_point_to_affine(SM9_Z256_AFFINE_POINT *Q, const SM9_Z256_POINT *P)
}

sm9_z256_modp_mont_inv(z_inv, P->Z);
if (Q->Y) {
sm9_z256_modp_mont_mul(Q->Y, P->Y, z_inv);
}
sm9_z256_modp_mont_mul(Q->Y, P->Y, z_inv);
sm9_z256_modp_mont_sqr(z_inv, z_inv);
sm9_z256_modp_mont_mul(Q->X, P->X, z_inv);
if (Q->Y) {
sm9_z256_modp_mont_mul(Q->Y, Q->Y, z_inv);
}
sm9_z256_modp_mont_mul(Q->Y, Q->Y, z_inv);
}

// Multiplication with lw[0] + lw[1] * w^2 + lw[2] * w^3
Expand Down

0 comments on commit f17d25a

Please sign in to comment.