kyber
kyber copied to clipboard
Cross-platform compatibility
This PR resolves #494 and resolves #492
I tested the code on a 32-bit Ubuntu VM and tests run smoothly now. It also adds a new step on the CI to run the tests on Alpine Linux x86.
🔒 Could not start CI tests due to missing safe PR label. Please contact a DEDIS maintainer.
What did you decide regarding putting this only in a v4
, like discussed in the PRs you cite? Did you suppose that, because it panics anyway on a 32-bit architecture, it doesn't matter? Please comment this at least in this PR.
I also strongly suggest to start a CHANGELOG.md. I try to put mine in the following format:
https://keepachangelog.com/en/1.1.0/
For all the very nice PRs you're currently doing on kyber, there should be at least one line in the CHANGELOG.md
PS: For small projects, I put the CHANGELOG in the README.md. But for projects like kyber, it deserves its own file.
Overall, it doesn't make sense that "just using explicitly int64 instead of int" should solve the 32-bit issue unless we're actually doing something that is assuming a int64 somewhere on a int. It'd be more interesting to bissect on these changes to find the exact culprit and fix it there rather than just use
int64
everywhere.
From what I understand, protobuf is complaining that detected a 32bit machine, please use either int64 or int32
. So, yes, changing everything to int32
or int64
will actually solve this problem :)
The other problem it solves, for which there is not est, is hashing an int
: once as int32
on 32-bit machines, and once as int64
on 64-bit machines, which would give two different results in the hash.
@ineiti these changes are part of the dev effort for the v4 as I understand it.
OK, great
Let's wait for the drand/kyber merge before merging this, since it's touching the DKG code and will conflict.
Closing this as it has been done with a simplified approach in https://github.com/dedis/kyber/pull/529