kyber icon indicating copy to clipboard operation
kyber copied to clipboard

Cross-platform compatibility

Open matteosz opened this issue 11 months ago • 6 comments

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.

matteosz avatar Mar 16 '24 18:03 matteosz

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

github-actions[bot] avatar Mar 16 '24 18:03 github-actions[bot]

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.

ineiti avatar Mar 18 '24 07:03 ineiti

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

ineiti avatar Mar 18 '24 13:03 ineiti

Quality Gate Failed Quality Gate failed

Failed conditions
13.9% Duplication on New Code (required ≤ 10%)

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Mar 23 '24 16:03 sonarqubecloud[bot]

Let's wait for the drand/kyber merge before merging this, since it's touching the DKG code and will conflict.

AnomalRoil avatar Apr 02 '24 18:04 AnomalRoil

Quality Gate Failed Quality Gate failed

Failed conditions
37.0% Duplication on New Code (required ≤ 10%)

See analysis details on SonarCloud

sonarqubecloud[bot] avatar May 23 '24 08:05 sonarqubecloud[bot]

Closing this as it has been done with a simplified approach in https://github.com/dedis/kyber/pull/529

matteosz avatar Jun 09 '24 17:06 matteosz