Skip to content

Commit

Permalink
Update sm9_z256.c
Browse files Browse the repository at this point in the history
  • Loading branch information
Gorachya committed Apr 26, 2024
1 parent 3f1fdc1 commit 0be17d5
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 0be17d5

Please sign in to comment.