Use z256 and jacobian coordinates as inner presentation of SM2 point

This commit is contained in:
Zhi Guan
2024-04-18 21:27:00 +08:00
parent 549c68d2df
commit e9bbcf5490
18 changed files with 312 additions and 646 deletions

View File

@@ -186,12 +186,12 @@ bad:
}
if (id_hex) {
sm2_compute_z(z, (SM2_POINT *)&sm2_key, (char *)id_bin, id_bin_len);
sm2_compute_z(z, &sm2_key.public_key, (char *)id_bin, id_bin_len);
} else {
if (!id) {
id = SM2_DEFAULT_ID;
}
sm2_compute_z(z, (SM2_POINT *)&sm2_key, id, strlen(id));
sm2_compute_z(z, &sm2_key.public_key, id, strlen(id));
}
if (sm3_digest_update(&sm3_ctx, z, sizeof(z)) != 1) {