From 477306b37dabe9fc73e5fd24b27c670447245eab Mon Sep 17 00:00:00 2001 From: Gorachya <38173958+Gorachya@users.noreply.github.com> Date: Sun, 15 May 2022 14:43:58 +0800 Subject: [PATCH] Update sm9_lib.c --- src/sm9_lib.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sm9_lib.c b/src/sm9_lib.c index 1fa958c1..6eda85ad 100644 --- a/src/sm9_lib.c +++ b/src/sm9_lib.c @@ -139,6 +139,8 @@ int sm9_sign_finish(SM9_SIGN_CTX *ctx, const SM9_SIGN_KEY *key, uint8_t *sig, si return 1; } +#define hex_r "00033C8616B06704813203DFD00965022ED15975C662337AED648835DC4B1CBE" + int sm9_do_sign(const SM9_SIGN_KEY *key, const SM3_CTX *sm3_ctx, SM9_SIGNATURE *sig) { sm9_fn_t r; @@ -156,6 +158,7 @@ int sm9_do_sign(const SM9_SIGN_KEY *key, const SM3_CTX *sm3_ctx, SM9_SIGNATURE * do { // A2: rand r in [1, N-1] sm9_fn_rand(r); + //sm9_bn_from_hex(r, hex_r); // A3: w = g^r sm9_fp12_pow(g, g, r);