-
-
Save csquared/9588782 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 6e98738c32e2a4975fcdbc61114f9d071d671995 | |
Author: Chris Continanza <[email protected]> | |
Date: Sun Mar 16 12:42:27 2014 -0700 | |
fix sign | |
diff --git a/ecdsa.cpp b/ecdsa.cpp | |
index ff9d534..a26ad2f 100644 | |
--- a/ecdsa.cpp | |
+++ b/ecdsa.cpp | |
@@ -208,10 +208,14 @@ int ecdsa_sign(const uint8_t *priv_key, const uint8_t *msg, uint32_t msg_len, ui | |
bignum256 k, z; | |
bignum256 *da = &R.y; | |
// compute hash function of message | |
- SHA256_Raw(msg, msg_len, hash); | |
+ // SHA256_Raw(msg, msg_len, hash); | |
// if double hash is required uncomment the following line: | |
// SHA256_Raw(hash, 32, hash); | |
+ //we're already getting it double-hashed so i'm just | |
+ //copying the data directly into "hash" | |
+ memcpy(hash, msg, msg_len); | |
+ | |
bn_read_be(hash, &z); | |
#if USE_RFC6979 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment