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

Use Go's ModSqrt and Jacobi instead of our own #249

Merged
merged 2 commits into from
Dec 4, 2017
Merged

Use Go's ModSqrt and Jacobi instead of our own #249

merged 2 commits into from
Dec 4, 2017

Conversation

jeffallen
Copy link
Contributor

Closes #231.

@Daeinar
Copy link
Member

Daeinar commented Nov 28, 2017

Looks good

@bford
Copy link
Contributor

bford commented Nov 28, 2017

Have you double-checked that the Go standard versions are "just as constant-time" as ours?

@jeffallen
Copy link
Contributor Author

Yes. They use the same algorithm. As far as I can see, both are NOT constant time. Is that what you expect?

Also: While developing this, I went through several steps. My first (incorrectly implemented) attempt caused test failures, so then I rewrote it to calculate Go's answer and our answer side by side and panic on difference. Our test suite passed in that mode .Then I switched it to using Go's results and it continued passing, and that showed me how I'd screwed up the first time. I am confident that our test suite covers this code.

@bford
Copy link
Contributor

bford commented Nov 30, 2017

It doesn't surprise me that they're both not constant-time, but I just couldn't remember for sure. Fixing that will presumably be part of the much bigger challenge of making big.Int support constant time in general; see this Golang proposal thread I started a while ago on this topic: golang/go#20654

@ineiti ineiti merged commit 4b593a7 into master Dec 4, 2017
@ineiti ineiti deleted the issue231 branch December 4, 2017 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants