Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sm2签名验签新老版本不兼容 #1749

Open
ck1223256744 opened this issue Sep 27, 2024 · 3 comments
Open

sm2签名验签新老版本不兼容 #1749

ck1223256744 opened this issue Sep 27, 2024 · 3 comments

Comments

@ck1223256744
Copy link

老版本3.1.1签名出来的数据,master无法验签通过
// Q(x,y) = s * G + t * P
sm2_z256_point_mul_generator(&R, s);
sm2_z256_point_mul(&T, t, &key->public_key);
sm2_z256_point_add(&R, &R, &T);
sm2_z256_point_get_xy(&R, x, NULL);

是不是这块不兼容呢?调试发现新老版本算出来的x不一致

@ck1223256744
Copy link
Author

替换sm2_jacobian_point_mul 这类实现的目的是什么?
感觉(x, y) = kG 这一步在master分支中实现不同了

@ck1223256744
Copy link
Author

为什么 没有G这个基点的数据了?

@lpilp
Copy link

lpilp commented Sep 29, 2024

为什么 没有G这个基点的数据了?

src/sm2_z256.c 在这个文件里,以前的版本是在 src/sm2_alg.c 这个文件

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants