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
069cb661
Commit
069cb661
authored
May 24, 2017
by
Felix Lange
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypto/bn256: fix go vet false positive
Also add the package to the license tool ignore list.
parent
e1e87d8b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
22 deletions
+25
-22
update-license.go
build/update-license.go
+6
-3
curve.go
crypto/bn256/curve.go
+5
-5
gfp6.go
crypto/bn256/gfp6.go
+6
-6
optate.go
crypto/bn256/optate.go
+4
-4
twist.go
crypto/bn256/twist.go
+4
-4
No files found.
build/update-license.go
View file @
069cb661
...
...
@@ -47,11 +47,14 @@ var (
// boring stuff
"vendor/"
,
"tests/files/"
,
"build/"
,
// don't relicense vendored sources
"crypto/sha3/"
,
"crypto/ecies/"
,
"log/"
,
"crypto/secp256k1/curve.go"
,
"cmd/internal/browser"
,
"consensus/ethash/xor.go"
,
"crypto/bn256/"
,
"crypto/ecies/"
,
"crypto/secp256k1/curve.go"
,
"crypto/sha3/"
,
"internal/jsre/deps"
,
"
cmd/internal/browser
"
,
"
log/
"
,
// don't license generated files
"contracts/chequebook/contract/"
,
"contracts/ens/contract/"
,
...
...
crypto/bn256/curve.go
View file @
069cb661
...
...
@@ -186,14 +186,14 @@ func (c *curvePoint) Double(a *curvePoint, pool *bnPool) {
A
.
Mod
(
A
,
P
)
B
:=
pool
.
Get
()
.
Mul
(
a
.
y
,
a
.
y
)
B
.
Mod
(
B
,
P
)
C
:=
pool
.
Get
()
.
Mul
(
B
,
B
)
C
.
Mod
(
C
,
P
)
C
_
:=
pool
.
Get
()
.
Mul
(
B
,
B
)
C
_
.
Mod
(
C_
,
P
)
t
:=
pool
.
Get
()
.
Add
(
a
.
x
,
B
)
t2
:=
pool
.
Get
()
.
Mul
(
t
,
t
)
t2
.
Mod
(
t2
,
P
)
t
.
Sub
(
t2
,
A
)
t2
.
Sub
(
t
,
C
)
t2
.
Sub
(
t
,
C
_
)
d
:=
pool
.
Get
()
.
Add
(
t2
,
t2
)
t
.
Add
(
A
,
A
)
e
:=
pool
.
Get
()
.
Add
(
t
,
A
)
...
...
@@ -203,7 +203,7 @@ func (c *curvePoint) Double(a *curvePoint, pool *bnPool) {
t
.
Add
(
d
,
d
)
c
.
x
.
Sub
(
f
,
t
)
t
.
Add
(
C
,
C
)
t
.
Add
(
C
_
,
C_
)
t2
.
Add
(
t
,
t
)
t
.
Add
(
t2
,
t2
)
c
.
y
.
Sub
(
d
,
c
.
x
)
...
...
@@ -217,7 +217,7 @@ func (c *curvePoint) Double(a *curvePoint, pool *bnPool) {
pool
.
Put
(
A
)
pool
.
Put
(
B
)
pool
.
Put
(
C
)
pool
.
Put
(
C
_
)
pool
.
Put
(
t
)
pool
.
Put
(
t2
)
pool
.
Put
(
d
)
...
...
crypto/bn256/gfp6.go
View file @
069cb661
...
...
@@ -266,13 +266,13 @@ func (e *gfP6) Invert(a *gfP6, pool *bnPool) *gfP6 {
t1
.
Mul
(
a
.
y
,
a
.
z
,
pool
)
B
.
Sub
(
B
,
t1
)
C
:=
newGFp2
(
pool
)
C
.
Square
(
a
.
y
,
pool
)
C
_
:=
newGFp2
(
pool
)
C
_
.
Square
(
a
.
y
,
pool
)
t1
.
Mul
(
a
.
x
,
a
.
z
,
pool
)
C
.
Sub
(
C
,
t1
)
C
_
.
Sub
(
C_
,
t1
)
F
:=
newGFp2
(
pool
)
F
.
Mul
(
C
,
a
.
y
,
pool
)
F
.
Mul
(
C
_
,
a
.
y
,
pool
)
F
.
MulXi
(
F
,
pool
)
t1
.
Mul
(
A
,
a
.
z
,
pool
)
F
.
Add
(
F
,
t1
)
...
...
@@ -282,14 +282,14 @@ func (e *gfP6) Invert(a *gfP6, pool *bnPool) *gfP6 {
F
.
Invert
(
F
,
pool
)
e
.
x
.
Mul
(
C
,
F
,
pool
)
e
.
x
.
Mul
(
C
_
,
F
,
pool
)
e
.
y
.
Mul
(
B
,
F
,
pool
)
e
.
z
.
Mul
(
A
,
F
,
pool
)
t1
.
Put
(
pool
)
A
.
Put
(
pool
)
B
.
Put
(
pool
)
C
.
Put
(
pool
)
C
_
.
Put
(
pool
)
F
.
Put
(
pool
)
return
e
...
...
crypto/bn256/optate.go
View file @
069cb661
...
...
@@ -88,12 +88,12 @@ func lineFunctionDouble(r *twistPoint, q *curvePoint, pool *bnPool) (a, b, c *gf
A
:=
newGFp2
(
pool
)
.
Square
(
r
.
x
,
pool
)
B
:=
newGFp2
(
pool
)
.
Square
(
r
.
y
,
pool
)
C
:=
newGFp2
(
pool
)
.
Square
(
B
,
pool
)
C
_
:=
newGFp2
(
pool
)
.
Square
(
B
,
pool
)
D
:=
newGFp2
(
pool
)
.
Add
(
r
.
x
,
B
)
D
.
Square
(
D
,
pool
)
D
.
Sub
(
D
,
A
)
D
.
Sub
(
D
,
C
)
D
.
Sub
(
D
,
C
_
)
D
.
Add
(
D
,
D
)
E
:=
newGFp2
(
pool
)
.
Add
(
A
,
A
)
...
...
@@ -112,7 +112,7 @@ func lineFunctionDouble(r *twistPoint, q *curvePoint, pool *bnPool) (a, b, c *gf
rOut
.
y
.
Sub
(
D
,
rOut
.
x
)
rOut
.
y
.
Mul
(
rOut
.
y
,
E
,
pool
)
t
:=
newGFp2
(
pool
)
.
Add
(
C
,
C
)
t
:=
newGFp2
(
pool
)
.
Add
(
C
_
,
C_
)
t
.
Add
(
t
,
t
)
t
.
Add
(
t
,
t
)
rOut
.
y
.
Sub
(
rOut
.
y
,
t
)
...
...
@@ -142,7 +142,7 @@ func lineFunctionDouble(r *twistPoint, q *curvePoint, pool *bnPool) (a, b, c *gf
A
.
Put
(
pool
)
B
.
Put
(
pool
)
C
.
Put
(
pool
)
C
_
.
Put
(
pool
)
D
.
Put
(
pool
)
E
.
Put
(
pool
)
G
.
Put
(
pool
)
...
...
crypto/bn256/twist.go
View file @
069cb661
...
...
@@ -165,12 +165,12 @@ func (c *twistPoint) Double(a *twistPoint, pool *bnPool) {
// See http://hyperelliptic.org/EFD/g1p/auto-code/shortw/jacobian-0/doubling/dbl-2009-l.op3
A
:=
newGFp2
(
pool
)
.
Square
(
a
.
x
,
pool
)
B
:=
newGFp2
(
pool
)
.
Square
(
a
.
y
,
pool
)
C
:=
newGFp2
(
pool
)
.
Square
(
B
,
pool
)
C
_
:=
newGFp2
(
pool
)
.
Square
(
B
,
pool
)
t
:=
newGFp2
(
pool
)
.
Add
(
a
.
x
,
B
)
t2
:=
newGFp2
(
pool
)
.
Square
(
t
,
pool
)
t
.
Sub
(
t2
,
A
)
t2
.
Sub
(
t
,
C
)
t2
.
Sub
(
t
,
C
_
)
d
:=
newGFp2
(
pool
)
.
Add
(
t2
,
t2
)
t
.
Add
(
A
,
A
)
e
:=
newGFp2
(
pool
)
.
Add
(
t
,
A
)
...
...
@@ -179,7 +179,7 @@ func (c *twistPoint) Double(a *twistPoint, pool *bnPool) {
t
.
Add
(
d
,
d
)
c
.
x
.
Sub
(
f
,
t
)
t
.
Add
(
C
,
C
)
t
.
Add
(
C
_
,
C_
)
t2
.
Add
(
t
,
t
)
t
.
Add
(
t2
,
t2
)
c
.
y
.
Sub
(
d
,
c
.
x
)
...
...
@@ -191,7 +191,7 @@ func (c *twistPoint) Double(a *twistPoint, pool *bnPool) {
A
.
Put
(
pool
)
B
.
Put
(
pool
)
C
.
Put
(
pool
)
C
_
.
Put
(
pool
)
t
.
Put
(
pool
)
t2
.
Put
(
pool
)
d
.
Put
(
pool
)
...
...
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