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
34501ed2
Unverified
Commit
34501ed2
authored
Mar 22, 2022
by
ucwong
Committed by
GitHub
Mar 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypto/bls12381: go format
parent
6afb717b
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
112 additions
and
112 deletions
+112
-112
bls12_381.go
crypto/bls12381/bls12_381.go
+24
-24
isogeny.go
crypto/bls12381/isogeny.go
+88
-88
No files found.
crypto/bls12381/bls12_381.go
View file @
34501ed2
...
@@ -119,105 +119,105 @@ var g2One = PointG2{
...
@@ -119,105 +119,105 @@ var g2One = PointG2{
*/
*/
var
frobeniusCoeffs61
=
[
6
]
fe2
{
var
frobeniusCoeffs61
=
[
6
]
fe2
{
fe2
{
{
fe
{
0x760900000002fffd
,
0xebf4000bc40c0002
,
0x5f48985753c758ba
,
0x77ce585370525745
,
0x5c071a97a256ec6d
,
0x15f65ec3fa80e493
},
fe
{
0x760900000002fffd
,
0xebf4000bc40c0002
,
0x5f48985753c758ba
,
0x77ce585370525745
,
0x5c071a97a256ec6d
,
0x15f65ec3fa80e493
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
},
},
fe2
{
{
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
fe
{
0xcd03c9e48671f071
,
0x5dab22461fcda5d2
,
0x587042afd3851b95
,
0x8eb60ebe01bacb9e
,
0x03f97d6e83d050d2
,
0x18f0206554638741
},
fe
{
0xcd03c9e48671f071
,
0x5dab22461fcda5d2
,
0x587042afd3851b95
,
0x8eb60ebe01bacb9e
,
0x03f97d6e83d050d2
,
0x18f0206554638741
},
},
},
fe2
{
{
fe
{
0x30f1361b798a64e8
,
0xf3b8ddab7ece5a2a
,
0x16a8ca3ac61577f7
,
0xc26a2ff874fd029b
,
0x3636b76660701c6e
,
0x051ba4ab241b6160
},
fe
{
0x30f1361b798a64e8
,
0xf3b8ddab7ece5a2a
,
0x16a8ca3ac61577f7
,
0xc26a2ff874fd029b
,
0x3636b76660701c6e
,
0x051ba4ab241b6160
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
},
},
fe2
{
{
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
fe
{
0x760900000002fffd
,
0xebf4000bc40c0002
,
0x5f48985753c758ba
,
0x77ce585370525745
,
0x5c071a97a256ec6d
,
0x15f65ec3fa80e493
},
fe
{
0x760900000002fffd
,
0xebf4000bc40c0002
,
0x5f48985753c758ba
,
0x77ce585370525745
,
0x5c071a97a256ec6d
,
0x15f65ec3fa80e493
},
},
},
fe2
{
{
fe
{
0xcd03c9e48671f071
,
0x5dab22461fcda5d2
,
0x587042afd3851b95
,
0x8eb60ebe01bacb9e
,
0x03f97d6e83d050d2
,
0x18f0206554638741
},
fe
{
0xcd03c9e48671f071
,
0x5dab22461fcda5d2
,
0x587042afd3851b95
,
0x8eb60ebe01bacb9e
,
0x03f97d6e83d050d2
,
0x18f0206554638741
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
},
},
fe2
{
{
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
fe
{
0x30f1361b798a64e8
,
0xf3b8ddab7ece5a2a
,
0x16a8ca3ac61577f7
,
0xc26a2ff874fd029b
,
0x3636b76660701c6e
,
0x051ba4ab241b6160
},
fe
{
0x30f1361b798a64e8
,
0xf3b8ddab7ece5a2a
,
0x16a8ca3ac61577f7
,
0xc26a2ff874fd029b
,
0x3636b76660701c6e
,
0x051ba4ab241b6160
},
},
},
}
}
var
frobeniusCoeffs62
=
[
6
]
fe2
{
var
frobeniusCoeffs62
=
[
6
]
fe2
{
fe2
{
{
fe
{
0x760900000002fffd
,
0xebf4000bc40c0002
,
0x5f48985753c758ba
,
0x77ce585370525745
,
0x5c071a97a256ec6d
,
0x15f65ec3fa80e493
},
fe
{
0x760900000002fffd
,
0xebf4000bc40c0002
,
0x5f48985753c758ba
,
0x77ce585370525745
,
0x5c071a97a256ec6d
,
0x15f65ec3fa80e493
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
},
},
fe2
{
{
fe
{
0x890dc9e4867545c3
,
0x2af322533285a5d5
,
0x50880866309b7e2c
,
0xa20d1b8c7e881024
,
0x14e4f04fe2db9068
,
0x14e56d3f1564853a
},
fe
{
0x890dc9e4867545c3
,
0x2af322533285a5d5
,
0x50880866309b7e2c
,
0xa20d1b8c7e881024
,
0x14e4f04fe2db9068
,
0x14e56d3f1564853a
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
},
},
fe2
{
{
fe
{
0xcd03c9e48671f071
,
0x5dab22461fcda5d2
,
0x587042afd3851b95
,
0x8eb60ebe01bacb9e
,
0x03f97d6e83d050d2
,
0x18f0206554638741
},
fe
{
0xcd03c9e48671f071
,
0x5dab22461fcda5d2
,
0x587042afd3851b95
,
0x8eb60ebe01bacb9e
,
0x03f97d6e83d050d2
,
0x18f0206554638741
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
},
},
fe2
{
{
fe
{
0x43f5fffffffcaaae
,
0x32b7fff2ed47fffd
,
0x07e83a49a2e99d69
,
0xeca8f3318332bb7a
,
0xef148d1ea0f4c069
,
0x040ab3263eff0206
},
fe
{
0x43f5fffffffcaaae
,
0x32b7fff2ed47fffd
,
0x07e83a49a2e99d69
,
0xeca8f3318332bb7a
,
0xef148d1ea0f4c069
,
0x040ab3263eff0206
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
},
},
fe2
{
{
fe
{
0x30f1361b798a64e8
,
0xf3b8ddab7ece5a2a
,
0x16a8ca3ac61577f7
,
0xc26a2ff874fd029b
,
0x3636b76660701c6e
,
0x051ba4ab241b6160
},
fe
{
0x30f1361b798a64e8
,
0xf3b8ddab7ece5a2a
,
0x16a8ca3ac61577f7
,
0xc26a2ff874fd029b
,
0x3636b76660701c6e
,
0x051ba4ab241b6160
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
},
},
fe2
{
{
fe
{
0xecfb361b798dba3a
,
0xc100ddb891865a2c
,
0x0ec08ff1232bda8e
,
0xd5c13cc6f1ca4721
,
0x47222a47bf7b5c04
,
0x0110f184e51c5f59
},
fe
{
0xecfb361b798dba3a
,
0xc100ddb891865a2c
,
0x0ec08ff1232bda8e
,
0xd5c13cc6f1ca4721
,
0x47222a47bf7b5c04
,
0x0110f184e51c5f59
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
},
},
}
}
var
frobeniusCoeffs12
=
[
12
]
fe2
{
var
frobeniusCoeffs12
=
[
12
]
fe2
{
fe2
{
{
fe
{
0x760900000002fffd
,
0xebf4000bc40c0002
,
0x5f48985753c758ba
,
0x77ce585370525745
,
0x5c071a97a256ec6d
,
0x15f65ec3fa80e493
},
fe
{
0x760900000002fffd
,
0xebf4000bc40c0002
,
0x5f48985753c758ba
,
0x77ce585370525745
,
0x5c071a97a256ec6d
,
0x15f65ec3fa80e493
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
},
},
fe2
{
{
fe
{
0x07089552b319d465
,
0xc6695f92b50a8313
,
0x97e83cccd117228f
,
0xa35baecab2dc29ee
,
0x1ce393ea5daace4d
,
0x08f2220fb0fb66eb
},
fe
{
0x07089552b319d465
,
0xc6695f92b50a8313
,
0x97e83cccd117228f
,
0xa35baecab2dc29ee
,
0x1ce393ea5daace4d
,
0x08f2220fb0fb66eb
},
fe
{
0xb2f66aad4ce5d646
,
0x5842a06bfc497cec
,
0xcf4895d42599d394
,
0xc11b9cba40a8e8d0
,
0x2e3813cbe5a0de89
,
0x110eefda88847faf
},
fe
{
0xb2f66aad4ce5d646
,
0x5842a06bfc497cec
,
0xcf4895d42599d394
,
0xc11b9cba40a8e8d0
,
0x2e3813cbe5a0de89
,
0x110eefda88847faf
},
},
},
fe2
{
{
fe
{
0xecfb361b798dba3a
,
0xc100ddb891865a2c
,
0x0ec08ff1232bda8e
,
0xd5c13cc6f1ca4721
,
0x47222a47bf7b5c04
,
0x0110f184e51c5f59
},
fe
{
0xecfb361b798dba3a
,
0xc100ddb891865a2c
,
0x0ec08ff1232bda8e
,
0xd5c13cc6f1ca4721
,
0x47222a47bf7b5c04
,
0x0110f184e51c5f59
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
},
},
fe2
{
{
fe
{
0x3e2f585da55c9ad1
,
0x4294213d86c18183
,
0x382844c88b623732
,
0x92ad2afd19103e18
,
0x1d794e4fac7cf0b9
,
0x0bd592fc7d825ec8
},
fe
{
0x3e2f585da55c9ad1
,
0x4294213d86c18183
,
0x382844c88b623732
,
0x92ad2afd19103e18
,
0x1d794e4fac7cf0b9
,
0x0bd592fc7d825ec8
},
fe
{
0x7bcfa7a25aa30fda
,
0xdc17dec12a927e7c
,
0x2f088dd86b4ebef1
,
0xd1ca2087da74d4a7
,
0x2da2596696cebc1d
,
0x0e2b7eedbbfd87d2
},
fe
{
0x7bcfa7a25aa30fda
,
0xdc17dec12a927e7c
,
0x2f088dd86b4ebef1
,
0xd1ca2087da74d4a7
,
0x2da2596696cebc1d
,
0x0e2b7eedbbfd87d2
},
},
},
fe2
{
{
fe
{
0x30f1361b798a64e8
,
0xf3b8ddab7ece5a2a
,
0x16a8ca3ac61577f7
,
0xc26a2ff874fd029b
,
0x3636b76660701c6e
,
0x051ba4ab241b6160
},
fe
{
0x30f1361b798a64e8
,
0xf3b8ddab7ece5a2a
,
0x16a8ca3ac61577f7
,
0xc26a2ff874fd029b
,
0x3636b76660701c6e
,
0x051ba4ab241b6160
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
},
},
fe2
{
{
fe
{
0x3726c30af242c66c
,
0x7c2ac1aad1b6fe70
,
0xa04007fbba4b14a2
,
0xef517c3266341429
,
0x0095ba654ed2226b
,
0x02e370eccc86f7dd
},
fe
{
0x3726c30af242c66c
,
0x7c2ac1aad1b6fe70
,
0xa04007fbba4b14a2
,
0xef517c3266341429
,
0x0095ba654ed2226b
,
0x02e370eccc86f7dd
},
fe
{
0x82d83cf50dbce43f
,
0xa2813e53df9d018f
,
0xc6f0caa53c65e181
,
0x7525cf528d50fe95
,
0x4a85ed50f4798a6b
,
0x171da0fd6cf8eebd
},
fe
{
0x82d83cf50dbce43f
,
0xa2813e53df9d018f
,
0xc6f0caa53c65e181
,
0x7525cf528d50fe95
,
0x4a85ed50f4798a6b
,
0x171da0fd6cf8eebd
},
},
},
fe2
{
{
fe
{
0x43f5fffffffcaaae
,
0x32b7fff2ed47fffd
,
0x07e83a49a2e99d69
,
0xeca8f3318332bb7a
,
0xef148d1ea0f4c069
,
0x040ab3263eff0206
},
fe
{
0x43f5fffffffcaaae
,
0x32b7fff2ed47fffd
,
0x07e83a49a2e99d69
,
0xeca8f3318332bb7a
,
0xef148d1ea0f4c069
,
0x040ab3263eff0206
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
},
},
fe2
{
{
fe
{
0xb2f66aad4ce5d646
,
0x5842a06bfc497cec
,
0xcf4895d42599d394
,
0xc11b9cba40a8e8d0
,
0x2e3813cbe5a0de89
,
0x110eefda88847faf
},
fe
{
0xb2f66aad4ce5d646
,
0x5842a06bfc497cec
,
0xcf4895d42599d394
,
0xc11b9cba40a8e8d0
,
0x2e3813cbe5a0de89
,
0x110eefda88847faf
},
fe
{
0x07089552b319d465
,
0xc6695f92b50a8313
,
0x97e83cccd117228f
,
0xa35baecab2dc29ee
,
0x1ce393ea5daace4d
,
0x08f2220fb0fb66eb
},
fe
{
0x07089552b319d465
,
0xc6695f92b50a8313
,
0x97e83cccd117228f
,
0xa35baecab2dc29ee
,
0x1ce393ea5daace4d
,
0x08f2220fb0fb66eb
},
},
},
fe2
{
{
fe
{
0xcd03c9e48671f071
,
0x5dab22461fcda5d2
,
0x587042afd3851b95
,
0x8eb60ebe01bacb9e
,
0x03f97d6e83d050d2
,
0x18f0206554638741
},
fe
{
0xcd03c9e48671f071
,
0x5dab22461fcda5d2
,
0x587042afd3851b95
,
0x8eb60ebe01bacb9e
,
0x03f97d6e83d050d2
,
0x18f0206554638741
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
},
},
fe2
{
{
fe
{
0x7bcfa7a25aa30fda
,
0xdc17dec12a927e7c
,
0x2f088dd86b4ebef1
,
0xd1ca2087da74d4a7
,
0x2da2596696cebc1d
,
0x0e2b7eedbbfd87d2
},
fe
{
0x7bcfa7a25aa30fda
,
0xdc17dec12a927e7c
,
0x2f088dd86b4ebef1
,
0xd1ca2087da74d4a7
,
0x2da2596696cebc1d
,
0x0e2b7eedbbfd87d2
},
fe
{
0x3e2f585da55c9ad1
,
0x4294213d86c18183
,
0x382844c88b623732
,
0x92ad2afd19103e18
,
0x1d794e4fac7cf0b9
,
0x0bd592fc7d825ec8
},
fe
{
0x3e2f585da55c9ad1
,
0x4294213d86c18183
,
0x382844c88b623732
,
0x92ad2afd19103e18
,
0x1d794e4fac7cf0b9
,
0x0bd592fc7d825ec8
},
},
},
fe2
{
{
fe
{
0x890dc9e4867545c3
,
0x2af322533285a5d5
,
0x50880866309b7e2c
,
0xa20d1b8c7e881024
,
0x14e4f04fe2db9068
,
0x14e56d3f1564853a
},
fe
{
0x890dc9e4867545c3
,
0x2af322533285a5d5
,
0x50880866309b7e2c
,
0xa20d1b8c7e881024
,
0x14e4f04fe2db9068
,
0x14e56d3f1564853a
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
fe
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
},
},
fe2
{
{
fe
{
0x82d83cf50dbce43f
,
0xa2813e53df9d018f
,
0xc6f0caa53c65e181
,
0x7525cf528d50fe95
,
0x4a85ed50f4798a6b
,
0x171da0fd6cf8eebd
},
fe
{
0x82d83cf50dbce43f
,
0xa2813e53df9d018f
,
0xc6f0caa53c65e181
,
0x7525cf528d50fe95
,
0x4a85ed50f4798a6b
,
0x171da0fd6cf8eebd
},
fe
{
0x3726c30af242c66c
,
0x7c2ac1aad1b6fe70
,
0xa04007fbba4b14a2
,
0xef517c3266341429
,
0x0095ba654ed2226b
,
0x02e370eccc86f7dd
},
fe
{
0x3726c30af242c66c
,
0x7c2ac1aad1b6fe70
,
0xa04007fbba4b14a2
,
0xef517c3266341429
,
0x0095ba654ed2226b
,
0x02e370eccc86f7dd
},
},
},
...
...
crypto/bls12381/isogeny.go
View file @
34501ed2
This diff is collapsed.
Click to expand it.
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