aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/secp256k1/secp256.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-01 00:44:34 +0800
committerobscuren <geffobscura@gmail.com>2015-02-01 00:44:34 +0800
commita008c21cf0a0f458ef112b99048b459618dd0cdc (patch)
tree022328d090ad2cd4ad077c3f004db9e9437b8956 /crypto/secp256k1/secp256.go
parentcb382fa76ba30d213e4707d05bf3a00bc87dec9a (diff)
downloaddexon-a008c21cf0a0f458ef112b99048b459618dd0cdc.tar
dexon-a008c21cf0a0f458ef112b99048b459618dd0cdc.tar.gz
dexon-a008c21cf0a0f458ef112b99048b459618dd0cdc.tar.bz2
dexon-a008c21cf0a0f458ef112b99048b459618dd0cdc.tar.lz
dexon-a008c21cf0a0f458ef112b99048b459618dd0cdc.tar.xz
dexon-a008c21cf0a0f458ef112b99048b459618dd0cdc.tar.zst
dexon-a008c21cf0a0f458ef112b99048b459618dd0cdc.zip
Fixed Sign nonce
Diffstat (limited to 'crypto/secp256k1/secp256.go')
-rw-r--r--crypto/secp256k1/secp256.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/crypto/secp256k1/secp256.go b/crypto/secp256k1/secp256.go
index 53ad9b477..c01598b84 100644
--- a/crypto/secp256k1/secp256.go
+++ b/crypto/secp256k1/secp256.go
@@ -124,11 +124,7 @@ int secp256k1_ecdsa_sign_compact(const unsigned char *msg, int msglen,
*/
func Sign(msg []byte, seckey []byte) ([]byte, error) {
- //var nonce []byte = RandByte(32)
- nonce := make([]byte, 32)
- for i := range msg {
- nonce[i] = msg[i] ^ seckey[i]
- }
+ nonce := RandByte(32)
var sig []byte = make([]byte, 65)
var recid C.int