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
d1af4e1a
Commit
d1af4e1a
authored
Apr 03, 2018
by
David Huie
Committed by
Felix Lange
Apr 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypto/secp256k1: catch curve parameter parse errors (#16392)
parent
6cdfb9a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
curve.go
crypto/secp256k1/curve.go
+5
-5
No files found.
crypto/secp256k1/curve.go
View file @
d1af4e1a
...
@@ -290,11 +290,11 @@ func init() {
...
@@ -290,11 +290,11 @@ func init() {
// See SEC 2 section 2.7.1
// See SEC 2 section 2.7.1
// curve parameters taken from:
// curve parameters taken from:
// http://www.secg.org/collateral/sec2_final.pdf
// http://www.secg.org/collateral/sec2_final.pdf
theCurve
.
P
,
_
=
new
(
big
.
Int
)
.
SetString
(
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F"
,
16
)
theCurve
.
P
=
math
.
MustParseBig256
(
"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F"
)
theCurve
.
N
,
_
=
new
(
big
.
Int
)
.
SetString
(
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141"
,
16
)
theCurve
.
N
=
math
.
MustParseBig256
(
"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141"
)
theCurve
.
B
,
_
=
new
(
big
.
Int
)
.
SetString
(
"0000000000000000000000000000000000000000000000000000000000000007"
,
16
)
theCurve
.
B
=
math
.
MustParseBig256
(
"0x0000000000000000000000000000000000000000000000000000000000000007"
)
theCurve
.
Gx
,
_
=
new
(
big
.
Int
)
.
SetString
(
"79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798"
,
16
)
theCurve
.
Gx
=
math
.
MustParseBig256
(
"0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798"
)
theCurve
.
Gy
,
_
=
new
(
big
.
Int
)
.
SetString
(
"483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8"
,
16
)
theCurve
.
Gy
=
math
.
MustParseBig256
(
"0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8"
)
theCurve
.
BitSize
=
256
theCurve
.
BitSize
=
256
}
}
...
...
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