-
Notifications
You must be signed in to change notification settings - Fork 0
Building and Testing RNP with PQC support
Falko Strenzke edited this page Jan 29, 2024
·
10 revisions
-
sudo apt-get install cmake cmake-curses-gui libjson-c-dev
(for Debian based distributions)- Depending on your system configuration, it might also be necessary to install the package
asciidoctor
.
- Depending on your system configuration, it might also be necessary to install the package
git clone https://github.com/randombit/botan.git
cd botan
git checkout 3.2.0
./configure.py
-
make -j10
(provide number of cores on your machine) cd ..
- get the code – variant 1: draw code from github
git clone git@github.com:TJ-91/rnp.git
cd rnp
git checkout pqc-ui
git submodule update --init --recursive
- get the code – variant 2: use provided zip file
-
unzip <filename of the provided zip archive>
(when you read this manual, you most likely have already done this step) cd rnp
-
- Then continue with building the library
-
cmake -S . -B build/ -DBOTAN_INCLUDE_DIR=/INSERT-PATH/botan/build/include -DBOTAN_LIBRARY=/INSERT-PATH/botan/libbotan-3.so
(set the absolute path to where Botan is checked out) cd build
-
ccmake .
- In the dialogue set both of these features to the value
On
ENABLE_CRYPTO_REFRESH
ENABLE_PQC
- Then type
c
(for configure) andg
(for generate) (should complete without errors)
- In the dialogue set both of these features to the value
-
make -j10
(provide number of cores on your machine)
-
- stay in the
build
directory - Run unit tests
-
ctest -j4
(use desired number of parallel jobs)
-
- Generate and use keys
- create a new empty directory
/path/to/rnp_home_dir
for testing purposes -
./src/rnpkeys/rnpkeys -g --expert --homedir /path/to/rnp_home_dir
- choose the desired key type, e.g., 30
-
./src/rnpkeys/rnpkeys --list-keys --homedir /path/to/rnp_home_dir
- note the uid, keyid, or fingerprint of the key
- encrypt and sign a file, then decrypt (with signature verification):
-
./src/rnp/rnp --encrypt -r <uid/keyid/fingerprint> --sign --armor --homedir /path/to/rnp_home_dir Makefile
- optionally, a specific signing key can be chosen by writing
-u <uid/keyid/fingerprint>
after--sign
.
- optionally, a specific signing key can be chosen by writing
-
./src/rnp/rnp --decrypt --homedir /path/to/rnp_home_dir Makefile.asc
- provide a different filename for the decryption output and afterwards compare the files
-
- create a new empty directory
The test cli_tests-Misc
may fail since it apparently checks the system Botan version instead of the one linked to RNP, as suggested be the following test output:
267: /usr/bin/botan version
267:
267: 2.17.3
267: FAIL
The responsible test code resides in the file rnp/src/tests/cli_tests.py
.