Topic: How to use wolfCrypt (RSA, ECDSA) in Vitis 2020.2
I would like to use the wolfCrypt library in a project.
First of all: I am a beginner which means I don't have much experience with the integration of external libraries or the usage of wolfCrypt.
I want to perform benchmark tests for an embedded device. It is the SoC Xilinx Zynq-7000 and I would like to test RSA and ECDSA with different key lengths.
Software used:
- Vivado 2020.2 (.xsa file only PS portion (Zynq) no PL).
- Vitis 2020.2
My problem is that I am a bit overwhelmed by the mass of files. I have tried to run an executable test on the Zynq-7000 with the help of the Introductionhttps://github.com/wolfSSL/wolfssl/blob … README.md.
Unfortunately, it always comes to Erros that the imported files are not found. I know that it probably has to do with the folder structure that the file is not found, but I can't see the forest for the trees...
Attempt 1: Change the name of the directory (wolfssl-4.x.x to wolfssl), change the import source to vitis with create-top-level folder wolfssl. However, again the file is missing.
Attempt 2: Inserting the wolfssl folder into the structure returns again the error that no file was found. However, I can navigate to the file (ctrl+click).
I would also have the following general questions:
- If I want to include/use the library and run it on an embedded device do I have to build the library on my host/developer machine (./configure, make install etc) or did I understand that correctly and that is done by Vitis? So it is cross-compiled that my arm-cortex9 processor understands the program code right?
- do I need an OS to run the test or does it also work with a bare-metal (c)-application?
i have cygwin installed on my host windows machine and have also tried to run wolfssl. But also here errors are thrown:
Do you have a tip for me as a start how I can implement or use only the two algorithms?
I have attached a few screenshots and the last error.log
I am a bit frustrated because I want to test only the two algorithms. But I thought that the tutorial (for me) is an easy start. that does not seem to be the case :-D. It would be great if you could possibly help me a little. I hope it is not too confusing and you can read out what the problem is.
Many greetings
Tom
P.S. :frustrated about my own inability not about wolfSSL
-- EDIT --
do i understand correctly that the makefile does the automatic install of the library? I.e. depending on the OS (e.g. for linux gcc is used and win mingw32-gcc) the libararys (configured by ./configure --enable...) are installed to the right places (in the OS).
But I actually want to run my c program on the zynq, which uses the library.
Or am I totally on the wrong track and I have to install the library on the windowes computer so that Vitis can find the data at all? But in Vitis I give the compiler (arm-none-eabi-gcc) the folder in which the header files are located.
Now I have the question if I can write a standalone application with the integrated library at all?
--EDIT 2 --
i have a vm set up with ubunutu. ./configure and sudo make install work and the headers of the library can be found under /usr/local/include. Unfortunately vitis throws me this error:
selected processor does not support `vswp.8 d20,d21' in ARM mode
selected processor does not support `vswp.8 d0,d1' in ARM mode
selected processor does not support `vswp.8 d0,d1' in ARM mode
selected processor does not support `vshr.u64 q8,q8,#63' in ARM mode
selected processor does not support `vshr.u64 q7,q7,#63' in ARM mode
selected processor does not support `vshl.u64 q6,q6,#1' in ARM mode
selected processor does not support `vshl.u64 q5,q5,#1' in ARM mode
selected processor does not support `vshl.u64 d16,d16,#32' in ARM mode
selected processor does not support `vrev64.8 q10,q10' in ARM mode
selected processor does not support `vrev64.8 q0,q0' in ARM mode
selected processor does not support `vrev64.8 q0,q0' in ARM mode
selected processor does not support `vmull.p64 q9,d11,d16' in ARM mode
selected processor does not support `vmull.p64 q9,d10,d16' in ARM mode
selected processor does not support `vmull.p64 q7,d15,d14' in ARM mode
selected processor does not support `vmull.p64 q6,d1,d3' in ARM mode
selected processor does not support `vmull.p64 q5,d0,d2' in ARM mode
selected processor does not support `veor.32 q0,q0,q1' in ARM mode
selected processor does not support `veor q7,q6' in ARM mode
selected processor does not support `veor q7,q5' in ARM mode
selected processor does not support `veor q6,q9' in ARM mode
selected processor does not support `veor q10,q5,q6' in ARM mode
selected processor does not support `veor d15,d2,d3' in ARM mode
selected processor does not support `veor d14,d0,d1' in ARM mode
selected processor does not support `veor d13,d14' in ARM mode
selected processor does not support `veor d12,d19' in ARM mode
selected processor does not support `veor d12,d17' in ARM mode
selected processor does not support `veor d12,d15' in ARM mode
selected processor does not support `veor d11,d18' in ARM mode
selected processor does not support `veor d11,d16' in ARM mode
selected processor does not support `veor d11,d14' in ARM mode
selected processor does not support `vdup.32 q1,r3' in ARM mode
selected processor does not support `vdup.32 q1,r3' in ARM mode
selected processor does not support `vdup.32 q1,r3' in ARM mode
selected processor does not support `vdup.32 q1,r3' in ARM mode
selected processor does not support `aesmc.8 q0,q0' in ARM mode
selected processor does not support `aesmc.8 q0,q0' in ARM mode
selected processor does not support `aesmc.8 q0,q0' in ARM mode
selected processor does not support `aesmc.8 q0,q0' in ARM mode
selected processor does not support `aesmc.8 q0,q0' in ARM mode
selected processor does not support `aesmc.8 q0,q0' in ARM mode
selected processor does not support `aesmc.8 q0,q0' in ARM mode
selected processor does not support `aesmc.8 q0,q0' in ARM mode
selected processor does not support `aesmc.8 q0,q0' in ARM mode
selected processor does not support `aesmc.8 q0,q0' in ARM mode
selected processor does not support `aesmc.8 q0,q0' in ARM mode
selected processor does not support `aesmc.8 q0,q0' in ARM mode
selected processor does not support `aesmc.8 q0,q0' in ARM mode
selected processor does not support `aesimc.8 q0,q0' in ARM mode
selected processor does not support `aese.8 q0,q4' in ARM mode
selected processor does not support `aese.8 q0,q4' in ARM mode
selected processor does not support `aese.8 q0,q3' in ARM mode
selected processor does not support `aese.8 q0,q3' in ARM mode
selected processor does not support `aese.8 q0,q2' in ARM mode
selected processor does not support `aese.8 q0,q2' in ARM mode
selected processor does not support `aese.8 q0,q2' in ARM mode
selected processor does not support `aese.8 q0,q2' in ARM mode
selected processor does not support `aese.8 q0,q2' in ARM mode
selected processor does not support `aese.8 q0,q1' in ARM mode
selected processor does not support `aese.8 q0,q1' in ARM mode
selected processor does not support `aese.8 q0,q1' in ARM mode
selected processor does not support `aese.8 q0,q1' in ARM mode
selected processor does not support `aese.8 q0,q1' in ARM mode
selected processor does not support `aese.8 q0,q1' in ARM mode
selected processor does not support `aese.8 q0,q1' in ARM mode
selected processor does not support `aese.8 q0,q1' in ARM mode
selected processor does not support `aese.8 q0,q1' in ARM mode
selected FPU does not support instruction -- `vmov.i32 q0,#0'
selected FPU does not support instruction -- `vmov.i32 q0,#0'
selected FPU does not support instruction -- `vmov.i32 q0,#0'
selected FPU does not support instruction -- `vmov.i32 q0,#0'
selected FPU does not support instruction -- `vmov.i32 d16,0xc2000000'
selected FPU does not support instruction -- `vmov q8,q5'
selected FPU does not support instruction -- `vmov q7,q6'
make[1]: *** [src/wolfcrypt/src/port/arm/subdir.mk:90: src/wolfcrypt/src/port/arm/armv8-aes.o] Fehler 1
make: *** [makefile:52: all] Fehler 2
make: *** [makefile:42: package] Fehler 1