A minimal openSSL engine for offloading rsa functions to a hardware accelerator in FPGA logic
- You are running linux on the Xilinx ZYNQ-7000 development board, with the necessary design instantiated in PL [link to final design goes here]
- Ensure you have openSSL using the command
$ openssl version
. If you have lower than version 1.0.2, you must upgrade to this version. - Check out the repository using git
$ git clone https://github.com/bigbrett/wsrsaengine.git
$ cd wsrsaengine
$ make
You can verify that the engine can be loaded using:
$ openssl engine -t -c `pwd`/bin/libwsrsaengine.so
(/home/brett/wsrsaengine/bin/libwsrsaengine.so) A test engine for the ws rsa hardware encryption module, on the Xilinx ZYNQ7000
Loaded: (wsrsaengine) A test engine for the ws rsa hardware encryption module, on the Xilinx ZYNQ7000
[ available ]
A quick and easy test goes like this, where the output of the decryption should match the input:
TODO
A more advanced test, using a c test program, can be conducted like this (see test/wsrsaengine_test.c for implementation):
$ make test
$ source test/runtest.sh
NOTE: the runtest.sh script must remain in the test directory, but should be able to be called from anywhere
The speed of the engine's encryption/decryption can be tested using the built-in openSSL speed command
$ openssl speed rsa1024 -engine /path/to/libwsrsaengine.so