RISC-V support
Hello,
I am porting various packages to riscv64 platform. I saw comments on compilation in CMakeLists.txt:
Compilation on an unsupported processor should only be used for testing, as it may result an insecure configuration, for example due to variable-time instructions leaking secret information.
Is there anything we need to do, like auditing RISC-V processors, in order to have them supported?
Hello -- thanks very much for your interest to help move this project forward!
Is there anything we need to do, like auditing RISC-V processors, in order to have them supported?
The best would be an addition of such processors to a CI environment in which this support could be "proven" (by successfully running the (self)tests). We're open to any suggestions as to which such CI system to use for this.
@hack3ric May I ask about your success getting liboqs to run OK on RISC-V? If so, we could add a statement to the warning you quote above that RISC-V "has been tested at vx.x.x" (you tell us which version) -- but as long as such machines are not part of CI, I'd think it'd not be correct to call the platform "supported".
if no one is working on this id like to take it on
if no one is working on this id like to take it on
That would be great, please give it a go!
@baentsch @dstebila quick update on getting liboqs running on RISC-V. Was able to build and pass all tests in a RISC-V QEMU environment using the following commands:
cmake -DOQS_PERMIT_UNSUPPORTED_ARCHITECTURE=ON -DOQS_USE_OPENSSL=OFF -GNinja ..
ninja
ninja run_tests
The environment details:
isa : rv64imafdc_zicntr_zicsr_zifencei_zihpm
mmu : sv48
Distributor ID: Ubuntu
Description: Ubuntu 23.10
Release: 23.10
Codename: mantic
Was able to build and pass all tests in a RISC-V QEMU environment
Very nice! What's the runtime (edit: Meinung performance under emulation)? Amenable to adding to CI? Do you want to open a PR for that?
Very nice! What's the runtime (edit: Meinung performance under emulation)? Amenable to adding to CI?
Currently, tests is taking wayyy too long (over 30 minutes) and several tests are being skipped which I want to look into further. Going to tweak environment parameters to see if I get get runtime much faster.
Very nice! What's the runtime (edit: Meinung performance under emulation)? Amenable to adding to CI?
Currently, tests is taking wayyy too long (over 30 minutes) and several tests are being skipped which I want to look into further. Going to tweak environment parameters to see if I get get runtime much faster.
@baentsch @dstebila quick update on getting liboqs running on RISC-V. Was able to build and pass all tests in a RISC-V QEMU environment using the following commands:
cmake -DOQS_PERMIT_UNSUPPORTED_ARCHITECTURE=ON -DOQS_USE_OPENSSL=OFF -GNinja .. ninja ninja run_testsThe environment details:
isa : rv64imafdc_zicntr_zicsr_zifencei_zihpm mmu : sv48 Distributor ID: Ubuntu Description: Ubuntu 23.10 Release: 23.10 Codename: mantic
Hi! I'd like to ask you some questions since i'm working on integrating a pqc signature into Keystone on RISC-V QEMU.
Hi! I'd like to ask you some questions since i'm working on integrating a pqc signature into Keystone on RISC-V QEMU.
Sure! Feel free to email me at [email protected]
Quick update on this issue. Tried to run liboqs in the same QEMU RISC-V but on a much more powerful EC2 instance as the host machine. Tests still take almost 40 minutes. I just ordered the SparkFun RED-V RedBoard - SiFive RISC-V FE310 SoC and will try and implement on actual hardware to get a more accurate understanding of the runtime. It will be interesting to compare to the liboqs TLS implementation expolored in this paper: Energy Consumption Evaluation of Post-Quantum TLS 1.3 for Resource-Constrained Embedded Devices