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

@@ -46,7 +46,8 @@ static int test_sm2_ciphertext(void)
error_print();
return -1;
}
C.point = sm2_key.public_key;
sm2_z256_point_to_bytes(&sm2_key.public_key, (uint8_t *)&(C.point));
C.ciphertext_size = tests[i].ciphertext_size;
if (sm2_ciphertext_to_der(&C, &p, &len) != 1) {