CryptoSys PKI Linux Version =========================== Introduction ------------ This is a trial version for CryptoSys PKI compiled to run on a 64-bit (x86-64) Linux platform. This provides exactly the same ANSI C, C++ and Python interfaces as the Windows version https://www.cryptosys.net/pki/. The Linux interface is provided as a shared dynamic library (.so). This must be installed on your system using administrator privileges - see the instruction below. Technical details ----------------- The core interface is a shared dynamic library: libcryptosyspki.so.23.0.1. This is an ELF 64-bit executable: file libcryptosyspki.so.23.0.1 libcryptosyspki.so.23.0.1: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=xxxx, not stripped Installing ---------- This shared library needs to be installed on your system using administrator privileges. The shell file `setuppkiso.sh` should install the library in /usr/lib. setuppkiso.sh: # Must be run as su cp libcryptosyspki.so.23.0.1 /usr/lib ln -sf /usr/lib/libcryptosyspki.so.23.0.1 /usr/lib/libcryptosyspki.so.23 ln -sf /usr/lib/libcryptosyspki.so.23 /usr/lib/libcryptosyspki.so # Link for dotnet core to match Windows DLL ln -sf /usr/lib/libcryptosyspki.so.23 /usr/lib/diCrPKI.dll.so To install: chmod +x setuppkiso.sh sudo ./setuppkiso.sh Test Programs ------------- There are two test C programs included, pki_check.c and TestPKI.c. The former is a simple test - if this does not work, you have not installed the library correctly, or it does not work on your system. The latter is the same set of detailed tests supplied with the Windows version. General Compilation gcc MYPROG.c -o MYPROG -lcryptosyspki Example 1: gcc -g -Wall pki_check.c -lcryptosyspki -o pki_check_so ./pki_check_so This should display output like: Version=230001 LicenceType=t Module=diCrPKI.c Compiled=Dec 15 2024 20:25:50 Info=Linux Trial Edition - EXPIRES 2025-03-31. (or similar, depending on the version you have). Example 2: gcc -g TestPKI.c -lcryptosyspki -o test_pki_so ./test_pki_so This should display a long set of tests ending with "ALL DONE". No test files are required to be present. It will create a new temporary test directory and offer to delete this on completion. ALL DONE. The directory 'pkitest.f478ffc7' has been created by this test program. Do you want to remove this directory? [Y]/N: y Example using cplusplus: g++ -std=c++11 dipki-cpp-min.cpp dipki.cpp -lcryptosyspki -o dipki-min-so ./dipki-min-so Version=230000 Using with Python ----------------- The file `cryptosyspki.py` provides an interface to Python 3. You can use the included python module directly or install the latest version from PyPi pip3 install cryptosyspki to upgrade an existing installation: pip3 install --upgrade cryptosyspki ``` >>> from cryptosyspki import * >>> Gen.version() 230000 >>> Hash.hex_from_data(b'abc') 'a9993e364706816aba3e25717850c26c9cd0d89d' ``` Documentation ------------- See the manual available at Detailed information for C/C++ programmers is given in the supplementary diCrPKI.h File Reference Remember to allocate one extra character for the trailing null in output strings. C++ (STL) interface: Python documentation License ------- See the file LICENSE.txt included in the distribution. ------------------------------------------------------------------------ David Ireland DI Management Services Pty Ltd t/a CryptoSys https://www.di-mgt.com.au https://www.cryptosys.net This document last updated 2024-12-15.