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

Bls12381 #505

Merged
merged 13 commits into from
Jun 13, 2024
Merged

Bls12381 #505

merged 13 commits into from
Jun 13, 2024

Conversation

matteosz
Copy link
Contributor

@matteosz matteosz commented Mar 25, 2024

This PR introduces a different implementation of bls12381 (kilic) to kyber, which is faster than the actual circl implementation

@matteosz matteosz self-assigned this Mar 25, 2024
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
32.6% Duplication on New Code (required ≤ 10%)

See analysis details on SonarCloud

@matteosz matteosz marked this pull request as ready for review March 25, 2024 13:19
@matteosz matteosz marked this pull request as draft March 25, 2024 13:20
@pierluca
Copy link
Contributor

I know this is a work in progress, but in general adding (a lot) more documentation would be helpful, as right now the code seems mostly undocumented.

It would also seem that go fmt wasn't run on all files. You might want to configure your editor to do this automatically.

@matteosz
Copy link
Contributor Author

matteosz commented Apr 4, 2024

I know this is a work in progress, but in general adding (a lot) more documentation would be helpful, as right now the code seems mostly undocumented.

It would also seem that go fmt wasn't run on all files. You might want to configure your editor to do this automatically.

Yep, I'll add some more doc. This was put on hold as I'm waiting the drand fork to be merged before working and merging this PR, to avoid further conflicts

@matteosz matteosz changed the base branch from master to drandmerge May 4, 2024 12:51
pairing/bls12381/kilic/g1.go Show resolved Hide resolved
pairing/bls12381/circl/suite_test.go Outdated Show resolved Hide resolved
pairing/bn256/suite_test.go Outdated Show resolved Hide resolved
sign/test/bls_test.go Outdated Show resolved Hide resolved
@matteosz matteosz marked this pull request as ready for review May 10, 2024 14:48
K1li4nL and others added 2 commits May 22, 2024 11:02
* Add ByteOrder() function + constant from int.go
* Update circl_bls12381 and edwards25519 scalars
* Formatting
* Fix typo
* Add Order() to the scalar interface
* Adapt IBE to make it general
* Add doc
* Fix dkg bug (#515)
* BugFix: use array index instead of node index
* Fix endianess bool
* Add tests for endianess
pairing/bls12381/bls12381_test.go Outdated Show resolved Hide resolved
pairing/bls12381/bls12381_test.go Outdated Show resolved Hide resolved
pairing/bls12381/kilic/group.go Outdated Show resolved Hide resolved
pairing/bls12381/kilic/suite.go Show resolved Hide resolved
pairing/bls12381/kilic/suite_test.go Outdated Show resolved Hide resolved
@matteosz matteosz linked an issue Jun 6, 2024 that may be closed by this pull request
Copy link

sonarqubecloud bot commented Jun 7, 2024

Please retry analysis of this Pull-Request directly on SonarCloud

@matteosz matteosz requested a review from AnomalRoil June 10, 2024 08:11
Copy link
Contributor

@AnomalRoil AnomalRoil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you just forgot to move the circl/suite_test.go file to its new folder, no?

}

func (s Suite) Write(w io.Writer, objs ...interface{}) error {
panic("Suite.Write(): deprecated in drand")
panic("Suite.Write(): deprecated in kyber")
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if Suite.Read and Suite.Write are both deprecated, V4 would be a good time to remove them in another PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not move this to pairing/cirl/suite_test.go instead of deleting it?
Looks like this file might have been "forgotten" behind, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh no, all the methods contained in that file were transferred to general bls12381_test.go, so there was no reason to keep the duplicated tests.

pairing/bls12381/kilic/group.go Outdated Show resolved Hide resolved
Copy link

1 similar comment
Copy link

@AnomalRoil AnomalRoil merged commit ae87c6b into drandmerge Jun 13, 2024
11 checks passed
@AnomalRoil AnomalRoil deleted the bls12381 branch June 13, 2024 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is there a plan to add support for BLS12-381?
5 participants