mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-07 00:46:17 +08:00
Use z256 and jacobian coordinates as inner presentation of SM2 point
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user