-
Notifications
You must be signed in to change notification settings - Fork 517
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
Add UOV #2094
base: main
Are you sure you want to change the base?
Add UOV #2094
Conversation
Signed-off-by: Matthias J. Kannwischer <[email protected]>
Signed-off-by: Matthias J. Kannwischer <[email protected]>
f4c00e3
to
f7ed2ad
Compare
The Travis CI found two interesting problems that I have fixed by now:
Unless I broke something in the meantime, CI should be all green now. |
None of the zephyr tests would work for me even for the parameter sets with the smallest memory footprint. I suspect that memory is rather limited in these tests? |
Tagging @Frauschi about the Zephyr question. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @mkannwischer for contributing UOV!
One minor thing, we have a config option that builds only the onramp candidates. The UOV variants should be added to this list as well:
liboqs/.CMake/alg_support.cmake
Lines 217 to 219 in d4eb7a6
elseif(${OQS_ALGS_ENABLED} STREQUAL "NIST_SIG_ONRAMP") | |
filter_algs("SIG_mayo_1;SIG_mayo_2;SIG_mayo_3;SIG_mayo_5;SIG_cross_rsdp_128_balanced;SIG_cross_rsdp_128_fast;SIG_cross_rsdp_128_small;SIG_cross_rsdp_192_balanced;SIG_cross_rsdp_192_fast;SIG_cross_rsdp_192_small;SIG_cross_rsdp_256_balanced;SIG_cross_rsdp_256_fast;SIG_cross_rsdp_256_small;SIG_cross_rsdpg_128_balanced;SIG_cross_rsdpg_128_fast;SIG_cross_rsdpg_128_small;SIG_cross_rsdpg_192_balanced;SIG_cross_rsdpg_192_fast;SIG_cross_rsdpg_192_small;SIG_cross_rsdpg_256_balanced;SIG_cross_rsdpg_256_fast;SIG_cross_rsdpg_256_small") | |
else() |
The zephyr config is limited to 512K stack size
liboqs/zephyr/samples/Signatures/prj.conf
Line 14 in d4eb7a6
CONFIG_MAIN_STACK_SIZE=524288 |
and 256K malloc size
liboqs/zephyr/samples/Signatures/prj.conf
Line 18 in d4eb7a6
CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=262144 |
I am not certain if these values can be safely increased.
I added UOV there.
I think there is no hope that this is going to work with the current implementations. |
Regarding the Zephyr problems: The CI tests emulate different Zephyr boards via QEMU. Technically, we can increase the stack and heap sizes for these tests to make them run successfully (as in QEMU, available memory is much larger). However, the current values are already quite large considering the actual hardware Zephyr is intended for (smaller microcontrollers). Hence, I am not sure if this would be a real benefit, as UOV (in its current implementation with the memory usage) would never run on a real microcontroller target anyway (as they typically have available RAM in the kilobyte or small megabyte region). So, maybe we disable UOV for Zephyr completely at the moment? This can be revisited once an implementation with less memory usage is available. |
Thanks! |
Signed-off-by: Matthias J. Kannwischer <[email protected]>
Signed-off-by: Douglas Stebila <[email protected]>
Signed-off-by: Matthias J. Kannwischer <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
We have two approving merges so I think we can go ahead and merge this. However there is a merge conflict in cbom.json; I don't know enough about the CBOM file to know how to resolve this. Can anyone help? |
I'll have a look at the CBOM merge conflict and try to resolve it. |
Signed-off-by: Basil Hess <[email protected]>
Resolved. |
This PR adds the UOV signature scheme which is a second-round candidate in the NIST digital signature competition.
The implementation is sourced from pqov and implements the round 2 specification.
CI (full tests + extended tests) is passing in my fork of liboqs.
This PR includes the reference, AVX2, and Neon implementations for all 12 parameter sets. There are additional 12 parameter sets using 4-round AES128 instead of the default 10 rounds. I have not included those yet - if there is interest in them, I'm happy to add them later.
I had to make a few changes to the implementation to make it through CI and I'm porting them back to the main code base here: pqov/pqov#58.
Once that is merged no further patches are required for the implementation. Once that is merged, I will update this PR and mark it as ready for review.The changes have been merged upstream by now.
The import is entirely done via the
copy_from_upstream.py
script. I have integrated the required META files upstream.There are two small changes to the liboqs code base:
pqov_
namespace (377232e)update_docs_from_yaml.py
(3fafba1)Resolves #2028.
This PR was prepared jointly with @potsrevennil.