Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go1.19: update CI and run gofmt on files #240

Merged
merged 1 commit into from
Aug 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: install Go
uses: actions/setup-go@v2
with:
go-version: 1.18.x
go-version: 1.19.x
- name: checkout code
uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
test:
strategy:
matrix:
go-version: [1.17.x, 1.18.x]
go-version: [1.18.x, 1.19.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
needs:
Expand Down
6 changes: 4 additions & 2 deletions accumulator/merkletree/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ func sum(h hash.Hash, data ...[]byte) []byte {

// leafSum returns the hash created from data inserted to form a leaf. Leaf
// sums are calculated using:
// Hash(0x00 || data)
//
// Hash(0x00 || data)
func leafSum(h hash.Hash, data []byte) []byte {

//return sum(h, leafHashPrefix, data)
Expand All @@ -93,7 +94,8 @@ func leafSum(h hash.Hash, data []byte) []byte {

// nodeSum returns the hash created from two sibling nodes being combined into
// a parent node. Node sums are calculated using:
// Hash(0x01 || left sibling sum || right sibling sum)
//
// Hash(0x01 || left sibling sum || right sibling sum)
func nodeSum(h hash.Hash, a, b []byte) []byte {
//return sum(h, nodeHashPrefix, a, b)
return sum(h, a, b)
Expand Down
30 changes: 18 additions & 12 deletions ecc/bls12-377/bls12-377.go
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
// Package bls12377 efficient elliptic curve, pairing and hash to curve implementation for bls12-377.
//
// bls12-377: A Barreto--Lynn--Scott curve with
// embedding degree k=12
// seed x₀=9586122913090633729
// 𝔽r: r=8444461749428370424248824938781546531375899335154063827935233455917409239041 (x₀⁴-x₀²+1)
// 𝔽p: p=258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177 ((x₀-1)² ⋅ r(x₀)/3+x₀)
// (E/𝔽p): Y²=X³+1
// (Eₜ/𝔽p²): Y² = X³+1/u (D-type twist)
// r ∣ #E(Fp) and r ∣ #Eₜ(𝔽p²)
//
// embedding degree k=12
// seed x₀=9586122913090633729
// 𝔽r: r=8444461749428370424248824938781546531375899335154063827935233455917409239041 (x₀⁴-x₀²+1)
// 𝔽p: p=258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177 ((x₀-1)² ⋅ r(x₀)/3+x₀)
// (E/𝔽p): Y²=X³+1
// (Eₜ/𝔽p²): Y² = X³+1/u (D-type twist)
// r ∣ #E(Fp) and r ∣ #Eₜ(𝔽p²)
//
// Extension fields tower:
// 𝔽p²[u] = 𝔽p/u²+5
// 𝔽p⁶[v] = 𝔽p²/v³-u
// 𝔽p¹²[w] = 𝔽p⁶/w²-v
//
// 𝔽p²[u] = 𝔽p/u²+5
// 𝔽p⁶[v] = 𝔽p²/v³-u
// 𝔽p¹²[w] = 𝔽p⁶/w²-v
//
// optimal Ate loop size:
// x₀
//
// x₀
//
// Security: estimated 126-bit level following [https://eprint.iacr.org/2019/885.pdf]
// (r is 253 bits and p¹² is 4521 bits)
//
// Warning
// # Warning
//
// This code has not been audited and is provided as-is. In particular, there is no security guarantees such as constant time implementation or side-channel attack resistance.
package bls12377
Expand Down
33 changes: 18 additions & 15 deletions ecc/bls12-377/fp/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 23 additions & 22 deletions ecc/bls12-377/fp/element.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions ecc/bls12-377/fp/element_ops_amd64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions ecc/bls12-377/fp/element_ops_noasm.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ecc/bls12-377/fp/element_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 18 additions & 15 deletions ecc/bls12-377/fr/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading