2024-04-14 09:18:33 +00:00
|
|
|
Tento priecinok obsahuje subor oqsprovider.dll, ktory umoznuje vyuzivat PQ
|
|
|
|
algoritmy v TLS komunikacii. Tento .dll subor bol vytvoreny specialne
|
|
|
|
pre obraz Win 7 x86 za ucelom demonstracie post-kvantovych algoritmov
|
|
|
|
v ramci predmetu BPS a BIKS. V pripade pouzitia zdrojovych kodov
|
|
|
|
klient/server na inom zariadeni je nutne vytvorit novy .dll subor.
|
|
|
|
|
|
|
|
Vytvorene a testovane na:
|
|
|
|
OpenSSL 3.3.0, liboqs 0.10.0, oqs-provider 0.6.0
|
|
|
|
|
|
|
|
NAVOD NA POUZITIE
|
|
|
|
- predpokladame ze system obsahuje kniznice libcrypto a libssl
|
|
|
|
- na generovanie PQ certifikatov je potrebne mat OpenSSL.exe
|
|
|
|
|
|
|
|
Subor oqsprovider.dll presunieme na nas virtualny pocitac na lubovolne miesto.
|
|
|
|
Napr. ho skopirujeme priamo na plochu, teda do C:\Users\Administrator\Desktop
|
|
|
|
|
|
|
|
Cestu k suboru potom definujeme ako systemovu premennu OPENSSL_MODULES.
|
|
|
|
|
|
|
|
Systemovu premennu mozeme definovat:
|
|
|
|
a) PowerShell prikaz
|
|
|
|
[Environment]::SetEnvironmentVariable("OPENSSL_MODULES", "C:\Users\Administrator\Desktop\", "Machine")
|
|
|
|
|
|
|
|
b) cmd prikaz
|
|
|
|
setx OPENSSL_MODULES "C:\Users\Administrator\Desktop\"
|
|
|
|
|
|
|
|
c) manualne cez nastavenia
|
|
|
|
Settings-System-Advanced system settings-Environment Variables-System variables-New
|
|
|
|
Name: OPENSSL_MODULES
|
|
|
|
Value: C:\Users\Administrator\Desktop\
|
|
|
|
|
|
|
|
Po nastaveni premennej restartujeme cmd/PowerShell.
|
|
|
|
|
|
|
|
GENEROVANIE PQ CERTIFIKATOV
|
|
|
|
Generovanie PQ certifikatov prostrednictvom OpenSSL je mozne po aktivacii
|
|
|
|
oqsprovidera priamo cez konfiguracny subor. V tomto subore je potrebne
|
|
|
|
aktivovat default providera a doplnit aktivaciu modulu oqsprovider.
|
|
|
|
|
|
|
|
[provider_sect]
|
|
|
|
default = default_sect
|
|
|
|
oqsprovider = oqsprovider_sect
|
|
|
|
[oqsprovider_sect]
|
|
|
|
activate = 1
|
|
|
|
|
|
|
|
Subor openssl.cnf v tomto priecinku je prikladom konfiguracneho suboru
|
|
|
|
s uz aktivovanym oqsproviderom.
|
|
|
|
|
|
|
|
Aby OpenSSL pouzivalo nas konfiguracny subor, je nutne nastavit systemovu
|
|
|
|
premennu OPENSSL_CONF na priecinok, kde sa tento subor nachadza. V BPS obraze
|
|
|
|
je tato premenna nastavena na C:\OPENSSL\BIN\
|
|
|
|
Systemovu premennu mozeme zmenit alebo skopirovat nas konfiguracny subor
|
|
|
|
na dane miesto.
|
2024-05-07 08:46:35 +00:00
|
|
|
|
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
Ak potrebujeme vygenerovat nove verzie kniznic liboqs a oqs-provider:
|
|
|
|
|
|
|
|
NAVOD NA KOMPILACIU
|
|
|
|
Predpokladame, ze BPS obraz obsahuje vsetky potrebne nastroje (WinLibs) a OpenSSL
|
|
|
|
|
|
|
|
1. liboqs
|
|
|
|
https://github.com/open-quantum-safe/liboqs
|
|
|
|
https://github.com/open-quantum-safe/liboqs/releases - ak potrebujeme konkretnu verziu
|
|
|
|
- stiahnuty subor rozbalime na nami zvolene miesto, napr. C:\liboqs\
|
|
|
|
- kniznicu nainstalujeme prikazmi:
|
|
|
|
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake -GNinja ..
|
|
|
|
ninja
|
|
|
|
ninja install
|
|
|
|
|
|
|
|
- po dokonceni instalacie vznikli zlozky /include/ a /lib/, ktore
|
|
|
|
skopirujeme do hlavnej zlozky nasho prekladaca, napr. C:\MINGW\
|
|
|
|
|
|
|
|
2. oqs-provider
|
|
|
|
https://github.com/open-quantum-safe/oqs-provider/tree/main
|
|
|
|
https://github.com/open-quantum-safe/oqs-provider/releases - ak potrebujeme konkretnu verziu
|
|
|
|
- stiahnuty balik rozbalime na nami zvolene miesto, napr. C:\oqsprovider\
|
|
|
|
- v subore CMakeLists.txt pridame na riadok 90 a 91 pred funkcie
|
|
|
|
enable_testing() a add_subdirectory(test) symbol #, ktorym zakomentujeme
|
|
|
|
a nezrealizujeme kompilaciu testov
|
|
|
|
- kniznicu nainstalujeme tymito prikazmi:
|
|
|
|
|
|
|
|
|
|
|
|
cmake -GNinja -DOPENSSL_ROOT_DIR=C:\OPENSSL -S . -B _build
|
|
|
|
cd _build
|
|
|
|
ninja
|
|
|
|
ninja install
|