-
Notifications
You must be signed in to change notification settings - Fork 493
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
Possible Performance Degradation of HQC128 through Update to 2023-04-30 Submission #2047
Comments
Thanks for the report! Good to know somebody has an interest in HQC. It looks like you are building liboqs with |
Thank you for your quick and nice response :) When adding the build variable Is the statement correct that this performance degradation should not be there? Because in the publication of the hqc team accompanying the submission is no indication of a performance decrease, rather the opposite.
|
Sorry, I should have been more clear: I think the relevant test to rerun is 0.9.2, with OQS_DIST_BUILD=OFF and OQS_OPT_TARGET=generic. This will test the 0.9.2 generic code. That way we can see whether there was a performance regression in the generic code. |
Like requested i built liboqs
|
Thinking about it, there was one major change between the 2021-06-06 version and 2023-04-30 version that would affect performance: HQC switched from AES to SHA3 for seed expansion. Based on the logs, it looks like your builds are using AES hardware acceleration. This could explain some of the difference. If you add the flag |
Building with
|
Of course! That was meant to illustrate how much performance depends on the underlying AES or SHA3 implementation. We do have an open issue to integrate the HQC AVX2-optimized implementation: #1596. However, I'm not inclined to work on it until the upstream source publishes a fix for the significant correctness/security issue currently present in the reference implementation.
Sure—but be advised that the HQC spec has been updated a number of times since that release, including the change to SHA3 from AES, so your results won't be current. |
@SWilson4 Looking at the release history for 0.10.0, I assume responsibility for this: I do not recall having executed the section in the In the light of this issue, what should be improved to avoid this problem from re-occurring? Is the script OK? Worthwhile re-considering the "de-emphasizing" of the profiling sub project ? Has the "noregress" script been run for 0.11.0 and 0.12.0 releases? Are there similar problems with algorithms beyond HQC? Worthwhile creating a separate issue to investigate? With this many questions, I've got to take a step back and look at it from a more general level: OQS once wanted to indiscriminately report pros and cons of all PQC algorithms -- and that included performance. Could you agree that this seems like another area where project utility got reduced? Might it be worth while to discuss this at OQS TSC and/or PQCA TAC level? I have the nagging feeling that OQS / PQCA pursue too many, somewhat contradicting goals (and/or too few people contributing for the level of goals set), leading to fewer being done at an excellent level. As now a full one year passed since LinuxFoundation/PQCA took control of OQS, time to take stock/review/realign? |
I don't recall if we did execute the performance script for the 0.10.0 release, but if we did I don't think a drop in HQC performance was significant cause for concern:
I believe the noregress script was run for the latest release. Don't remember for 0.11.0.
I think it makes sense to bring up the profiling project at the TSC and/or PQCA level, perhaps to see if we could get an external contributor (like @geedo0 for OpenSSH or @ajbozarth for demos) to revive/redo it. |
In the light of #2054 allow me to ask this question again: Is this an HQC-only problem or one affecting more algs? Is there something really wrong with common algorithms, the configs and/or copy_from_upstream? |
Describe the bug
When running
./speed_kem HQC-128
from the build/tests directory there is a big performance degradation, introduced by #1585 by @SWilson4.I wanna mention, that it just may be the effect of not having an avx2 implementation anymore, as mentioned here PQClean/PQClean#512. If this is the reason, then consider my bug report solved.
To Reproduce
Steps to reproduce the behavior:
tags/0.10.0
./speed_kem HQC-128
tags/0.9.2
./speed_kem HQC-128
Expected behavior
No performance degradation this big.
Logs
0.10.0
0.9.2
Environment (please complete the following information):
Additional context
I used git bisect to find the exact commit introducing this behaviour.
The text was updated successfully, but these errors were encountered: