dedis / kyber

Advanced crypto library for the Go language
Other
643 stars 168 forks source link

Use the group-specific scalar type when hashing in BDN #553

Closed Stebalien closed 1 month ago

Stebalien commented 1 month ago

Previously, hashPointToR would always use mod.Int but that only works with the Kilic backend. This change makes the BDN scheme work with all backends.

This PR is currently based on #546 as it touches masks. You can ignore everything but the last commit.

github-actions[bot] commented 1 month ago

🔒 Could not start CI tests due to missing safe PR label. Please contact a DEDIS maintainer.

AnomalRoil commented 1 month ago

@Stebalien seems your PR didn't like your other PR getting squashed, sorry for that I somehow thought Github handled that automagically.

Also it seems you might be touching some of the same bits and bobs as in #540 which removes insecure aggregation from the bls package, not sure which one we should be merging first. @K1li4nL opinion?

Stebalien commented 1 month ago

Rebased (although something is wrong with CI).

This should only touch the bdn package so it shouldn't interfere too much with that PR, although it does change the NewMask constructor.

K1li4nL commented 1 month ago

@Stebalien seems your PR didn't like your other PR getting squashed, sorry for that I somehow thought Github handled that automagically.

Also it seems you might be touching some of the same bits and bobs as in #540 which removes insecure aggregation from the bls package, not sure which one we should be merging first. @K1li4nL opinion?

I stumbled upon the group specific problem when removing the insecure part of BLS, I solved it pretty similarly though this fix is cleaner than mine. I can remove my fix from my pr and rebase on top of that one.

K1li4nL commented 1 month ago

Rebased (although something is wrong with CI).

This should only touch the bdn package so it shouldn't interfere too much with that PR, although it does change the NewMask constructor.

The linter is complaining about commented code leftover, I guess that's why the rest of the pipeline got canceled

Stebalien commented 1 month ago

Ah, that would make sense. Let's see if this works...

sonarcloud[bot] commented 1 month ago

Please retry analysis of this Pull-Request directly on SonarCloud

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
6 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud