From 3336e7dbe51d8e4637e376b0ccd6a03fb7b9a2df Mon Sep 17 00:00:00 2001 From: "[GGSuchao]" <[1500062807@pku.edu.cn]> Date: Thu, 6 Jul 2017 19:21:07 +0800 Subject: [PATCH] add sm2 --- include/openssl/sm2_standard.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/openssl/sm2_standard.h b/include/openssl/sm2_standard.h index 829f9c14..f74793db 100644 --- a/include/openssl/sm2_standard.h +++ b/include/openssl/sm2_standard.h @@ -148,10 +148,10 @@ static int SM2_standard_init() para_Gy = mirvar(0); para_h = mirvar(0); - G = epoint_init(); + G = epoint_init(); nG = epoint_init(); - bytes_to_big(SM2_NUMWORD, SM2_p, para_p); + bytes_to_big(SM2_NUMWORD, SM2_p, para_p); bytes_to_big(SM2_NUMWORD, SM2_a, para_a); bytes_to_big(SM2_NUMWORD, SM2_b, para_b); bytes_to_big(SM2_NUMWORD, SM2_n, para_n); @@ -192,7 +192,7 @@ static int Test_Point(epoint* point) add(x, para_b, x); //x = x^3 + ax + b divide(x, para_p, tmp); //x = x^3 + ax + b mod p power(y, 2, para_p, y); //y = y^2 mod p - if (compare(x, y) != 0) + if (mr_compare(x, y) != 0) return ERR_NOT_VALID_POINT; else return 0; @@ -217,7 +217,7 @@ static int Test_PubKey(epoint *pubKey) //test if x < p and y