Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
a008c21c
Commit
a008c21c
authored
Jan 31, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed Sign nonce
parent
cb382fa7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
6 deletions
+2
-6
secp256.go
crypto/secp256k1/secp256.go
+1
-5
secp256_rand.go
crypto/secp256k1/secp256_rand.go
+1
-1
No files found.
crypto/secp256k1/secp256.go
View file @
a008c21c
...
...
@@ -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
...
...
crypto/secp256k1/secp256_rand.go
View file @
a008c21c
...
...
@@ -75,7 +75,7 @@ func RandByte(n int) []byte {
return
nil
}
buff2
:=
RandByteWeakCrypto
(
n
)
buff2
:=
saltByte
(
n
)
for
i
:=
0
;
i
<
n
;
i
++
{
buff
[
i
]
^=
buff2
[
2
]
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment