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

In ecc/bls12381, Pairing operations seems racy #493

Closed
AnomalRoil opened this issue Apr 4, 2024 · 0 comments · Fixed by #494
Closed

In ecc/bls12381, Pairing operations seems racy #493

AnomalRoil opened this issue Apr 4, 2024 · 0 comments · Fixed by #494
Assignees

Comments

@AnomalRoil
Copy link

It seems there are internal functions in circl that are "racy", because they are passing arrays using pointers, reading from these arrays and writing to these same arrays, causing data races when multiple go routines are operating on the same points at the same time.

This was discovered in the drand/kyber repo, where we have recently accepted a PR to add circl support for BLS12-381, but sadly despite having a test for data races in pairings, we didn't catch it earlier. (we weren't using -race in CI by mistake).

To reproduce:

git clone https://github.com/drand/kyber.git
cd kyber
go test -race ./pairing/circl_bls12381/...

This should fail in the TestRacePairings test.

@armfazh armfazh self-assigned this Apr 4, 2024
@armfazh armfazh changed the title In ecc/bls12381, fiatFpMontMul seems racy In ecc/bls12381, Pairing operations seems racy Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants