Comments (5)
Uh oh! Not good, thanks for finding; obviously that's another test we should have had in test.testGroup() - can you add one, verify that the problem only crops up with the NIST suite, and (obviously) verify whether it's Go's fault or ours? (My quick look at the code seems to confirm what you're seeing; I don't see how that would be happening in our code.)
from kyber.
I only found it after adding test cases to test.testGroup
. NIST is the only suite that has failed. Can confirm that it's in Go - elliptic.Marshall
uses big.Int.SetBytes
which interprets the slice as an unsigned value (see https://golang.org/pkg/math/big/#Int.SetBytes). Whether that's the proper behavior or a bug in Go...
from kyber.
Ah, wait - I'm guessing it's probably our (my) fault. Go's elliptic routines probably assume that coordinates are never "negative" at least as seen by the big.Int package, and that's probably a reasonable assumption given that the arithmetic is all supposed to be modulo a big prime. What might be going on is that we're mistakenly causing a y-coordinate to be "negative" as a big.Int for some reason. I don't offhand see what would do that, as for example the Neg() function uses a pretty brain-damaged method of getting the inverse of a point but even that brain-damaged method shouldn't produce a literally negative big.Int y-coordinate as far as I can see.
from kyber.
Aha - oops, looks like genPoint might. Does the y.Neg(y) need to be changed to y.Neg(y).Mod(y, p.c.p.P)?
B
from kyber.
Or more efficiently, perhaps y.Sub(p.c.p.P, y)?
from kyber.
Related Issues (20)
- How to transmit shares over the network? HOT 4
- Use another suite for sign and verify in DKG
- How to run tbls over network? HOT 4
- Testing HOT 1
- Infinite for loop while embedding data in an Ed25519 point HOT 1
- Old dkg nodes doesn't certify after re-sharing HOT 1
- found a bug in dkg_test HOT 1
- Bug: share/dkg/rabin: All N participants must be available HOT 5
- Bug: share/vss/rabin MinimumT(6)=3 instead of 4 HOT 12
- Build fails on MacOS HOT 4
- github-workflow: go mod tidy fails HOT 1
- Inconsistent edwards25519's Scalar (un)marshaling for some inputs. HOT 4
- DKG Protocol - Public Key Change After Reshare HOT 9
- Use fixed-length integers to improve cross-platform compatibility HOT 3
- Building on 32-bit systems fail HOT 10
- v3/sign/bls shows up as depreciated when i try to import it HOT 10
- Use specific go versions in workflows and go.mo HOT 1
- The Scalar and Point interface do not allow error handling HOT 1
- Refactor some package names
- Add a Montgomery representation of Curve25519, called "Curve25519"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kyber.