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
8f69b5c7
Commit
8f69b5c7
authored
Feb 16, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added invalid sec key test
parent
d2a4bc4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
secp256_test.go
crypto/secp256k1/secp256_test.go
+10
-1
No files found.
crypto/secp256k1/secp256_test.go
View file @
8f69b5c7
...
...
@@ -3,9 +3,10 @@ package secp256k1
import
(
"bytes"
"fmt"
"github.com/ethereum/go-ethereum/crypto/randentropy"
"log"
"testing"
"github.com/ethereum/go-ethereum/crypto/randentropy"
)
const
TESTS
=
10000
// how many tests
...
...
@@ -227,3 +228,11 @@ func Test_Secp256_06b(t *testing.T) {
fmt
.
Printf
(
"ERROR: Accepted signature for %v of %v random messages
\n
"
,
fail_count
,
TESTS
)
}
}
func
TestInvalidKey
(
t
*
testing
.
T
)
{
p1
:=
make
([]
byte
,
32
)
err
:=
VerifySeckeyValidity
(
p1
)
if
err
==
nil
{
t
.
Errorf
(
"pvk %x varify sec key should have returned error"
,
p1
)
}
}
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