diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/ECC/certificate-authority-options.conf b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/ECC/certificate-authority-options.conf new file mode 100644 index 0000000..d6c92aa --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/ECC/certificate-authority-options.conf @@ -0,0 +1,27 @@ +# JS 2024-02-08 +# - doplnenie rozsirujucich parametrov pre CA certifikaty podla standardu +# x509v3, ktory sa v OpenSSL 3.2 vyuzíva by default +# - parameter 'basicConstraints = CA:true' musi byt definovany! +# +# Viac informacii: +# https://www.openssl.org/docs/manmaster/man5/x509v3_config.html + +[req] +prompt = no +distinguished_name = req_distinguished_name +x509_extensions = v3_ca + +[req_distinguished_name] +C = US +ST = Fake State +L = Fake Locality +O = Fake Company +# OU = Org Unit Name +# emailAddress = info@example.com +CN = local.dev + +[ v3_ca ] +basicConstraints = critical, CA:true +#subjectKeyIdentifier = hash +#authorityKeyIdentifier = keyid:always,issuer +#keyUsage = critical, digitalSignature, cRLSign, keyCertSign diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/ECC/client.ext b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/ECC/client.ext new file mode 100644 index 0000000..4151843 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/ECC/client.ext @@ -0,0 +1,8 @@ +authorityKeyIdentifier=keyid,issuer +basicConstraints=CA:FALSE +keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment +subjectAltName = @alt_names + +[alt_names] +DNS.1 = dev.mergebot.com +DNS.2 = dev.mergebot.com.192.168.1.19.xip.io diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/ECC/gen_cert_ECC.bat b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/ECC/gen_cert_ECC.bat new file mode 100644 index 0000000..ee62d5a --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/ECC/gen_cert_ECC.bat @@ -0,0 +1,30 @@ +:: Meno: Martin Janitor +:: Datum: 26.2.2023 +:: Verzia: 1.0 +:: Uprava: Modifikacia suboru postup pre uspesne +:: generovanie ECC certifikatov s vyuzitim +:: predpripravenych konfiguracnych suborov + + +rem Priklad postupu na vytvorenie ECC certifikatov +::---------------------------------------------- + +::1. Generovanie certifikatu autority +:: 1.1 Vygenerovanie sukromneho kluca autority pomocou krivky prime256v1 + openssl ecparam -genkey -name prime256v1 -out myCA.key +:: 1.2 Vygenerovanie certifikatu autority s dobou platnosti 1 rok + openssl req -x509 -config certificate-authority-options.conf -new -nodes -key myCA.key -sha256 -days 365 -out myCA.pem +::2. Generovanie certifikatu servera +:: 2.1 Vygenerovanie sukromneho kluca servera pomocou krivky prime256v1 + openssl ecparam -genkey -name prime256v1 -out server.key +:: 2.2 Vytvorenie ziadosti servera o podpis certifikatu autoritou + openssl req -config options.conf -new -key server.key -out server_ziadost.csr +:: 2.3 Vygenerovanie podpisaneho certifikatu autoritou s dobou platnosti 1 rok + openssl x509 -req -in server_ziadost.csr -CA myCA.pem -CAkey myCA.key -CAcreateserial -out server.pem -days 365 -sha256 -extfile server.ext +::3. Generovanie certifikatu klienta +:: 3.1 Vygenerovanie sukromneho kluca klienta pomocou krivky prime256v1 + openssl ecparam -genkey -name prime256v1 -out client.key +:: 3.2 Vytvorenie ziadosti klienta o podpis certifikatu autoritou + openssl req -config options.conf -new -key client.key -out klient_ziadost.csr +:: 3.3 Vygenerovanie podpisaneho certifikatu autoritou s dobou platnosti 1 rok + openssl x509 -req -in klient_ziadost.csr -CA myCA.pem -CAkey myCA.key -CAcreateserial -out client.pem -days 365 -sha256 -extfile client.ext \ No newline at end of file diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/ECC/options.conf b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/ECC/options.conf new file mode 100644 index 0000000..e05a7d5 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/ECC/options.conf @@ -0,0 +1,12 @@ +[req] +prompt = no +distinguished_name = req_distinguished_name + +[req_distinguished_name] +C = US +ST = Fake State +L = Fake Locality +O = Fake Company +# OU = Org Unit Name +# emailAddress = info@example.com +CN = local.dev diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/ECC/server.ext b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/ECC/server.ext new file mode 100644 index 0000000..4151843 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/ECC/server.ext @@ -0,0 +1,8 @@ +authorityKeyIdentifier=keyid,issuer +basicConstraints=CA:FALSE +keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment +subjectAltName = @alt_names + +[alt_names] +DNS.1 = dev.mergebot.com +DNS.2 = dev.mergebot.com.192.168.1.19.xip.io diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/PQ/README.txt b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/PQ/README.txt new file mode 100644 index 0000000..ede8be9 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/PQ/README.txt @@ -0,0 +1,27 @@ +Tento priecinok obsahuje konfiguracne subory spolu so skriptom, ktory umoznuje +generovanie PQ algoritmov. + +Na generovanie PQ algoritmov je nutne aktivovat oqsprovidera. Navod na aktivaciu +sa nachadza v zlozke /oqsprovider/ + +Dostupne PQ algoritmy (20.02.2024) +- zalezi tiez na nastaveniach kniznic liboqs a oqs-provider viď https://github.com/open-quantum-safe/oqs-provider/blob/main/ALGORITHMS.md +dilithium2 +dilithium3 +dilithium5 +falcon512 +falcon1024 +sphincssha2128fsimple +sphincssha2128ssimple +sphincssha2192fsimple +sphincssha2192ssimple +sphincssha2256fsimple +sphincssha2256ssimple +sphincsshake128fsimple + +Nepodporovane algoritmy pri defaultnom nastaveni kniznice +sphincsshake128ssimple +sphincsshake192fsimple +sphincsshake192ssimple +sphincsshake256fsimple +sphincsshake256ssimple \ No newline at end of file diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/PQ/certificate-authority-options.conf b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/PQ/certificate-authority-options.conf new file mode 100644 index 0000000..63204fe --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/PQ/certificate-authority-options.conf @@ -0,0 +1,27 @@ +# JS 2024-02-08 +# - doplnenie rozsirujucich parametrov pre CA certifikaty podla standardu +# x509v3, ktory sa v OpenSSL 3.2 vyuzíva by default +# - parameter 'basicConstraints = CA:true' musi byt definovany! +# +# Viac informacii: +# https://www.openssl.org/docs/manmaster/man5/x509v3_config.html + +[req] +prompt = no +distinguished_name = req_distinguished_name +x509_extensions = v3_ca + +[req_distinguished_name] +C = US +ST = Fake State +L = Fake Locality +O = Fake Company +# OU = Org Unit Name +# emailAddress = info@example.com +CN = local.dev + +[ v3_ca ] +basicConstraints = critical, CA:true +#subjectKeyIdentifier = hash +#authorityKeyIdentifier = keyid:always,issuer +#keyUsage = critical, digitalSignature, cRLSign, keyCertSign \ No newline at end of file diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/PQ/client.ext b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/PQ/client.ext new file mode 100644 index 0000000..4151843 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/PQ/client.ext @@ -0,0 +1,8 @@ +authorityKeyIdentifier=keyid,issuer +basicConstraints=CA:FALSE +keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment +subjectAltName = @alt_names + +[alt_names] +DNS.1 = dev.mergebot.com +DNS.2 = dev.mergebot.com.192.168.1.19.xip.io diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/PQ/gen_PQ_cert.bat b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/PQ/gen_PQ_cert.bat new file mode 100644 index 0000000..93aad16 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/PQ/gen_PQ_cert.bat @@ -0,0 +1,30 @@ +:: JS 2024-02-19 +:: Skript na generovanie PQ certifikatov +:: Dostupne PQ algoritmy, ktore je mozne doplnat za prepinac -algorithm, sa nachadzaju v README + +rem myCA +rem ..... +openssl genpkey -algorithm dilithium5 -out myCA.key +openssl req -x509 -config certificate-authority-options.conf -new -nodes -key myCA.key -sha256 -days 1825 -out myCA.pem + +rem server +rem ...... +openssl genpkey -algorithm dilithium5 -out client.key +openssl req -config options.conf -new -key client.key -out client.csr +openssl x509 -req -in client.csr -CA myCA.pem -CAkey myCA.key -CAcreateserial -out client.pem -days 1825 + +rem client +rem ....... +openssl genpkey -algorithm dilithium5 -out server.key +openssl req -config options.conf -new -key server.key -out server.csr +openssl x509 -req -in server.csr -CA myCA.pem -CAkey myCA.key -CAcreateserial -out server.pem -days 1825 + +openssl verify -CAfile ./myCA.pem ./client.pem +openssl verify -CAfile ./myCA.pem ./server.pem + +del *.csr + + + + + diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/PQ/options.conf b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/PQ/options.conf new file mode 100644 index 0000000..e05a7d5 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/PQ/options.conf @@ -0,0 +1,12 @@ +[req] +prompt = no +distinguished_name = req_distinguished_name + +[req_distinguished_name] +C = US +ST = Fake State +L = Fake Locality +O = Fake Company +# OU = Org Unit Name +# emailAddress = info@example.com +CN = local.dev diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/PQ/server.ext b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/PQ/server.ext new file mode 100644 index 0000000..4151843 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/PQ/server.ext @@ -0,0 +1,8 @@ +authorityKeyIdentifier=keyid,issuer +basicConstraints=CA:FALSE +keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment +subjectAltName = @alt_names + +[alt_names] +DNS.1 = dev.mergebot.com +DNS.2 = dev.mergebot.com.192.168.1.19.xip.io diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/RSA/certificate-authority-options.conf b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/RSA/certificate-authority-options.conf new file mode 100644 index 0000000..63204fe --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/RSA/certificate-authority-options.conf @@ -0,0 +1,27 @@ +# JS 2024-02-08 +# - doplnenie rozsirujucich parametrov pre CA certifikaty podla standardu +# x509v3, ktory sa v OpenSSL 3.2 vyuzíva by default +# - parameter 'basicConstraints = CA:true' musi byt definovany! +# +# Viac informacii: +# https://www.openssl.org/docs/manmaster/man5/x509v3_config.html + +[req] +prompt = no +distinguished_name = req_distinguished_name +x509_extensions = v3_ca + +[req_distinguished_name] +C = US +ST = Fake State +L = Fake Locality +O = Fake Company +# OU = Org Unit Name +# emailAddress = info@example.com +CN = local.dev + +[ v3_ca ] +basicConstraints = critical, CA:true +#subjectKeyIdentifier = hash +#authorityKeyIdentifier = keyid:always,issuer +#keyUsage = critical, digitalSignature, cRLSign, keyCertSign \ No newline at end of file diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/RSA/client.ext b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/RSA/client.ext new file mode 100644 index 0000000..4151843 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/RSA/client.ext @@ -0,0 +1,8 @@ +authorityKeyIdentifier=keyid,issuer +basicConstraints=CA:FALSE +keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment +subjectAltName = @alt_names + +[alt_names] +DNS.1 = dev.mergebot.com +DNS.2 = dev.mergebot.com.192.168.1.19.xip.io diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/RSA/gen_cert_RSA.bat b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/RSA/gen_cert_RSA.bat new file mode 100644 index 0000000..32117b2 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/RSA/gen_cert_RSA.bat @@ -0,0 +1,24 @@ +:: JS 2024-02-08 +:: Zmena velkosti klucov z 1024 ma 2048 podla novych standardov OpenSSL 3.2 +:: OpenSSL 3.2: The default SSL/TLS security level has been changed from 1 to 2 +:: https://www.openssl.org/docs/man3.1/man3/SSL_CTX_set_security_level.html + + +rem myCA +rem ..... +openssl genrsa -out myCA.key 2048 +openssl req -x509 -config certificate-authority-options.conf -new -nodes -key myCA.key -sha256 -days 1825 -out myCA.pem + +rem server +rem ...... +openssl genrsa -out server.key 2048 +openssl req -config options.conf -new -key server.key -out server.csr +openssl x509 -req -in server.csr -CA myCA.pem -CAkey myCA.key -CAcreateserial -out server.pem -days 1825 -sha256 -extfile server.ext + +rem client +rem ....... +openssl genrsa -out client.key 2048 +openssl req -config options.conf -new -key client.key -out client.csr +openssl x509 -req -in client.csr -CA myCA.pem -CAkey myCA.key -CAcreateserial -out client.pem -days 1825 -sha256 -extfile client.ext + +del *.csr \ No newline at end of file diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/RSA/options.conf b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/RSA/options.conf new file mode 100644 index 0000000..e05a7d5 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/RSA/options.conf @@ -0,0 +1,12 @@ +[req] +prompt = no +distinguished_name = req_distinguished_name + +[req_distinguished_name] +C = US +ST = Fake State +L = Fake Locality +O = Fake Company +# OU = Org Unit Name +# emailAddress = info@example.com +CN = local.dev diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/RSA/server.ext b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/RSA/server.ext new file mode 100644 index 0000000..4151843 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CERIFICATEs/RSA/server.ext @@ -0,0 +1,8 @@ +authorityKeyIdentifier=keyid,issuer +basicConstraints=CA:FALSE +keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment +subjectAltName = @alt_names + +[alt_names] +DNS.1 = dev.mergebot.com +DNS.2 = dev.mergebot.com.192.168.1.19.xip.io diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/CLIENT/client.c b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/CLIENT/client.c new file mode 100644 index 0000000..cb5f658 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/CLIENT/client.c @@ -0,0 +1,385 @@ +/* + JS 2024-04-11 testovane s OpenSSL 3.3.0, liboqs 0.10.0 a oqs-provider 0.6.0 +*/ +/* + JS 2024-04-11 testovane s OpenSSL 3.3.0, liboqs 0.10.0 a oqs-provider 0.5.3 +*/ +/* + JS 2024-03-04 - doplnenie funkcii pre uvolnenie nacitanych providerov +*/ + +/* + JS 2024-02-24 - funkcia initSSLContext() rozsirena o nacitanie OQS-providera + pre plne funkcne PQ algoritmy na kazdej platforme + - doplnene priklady nastavenia premennej DEFAULT_GROUPS + - testovane s oqsprovider 0.5.3 +*/ +/* + JS 2024-02-18 - testovanie PQ algoritmov s pouzitim oqs-providera + - uprava vypisu o pripojeni klienta + - pridane vypisy s informaciami o pouzivanych algoritmoch + pre KEX a certifikaty + - oprava kontroly navratovej hodnoty funkcii + SSL_CTX_use_certificate_file() a SSL_CTX_use_PrivateKey_file +*/ + +/* + JS 2024-02-08 testovane s aktualnou najnovsou verziou OpenSSL 3.2.1 +*/ + +/* + MJ 2023-05-18 - Uprava funkcie printHeader() + -> Zmazanie SSL metody + -> Upraveny vypis ako spustit program + - Uprava funkcie initSSLContext() aby realizovala fixne iba TLS spojenie + -> pridanie argumentov do funkcie na nacitanie client.key, client.pem + - Uprava hlavnej funkcie main() na zaklade predoslej upravy (nastavenie fixne TLS) + -> Zmazanie premennej ctxMethod + -> Uprava argumentov [argv] - zmazanie TLS metody, pridanie suborov s klucmi + -> Pridanie premennych na nacitanie klucov: client_key, client_pem + (vid. komentare MJ) +*/ + +/* + MD 2021-03-29 testovane s aktualne najnovsou verziou OpenSSL v 1.1.1k + MD 2018-11-06 upravene pre linkovanie s OpenSSL 1.1.1 + (pouzita metoda TLS_client_method) + MD 2018-11-02 vlozene upravy na odstraneie varovania a autentizaciu servera + vlozene upravy na realizaciu autentizacie klienta (nacitanie potrebnych certifikatov + a kluca) + odstranenie varovania o poradi hlavickovych suborov + (vid. komentare // MD) +*/ + +/** SSL/TLS Client + * SSL/TLS client demonstration. This source code is cross-plateforme Windows and Linux. + */ + +// __unix__ is usually defined by compilers targeting Unix systems +#ifdef __unix__ +# include +# include +# include +# include +# define SOCKLEN_T socklen_t +# define CLOSESOCKET close + // _Win32 is usually defined by compilers targeting 32 or 64 bit Windows systems +#elif defined _WIN32 + // MD odstrani varovanie o potrebe prehodit poradie hlavickovych suborov +# define WIN32_LEAN_AND_MEAN +# include +# include +# define SOCKLEN_T int +# define CLOSESOCKET closesocket +#endif + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#ifdef _WIN32 +WSADATA wsa; // Winsock data +#endif + +/* JS +Premenna na definovanie "exchange groups", algoritmov na vymenu klucov +Server moze podporovat viacero KEX/KEM algoritmov, v premennej musi byt kazdy +algoritmus oddeleny dvojbodkou, napr. "kyber512:bikel1" +Podporovane algoritmy je mozne ziskat prikazom "openssl list -kem-algorithms" +Prazdna premenna alebo naplnena neplatnymi protokolmi sposobi prerusenie aplikacie + +Ak server a klient nenajdu spolocny KEX/KEM protokol, tak +SSL vyhodi chybu SSL routines:final_key_share:no suitable key share + +Priklad pouzitia: +- klasicke algoritmy: "x25519:x448:prime256v1:secp521r1:secp384r1:ffdhe2048:ffdhe3072" +- PQ algoritmy: "kyber512:kyber768:kyber1024:bikel1:bikel3:bikel5:hqc128:hqc192:hqc256:frodo640aes:frodo640shake:frodo976aes:frodo976shake:frodo1344aes:frodo1344shake" +- hybrid algoritmy: "x25519_kyber768:x25519_frodo640aes:x25519_hqc128:x448_bikel3:x448_kyber768:p256_kyber768" + +Podporovane algoritmy OQS-providerom: https://github.com/open-quantum-safe/oqs-provider/blob/0.6.0/ALGORITHMS.md + +POZOR - BIKE protokol nefunguje na Windows platforme (liboqs 0.10.0, oqs-provider 0.6.0) + +*/ +#define DEFAULT_GROUPS "kyber512:X25519:kyber768" + +#define DEFAULT_PORT 443 + +/** + * printUsage function who describe the utilisation of this script. + * @param char* bin : the name of the current binary. + */ +void printHeader(char* bin){ + // JS update + printf("[?] Usage : %s \n", bin); + return; +} + +/** JS update navratove hodnoty pri chybe + * makeClientSocket function who create a traditionnal client socket to the hostname throught the port. + * @param char* hostname : the target to connect to + * @param int port : the port to connect throught + * @return int socket ; the socket number created + */ +int makeClientSocket(const char *hostname, int port){ + int sock; + struct hostent *host; + struct sockaddr_in addr; + #ifdef _WIN32 + WSAStartup(MAKEWORD(2,0),&wsa); + #endif + if((host = gethostbyname(hostname)) == NULL ){ + perror(hostname); + return -1; + } + sock = socket(PF_INET, SOCK_STREAM, 0); + memset(&addr, 0, sizeof(addr)); + addr.sin_family = AF_INET; + addr.sin_port = htons(port); + addr.sin_addr.s_addr = *(long*)(host->h_addr); + if(connect(sock, (struct sockaddr*)&addr, sizeof(addr)) != 0){ + CLOSESOCKET(sock); + perror(hostname); + return -1; + } + return sock; +} + +/** JS update + * initSSLContext function who initialize the SSL/TLS engine with right method/protocol + * @param client_key name of file where is stored private key of client + * @param client_pem name of file where is stored public key of client + * @return SSL_CTX *ctx ; a pointer to the SSL context created + */ +SSL_CTX* initSSLContext(char* client_key, char* client_pem){ + const SSL_METHOD *method; + SSL_CTX *ctx; + + // initialize the SSL library + SSL_library_init(); + SSL_load_error_strings(); + OpenSSL_add_all_algorithms(); + + // MJ only TLS connection + method = TLS_client_method(); + + // create new context from selected method + ctx = SSL_CTX_new(method); + if(ctx == NULL){ + ERR_print_errors_fp(stderr); + abort(); + } + + // MD zabezpecienie overenia certifikatu servera pomocou CA + if (SSL_CTX_load_verify_locations(ctx, "myCA.pem", 0)) { + printf("CA certificate loaded\n"); + SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL); + } + + else { + printf("\nCA certificate not loaded! Abort ...\n"); + abort(); + } + +// MD nacitanie dat pre autentizaciu klineta +// MJ Update [Define Macro] +#ifdef AUTHENTICATION + int res = 0; + + res = SSL_CTX_use_certificate_file(ctx, client_pem, SSL_FILETYPE_PEM); + if (res <= 0) { + // handle error + printf("\nCLIENT certificate not loaded! Abort ...\n"); + abort(); + } + + res = SSL_CTX_use_PrivateKey_file(ctx, client_key, SSL_FILETYPE_PEM); + if (res <= 0) { + // handle error + + printf("\nCLIENT key not loaded! Abort ...\n"); + abort(); + } + + /* verify private key */ + if ( !SSL_CTX_check_private_key(ctx) ) + { + fprintf(stderr, "Private key does not match the public certificate\n"); + abort(); + } + printf("Certificate attached\n"); + printf("\n"); +#endif + + return ctx; +} + +/** + * showCerts function who catch and print out certificat's data from the server + * @param SSL* ssl : the SSL/TLS connection + */ +void showCerts(SSL* ssl){ + X509 *cert; + char *subject, *issuer; + + // get the server's certificate + cert = SSL_get_peer_certificate(ssl); + if(cert != NULL){ + + // JS get server's certificate algorithm name + int nid; + SSL_get_peer_signature_type_nid(ssl, &nid); + printf("Server signature algorithm: %s\n", OBJ_nid2sn(nid)); + + // get certificat's subject + subject = X509_NAME_oneline(X509_get_subject_name(cert), 0, 0); + + // get certificat's issuer + issuer = X509_NAME_oneline(X509_get_issuer_name(cert), 0, 0); + + printf("[+] Server certificates :\n"); + printf("\tSubject: %s\n", subject); + printf("\tIssuer: %s\n", issuer); + + // Free memory + free(subject); + free(issuer); + X509_free(cert); + + // check certificat's trust + if(SSL_get_verify_result(ssl) == X509_V_OK) + printf("[+] Server certificates X509 is trust!\n"); + else + printf("[-] Server certificates X509 is not trust...\n"); + } + else + printf("[-] No server's certificates\n"); + return; +} + +/** + * main function who coordinate the socket and SSL connection creation, then receive and emit + data to and from the server. + */ +int main(int argc, char **argv){ + int sock, bytes, port; + SSL_CTX *ctx; + SSL *ssl; + char buf[1024]; + char *hostname; + + if(argc != 5){ + printHeader(argv[0]); + exit(0); + } + + // MJ Add keys for communication + char *client_key = argv[3]; + char *client_pem = argv[4]; + + hostname = argv[1]; + + // Assign correct port number + port = (atoi(argv[2]) > 0 && atoi(argv[2]) < 65535) ? atoi(argv[2]) : DEFAULT_PORT; + + // JS update + // Load default and OQS providers + // Default provider must be loaded before OQS provider + // Providers have to loaded before SSL/TLS engine initSSLContext() + OSSL_PROVIDER* provider; + provider = OSSL_PROVIDER_load(NULL, "default"); + if (provider == NULL) { + printf("Failed to load Default provider\n"); + exit(0); + } + + OSSL_PROVIDER* custom_provider = OSSL_PROVIDER_load(NULL, "oqsprovider"); + if (custom_provider == NULL){ + printf("Failed to load OQS-provider\n"); + OSSL_PROVIDER_unload(provider); + exit(0); + } + + // load SSL library and dependances + ctx = initSSLContext(client_key, client_pem); + + // make a classic socket to the hostname throught the port + sock = makeClientSocket(hostname, port); + + // create new SSL connection state + ssl = SSL_new(ctx); + + // JS set key exchange/encapsulation protocols supported by server + // Without this function, client will use default X25519 protocol + // First protocol supported by both server and client will be used for KEX/KEM + // Empty DEFAULT_GROUPS or list of unsupported protocol by server will fail communication + if (SSL_set1_groups_list(ssl, DEFAULT_GROUPS) != 1){ + printf("KEX/KEM algorithms undefined - check DEFAULT_GROUPS variable\n"); + ERR_print_errors_fp(stderr); + SSL_free(ssl); + SSL_CTX_free(ctx); + OSSL_PROVIDER_unload(provider); + OSSL_PROVIDER_unload(custom_provider); + exit(0); + } + + // attach the socket descriptor + SSL_set_fd(ssl, sock); + + // make the SSL connection + if(SSL_connect(ssl) == -1) + ERR_print_errors_fp(stderr); + else{ + + // JS get chosen (negotiated) key exchange/encapsulation algorithm name + printf("Used group (KEM): %s\n", SSL_group_to_name(ssl, SSL_get_negotiated_group(ssl))); + + /* + if the server suddenly wants a new handshake, + OpenSSL handles it in the background. Without this + option, any read or write operation will return an + error if the server wants a new handshake. + */ + SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY); + + char msg[] = "ClientName"; + printf("[+] Cipher used : %s\n", SSL_get_cipher(ssl)); + + // Show certificats data + showCerts(ssl); + + // encrypt and send message + SSL_write(ssl, msg, strlen(msg)); + + // get response and decrypt content + bytes = SSL_read(ssl, buf, sizeof(buf)); + buf[bytes] = 0; + printf("[+] Server data received : %s\n", buf); + + // release SSL connection state + SSL_shutdown(ssl); + SSL_free(ssl); + + } + + // close socket + CLOSESOCKET(sock); + #ifdef _WIN32 + WSACleanup(); + #endif + + // release SSL's context + SSL_CTX_free(ctx); + // JS Unload both providers + OSSL_PROVIDER_unload(provider); + OSSL_PROVIDER_unload(custom_provider); + return 0; +} diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/CLIENT/client.key b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/CLIENT/client.key new file mode 100644 index 0000000..c1fd5a6 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/CLIENT/client.key @@ -0,0 +1,158 @@ +-----BEGIN PRIVATE KEY----- +MIIdOgIBADANBgsrBgEEAQKCCwcIBwSCHSQEgh0gZp18fUGtbxJx3z9zyHS1mAE4 +HKZ08Z+mFY/KFU+uog6t1Bar7tHIQvlRcQnaId2g7wgYymC8XmoBCbz2FRMsfPNJ +HVlC4xiFMajG62Vd5ykGDYQRMU14FFva0Xpms7ZzwMhhpIBIWaaEiESRCJNRJIJE +kBhwZBgtEiVIFLNlCyJAWSBiGpWFEjggkzINEoZFCyMyG0GNmLaEowSAFBRIYBJq +SMJR08hx47Bw0xgSTAJSWiaNmUJq4QKRCyZFjCZuEiKSGzIgnARpJAaR3EBOCJJJ +CRkApEIJWgRSlBhxETIizDQI2iZEgSBKGScKiiggoUIMgCJg4JaNIjZS0KhEAzNE +SAYGggSEVLRoYkQMIhBtw7KImQIQIQNRSThuhJRgoARBEjMwFBEGjMhxi0BqG4OJ +HDZRmMZABDmBC6IRwSQtAsgE4wIEHBJC4bYwCZSRmDBxC5QpFEVFBKNFpEIg3EIJ +i5YsyKYhU6ZsCydxoySGw0BqGKNNRMAwECRs0TAGHEYBgqKFEbKA2YYM0ZBkAqOM +2xAlSkhiyggikRJOCbQhWSAiHCktkSZ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T/client.pem b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/CLIENT/client.pem new file mode 100644 index 0000000..7f06515 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/CLIENT/client.pem @@ -0,0 +1,161 @@ +-----BEGIN CERTIFICATE----- +MIIdnzCCC5SgAwIBAgIUJ85yF8KSw0QrCNIkQdmFpQeyNiUwDQYLKwYBBAECggsH +CAcwZTELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkZha2UgU3RhdGUxFjAUBgNVBAcM +DUZha2UgTG9jYWxpdHkxFTATBgNVBAoMDEZha2UgQ29tcGFueTESMBAGA1UEAwwJ +bG9jYWwuZGV2MB4XDTI0MDIyMzEyMTMxNVoXDTI5MDIyMTEyMTMxNVowZTELMAkG +A1UEBhMCVVMxEzARBgNVBAgMCkZha2UgU3RhdGUxFjAUBgNVBAcMDUZha2UgTG9j +YWxpdHkxFTATBgNVBAoMDEZha2UgQ29tcGFueTESMBAGA1UEAwwJbG9jYWwuZGV2 +MIIKNDANBgsrBgEEAQKCCwcIBwOCCiEAZp18fUGtbxJx3z9zyHS1mAE4HKZ08Z+m +FY/KFU+uog61oSWwSvkyu/wIAfN7LWaHKrkowbNBabTmWIgtinXRL2tCl+sDWesZ +9ShPO4oaMgr+2XLL0KqY7ytNiUP5we+T8/jRb31DI239nyoFCUbi5N48+QYbiBPU +YNk0VkwMN3JUxmJlGt5k2xDN/k3qXd0fgjBkW4W1KTdgUu4qo8Hc4FqovHbxXEzN +PSiJeWF1nM/brALa37pHackUzQc0EVUAUQHRaF5pdQky+bkD/riJBhm3n+8ZzjR9 +5JePobauGMCrtNQ7fiP78idB79/GSz/7UmYmPOgz/GVIWlePLyFou23s24T2khlS +3jx9/TrjyBz+NL4lxgKrT2msARLkSqKbKjq4FOcvHw1chfYUlQ8Y4Dfqov/62Rvy +4fFJNu+pTcM46IRaE2l2MLzP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U +9B2EHlJwkfRCaMM+tJnuZljsDs2Xcgu18YMHsjAtnIWHXolOEDLGoTI2y43FaOR4 +RKUTAWgH0UA8/XTOl/gy0r16KkmyYMAHeLUCAGyD9ssJnlRZqzPp2q+RusgVmAJD +ZTJn96AJjxWX7h4e4QIYmdwAdqcMhKreTTj8Gd6dSsMrSz0/qmNCYE+XOk03pKJK +JUEmxBEyG+/ZZANDazsEdPkGYbUGUEA5aHCy//ubqh5IIdOpahgndG7O6W5TcmpW +dumnBG0eRPQAZVPPzZI2ZitYykgwCKEzatUmRgP6Ke5wgLF4zM/n2roJJ5ocw35/ +UwgJ85eCGgtDz6K2/DtHx4o50f3ioqXb5wF+xIhLn6mfrtkEfMkeFMGD0KVHiZK/ +4Ry2mh41i1Fw45oNRfd55j/tYaZmHG5vl9RZ0TuzM6muPmWNpiafNV60cjxa2Bvz +cZg/jPBwRLTmHiI2pDkTbQF4C/GORMC9cUsl7vwwF+KQwClFSy5F1AekCkIe74CZ +J/YvZuZ+PY3XXyMs5yXijr0bEV1GmzKDK9Qp5W8OPG6OlzMdL8aBudJCFVUy73oL +N7UHwbKc8awUs8i8A1xchzM/v/3ysIafjlFw9kXpOC1FpHIhBqvk295bv8tn+MlL +vaHwHedrxnB23D3lavs54snXqAoq0FaWa8/neXfKLKiHIOGWGhNxBS9Wzrgg4pP0 +jUHWcm5jd2QDqUpsA38fhDpjZ+LlG0dcnswiPlJew+TlXoHAws0FEVXF4CgwQlxk +tM7ZOkNYanmL6ys/X2VmkaKz1Nvi6wAAAAAAAAAAAAAAAAAAAAAAAAAAAAUKERYb +Iyo2 +-----END CERTIFICATE----- diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/SERVER/server.c b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/SERVER/server.c new file mode 100644 index 0000000..bc54d00 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/SERVER/server.c @@ -0,0 +1,453 @@ +/* + JS 2024-04-11 testovane s OpenSSL 3.3.0, liboqs 0.10.0 a oqs-provider 0.6.0 +*/ +/* + JS 2024-04-11 testovane s OpenSSL 3.3.0, liboqs 0.10.0 a oqs-provider 0.5.3 +*/ +/* + JS 2024-03-04 - doplnenie funkcii pre uvolnenie nacitanych providerov +*/ + +/* + JS 2024-02-24 - funkcia initSSLContext() rozsirena o nacitanie OQS-providera + pre plne funkcne PQ algoritmy na kazdej platforme + - doplnene priklady nastavenia premennej DEFAULT_GROUPS + - testovane s oqsprovider 0.5.3 +*/ +/* + JS 2024-02-18 - testovanie PQ algoritmov s pouzitim oqs-providera + - uprava vypisu o pripojeni klienta + - pridane vypisy s informaciami o pouzivanych algoritmoch + pre KEX a certifikaty + - oprava kontroly navratovej hodnoty funkcii + SSL_CTX_use_certificate_file() a SSL_CTX_use_PrivateKey_file +*/ + +/* + JS 2024-02-08 testovane s aktualnou najnovsou verziou OpenSSL 3.2.1 +*/ + + +/* + MJ 2023-18-05 - Uprava funkcie printHeader() + -> Zmazanie SSL metody + -> Upraveny vypis ako spustit program + - Zmazanie funkcii spojene s generovanim certifikatov + -> callbackGeneratingKey() + -> makekCert() + - Uprava funkcie loadCertificates() aby nacitavala kluce klienta a servera zo suboru + - Uprava funkcie initSSLContext() aby realizovala fixne iba TLS spojenie + - Uprava hlavnej funkcie main() na zaklade predoslej upravy (nastavenie fixne TLS) + -> Zmazanie premennej ctxMethod + -> Uprava argumentov [argv] - zmazanie TLS metody, pridanie suborov s klucmi + -> zmena nazvoslovia premennych na ulozenie klucov + + + MJ 2022-12-28 - Oprava Warningu vo funckii routine() vid tag MJ (vid. komentare MJ) + +*/ + +/* + + MD 2021-03-29 testovane s aktualne najnovsou verziou OpenSSL v 1.1.1k + MD 2018-11-07 Upravene pre linkovanie s OpenSSL v. 1.1.1 + (pouzitie novej funkcie TLS_server_method) + MD 2018-11-02 Odstanene varovanie + dodane nacitanie CA certifikatu + dodany kod na realizaciu autentizacie klienta + (vid //MD) +*/ + +/** SSL/TLS Server + * SSL/TLS server demonstration. This source code is cross-plateforme Windows and Linux. + * Compile under Linux with : g++ main.cpp -Wall -lssl -lcrypto -o main + * Certificat and private key to protect transaction can be used from : + * - External(s) file(s), created with command : openssl req -x509 -nodes -newkey rsa:2048 -keyout server.pem -out server.pem + * - Internal uniq hardcoded certificat and private key, equal into each server instance + * - Randomly generated certificat and private key, best solution to used dynamic keying material at each server lauching. + */ + +// __unix__ is usually defined by compilers targeting Unix systems +#ifdef __unix__ +# include +# include +# include +# include +# define SOCKLEN_T socklen_t +# define CLOSESOCKET close + // _Win32 is usually defined by compilers targeting 32 or 64 bit Windows systems +#elif defined _WIN32 + // MD, odstrani varovanie o potrebe prehodit poradie hlavickovych suborov +# define WIN32_LEAN_AND_MEAN +# include +# include +# define SOCKLEN_T int +# define CLOSESOCKET closesocket +#endif + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#ifdef _WIN32 +WSADATA wsa; // Winsock data +#endif + +/* JS +Premenna na definovanie "exchange groups", algoritmov na vymenu klucov +Server moze podporovat viacero KEX/KEM algoritmov, v premennej musi byt kazdy +algoritmus oddeleny dvojbodkou, napr. "kyber512:bikel1" +Podporovane algoritmy je mozne ziskat prikazom "openssl list -kem-algorithms" +Prazdna premenna alebo naplnena neplatnymi protokolmi sposobi prerusenie aplikacie + +Ak server a klient nenajdu spolocny KEX/KEM protokol, tak +SSL vyhodi chybu: "SSL routines:final_key_share:no suitable key share" + +Priklad pouzitia: +- klasicke algoritmy: "x25519:x448:prime256v1:secp521r1:secp384r1:ffdhe2048:ffdhe3072" +- PQ algoritmy: "kyber512:kyber768:kyber1024:bikel1:bikel3:bikel5:hqc128:hqc192:hqc256:frodo640aes:frodo640shake:frodo976aes:frodo976shake:frodo1344aes:frodo1344shake" +- hybrid algoritmy: "x25519_kyber768:x25519_frodo640aes:x25519_hqc128:x448_bikel3:x448_kyber768:p256_kyber768" + +Podporovane algoritmy OQS-providerom: https://github.com/open-quantum-safe/oqs-provider/blob/0.6.0/ALGORITHMS.md + +POZOR - BIKE protokol nefunguje na Windows platforme (liboqs 0.10.0, oqs-provider 0.6.0) + +*/ +#define DEFAULT_GROUPS "kyber768:frodo976aes:kyber1024" + +#define DEFAULT_PORT 443 + +/** + * printUsage function who describe the utilisation of this script. + * @param char* bin : the name of the current binary. + */ +void printHeader(char* bin){ + // JS update + printf("[?] Usage : %s ]\n", bin); + return; +} + +/** + * makeServerSocket function who create a traditionnal server socket, bind it and listen to it. + * @param int port : the port to listen + * @return int socket : the socket number created + */ +int makeServerSocket(int port){ + int sock; + struct sockaddr_in addr; + #ifdef _WIN32 + WSAStartup(MAKEWORD(2,0),&wsa); + #endif + sock = socket(PF_INET, SOCK_STREAM, 0); + memset(&addr, 0, sizeof(addr)); + addr.sin_family = AF_INET; + addr.sin_port = htons(port); + addr.sin_addr.s_addr = INADDR_ANY; + if(bind(sock, (struct sockaddr*)&addr, sizeof(addr)) != 0){ + perror("[-] Can't bind port on indicated port..."); + abort(); + } + if(listen(sock, 10) != 0){ + perror("[-] Can't listening on indicated port..."); + abort(); + } + printf("\n"); + printf("[+] Server listening on the %d port...\n", port); + printf("[+] Waiting for connection\n"); + printf("\n"); + return sock; +} + + +/** JS update + * initSSLContext function who initialize the SSL/TLS engine with right method/protocol + * SSL/TLS engine provided by PQ algorithms functions of OQS provider + * @return SSL_CTX *ctx : a pointer to the SSL context created + */ +SSL_CTX* initSSLContext(){ + const SSL_METHOD *method; + SSL_CTX *ctx; + + // initialize the SSL library + SSL_library_init(); + SSL_load_error_strings(); + OpenSSL_add_all_algorithms(); + + // MJ only TLS connection + method = TLS_server_method(); + //printf("[+] Use TLS server method.\n"); + + // create new context from selected method + ctx = SSL_CTX_new(method); + if(ctx == NULL){ + ERR_print_errors_fp(stderr); + abort(); + } + + return ctx; +} + +/** + * loadCertificates function who load private key and certificat from files. + * 3 mecanisms available : + * - loading certificate and private key from file(s) + * - use embed hardcoded certificate and private key in the PEM format + * - generate random and dynamic certificate and private key at each server's launch instance. + * @param SSL_CTX* ctx : the SSL/TLS context + * @param char *server_pem : filename of the PEM certificat + * @param char *server_key : filename of the PEM private key + */ +void loadCertificates(SSL_CTX* ctx, const char* server_pem, const char* server_key){ + + if (SSL_CTX_use_certificate_file(ctx, server_pem, SSL_FILETYPE_PEM) != 1 || + // namiesto MD SSL_CTX_use_RSAprivateKey_file + SSL_CTX_use_PrivateKey_file(ctx, server_key, SSL_FILETYPE_PEM) != 1) + { + ERR_print_errors_fp(stderr); + abort(); + } + else + printf("[*] Server's certificat and private key loaded from file.\n"); + + // verify private key match the public key into the certificate + if(!SSL_CTX_check_private_key(ctx)){ + fprintf(stderr, "[-] Private key does not match the public certificate...\n"); + abort(); + } else + printf("[+] Server's private key match public certificate\n"); + + // JS get server's signature algorithm name + X509 *cert = SSL_CTX_get0_certificate(ctx); + int pknid; + if (X509_get_signature_info(cert, NULL, &pknid, NULL, NULL) != 1){ + printf("Certificate signature algorithm: Unknown algorithm"); + } + else{ + printf("Certificate signature algorithm: %s\n", OBJ_nid2sn(pknid)); + } + + // MD kod na autentizaciu klienta + // MJ Update [Define Macro] + #ifdef AUTHENTICATION + + SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER|SSL_VERIFY_FAIL_IF_NO_PEER_CERT, NULL); + + // load the trusted client CA certificate into context + if (SSL_CTX_load_verify_locations(ctx, "myCA.pem", NULL) != 1) + { + fprintf(stderr, "[-] CA certificate not loaded...\n"); + abort(); + } + #endif + + return; +} + +/** + * showCerts function who catch and print out certificate's data from the client. + * @param SSL* ssl : the SSL/TLS connection + */ +void showCerts(SSL* ssl){ + X509 *cert; + char *subject, *issuer; + + // get the client's certificate + cert = SSL_get_peer_certificate(ssl); + if(cert != NULL){ + // get certificate's subject + subject = X509_NAME_oneline(X509_get_subject_name(cert), 0, 0); + // get certificate's issuer + issuer = X509_NAME_oneline(X509_get_issuer_name(cert), 0, 0); + + printf("[+] Client certificates :\n"); + printf("\tSubject: %s\n", subject); + printf("\tIssuer: %s\n", issuer); + + // Free memory + free(subject); + free(issuer); + X509_free(cert); + } + else + printf("[-] No client's certificates\n"); + return; +} + +/** + * routine function who treat the content of data received and reply to the client. + * this function is threadable and his context sharedable. + * @param SSL* ssl : the SSL/TLS connection + */ +void routine(SSL* ssl){ + /* MJ char buf[1024], reply[1024]; + -> buf must be smaller than reply array because arrays are copied in sprintf function, + which have some additional string + -> buf_size + (string in sprintf)_size > reply_size = Can do overflow + -> 1024 bytes (buf) + "Enchante %s, je suis ServerName.\n" + some string(s) > 1024 bytes + (reply) + -> solution is change size of buf array + */ + char buf[1024/2], reply[1024]; + + int sock, bytes; + const char* echo = "Enchante %s, je suis ServerName.\n"; + + // accept SSL/TLS connection + if(SSL_accept(ssl) == -1) + ERR_print_errors_fp(stderr); + else{ + printf("[+] Cipher used : %s\n", SSL_get_cipher(ssl)); + + // JS get chosen (negotiated) key exchange/encapsulation algorithm name + printf("Used group (KEM): %s\n", SSL_group_to_name(ssl, SSL_get_negotiated_group(ssl))); + + // JS get client's certificate algorithm name + int nid; + SSL_get_peer_signature_type_nid(ssl, &nid); + printf("Peer signature name: %s\n", OBJ_nid2sn(nid)); + + + // Show certificats data + showCerts(ssl); + + // read data from client request + bytes = SSL_read(ssl, buf, sizeof(buf)); + if(bytes > 0){ + buf[bytes] = 0; + printf("[+] Client data received : %s\n", buf); + + // construct response + sprintf(reply, echo, buf); + // send response + SSL_write(ssl, reply, strlen(reply)); + } else { + switch(SSL_get_error(ssl, bytes)){ + case SSL_ERROR_ZERO_RETURN : + printf("SSL_ERROR_ZERO_RETURN : "); + break; + case SSL_ERROR_NONE : + printf("SSL_ERROR_NONE : "); + break; + case SSL_ERROR_SSL: + printf("SSL_ERROR_SSL : "); + break; + } + ERR_print_errors_fp(stderr); + } + + } + + // get traditionnal socket connection from SSL connection + sock = SSL_get_fd(ssl); + // release SSL connection state + SSL_shutdown(ssl); + SSL_free(ssl); + // close socket + CLOSESOCKET(sock); +} + +/** + * main function who coordinate the socket and SSL connection creation, then receive and emit + data to and from the client. + */ +int main(int argc, char **argv){ + int sock, port; + SSL_CTX *ctx; + const char *server_pem, *server_key; + + if(argc != 4){ + printHeader(argv[0]); + exit(0); + } + + port = (atoi(argv[1]) > 0 && atoi(argv[1]) < 65535) ? atoi(argv[1]) : DEFAULT_PORT; + + // JS + // Load default and OQS providers + // Default provider must be loaded before OQS provider + OSSL_PROVIDER* provider; + provider = OSSL_PROVIDER_load(NULL, "default"); + if (provider == NULL) { + printf("Failed to load Default provider\n"); + exit(0); + } + + OSSL_PROVIDER* custom_provider = OSSL_PROVIDER_load(NULL, "oqsprovider"); + if (custom_provider == NULL){ + printf("Failed to load OQS-provider\n"); + OSSL_PROVIDER_unload(provider); + exit(0); + } + + // load SSL library and dependances + ctx = initSSLContext(); + + // MJ Update argv parameters + server_pem = argv[2]; + server_key = argv[3]; + + // load certificats and keys + loadCertificates(ctx, server_pem, server_key); + + // make a classic server socket + sock = makeServerSocket(port); + + while(1){ + struct sockaddr_in addr; + SSL *ssl; + SOCKLEN_T len = sizeof(addr); + + // accept connection of client + int client = accept(sock, (struct sockaddr*)&addr, &len); + printf("[+] Connection [%s:%d]\n", inet_ntoa(addr.sin_addr), ntohs(addr.sin_port)); + + // get new SSL state with context + ssl = SSL_new(ctx); + if (ssl == NULL){ + ERR_print_errors_fp(stderr); + break; + } + + // JS set key exchange/encapsulation protocols supported by server + // Without this function, client will use default X25519 protocol + // First protocol supported by both server and client will be used for KEX/KEM + // Empty DEFAULT_GROUPS or list of unsupported protocol by server will fail communication + if (SSL_set1_groups_list(ssl, DEFAULT_GROUPS) != 1){ + printf("KEX/KEM algorithms undefined - check DEFAULT_GROUPS variable\n"); + ERR_print_errors_fp(stderr); + break; + } + + // set traditionnal socket to SSL + SSL_set_fd(ssl, client); + + // apply routine to the socket's content + routine(ssl); + // JS remove break if you want server running in loop + break; + } + + + // close socket + CLOSESOCKET(sock); + #ifdef _WIN32 + WSACleanup(); + #endif + + // release SSL's context + SSL_CTX_free(ctx); + // JS Unload both providers + OSSL_PROVIDER_unload(provider); + OSSL_PROVIDER_unload(custom_provider); + return 0; +} diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/SERVER/server.key b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/SERVER/server.key new file mode 100644 index 0000000..f4b4267 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/SERVER/server.key @@ -0,0 +1,158 @@ +-----BEGIN PRIVATE KEY----- +MIIdOgIBADANBgsrBgEEAQKCCwcIBwSCHSQEgh0gvTK6AtK0Q9jgF8fkD3bhK+mq +crSGaTsr+M3dEpgFL3bhWKkwAKVvZkcQtq1EO/PjghbhsqWSfPpCfH+aUsMtmfMh +rfc49qdfHMCOV2xrnab/JWaaehQlCHKLHwljYEo2ICUKi4ApgDKBIjBlC5VFWpgM +0ShqwTgEUYYQWEAl2YJwmwKGGhMywpYxAoiIIqOFAYho3IIIXDYGCEYSwkgi5DQK +HAKIEYURABQEHKIBHIAxkLJkWsBtZDRA1AZSYSQOogRIirAwABBIJAOFkbYA0CRk +ChQuW7BR4LiRiyCNYYRwBKFgmqiQmwZsIbZoFCgikEgm0kIlATYlRAQQCYZoGLMI +BKJkShZGkACBJAYoIAaAEsRMSyZiEbkIygRS2ShsiQIhySYAVJJkE5dRAyEgmyCK +AzRqkiRK40ZiyyRMGiRQigBFCREt4LAwCoMoWYJRU8AlQCBOwyQx0sgQWziBoJYE +GQdF0hYlCwVMIrdACiBqELUpSyRpUhZEEAMkGkQQEQGKUqQQW6iNAABqAwaCAMEx +WoZEoAZEEjICikZAGqUM2RQFBBBGCjUs3JRJkJYEC4ANGwZiECcxEilgTBKOAiCB +hECCyTQQWgYpYraFwRBIk6KRjIKR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sFy7kVJdFpqXhJjq05CJGup4 +WKe6Jh9Mn5dv5tYlDqMwRgb26jBWLXzhSi1QtJSalSa4kyVrdLjTLGEtKoDNIiI9 +I/32+ki/MQ5KAIkVbB+Zad6NmHbWXO+b+O3EuoUToIaSnZMpWpC7/ds/E8aIF3E3 +7ortKOz0O665mwV/eDWan8Zy7Yn3QaasutZ/qILuQ6fjTX5Ccq9DReakphFmGTHV +TZjMFbizetonT7NywIGcErneYdWKYeDv+186YXCxLOs6zNcP/UkaXveXgtgD9DUm +SXHEdrhv4Bo+nl9Q0B82DajY42dLzvX9XkbJ52LQGzaK8RI6+1L5x5kgheToo0R7 +oJZ4nOe5NrEccfv1u23U3ASNsEfOSNXvY8xGO31ksaNd9IXyCBQfygE666OLlMcb +EEt9h7UjOswHnxLNPuL3UhNm8sNl5qom7gkApHpCsQFPgDavxIXGHviRBwNMowzs +GUcBKPOExvDMY8ip1dMgo1otlBlSh//sOlAp8BgXoTQMi2nvtSnDL5anX6zme3tU +aNBWaW+LF6iWeSXCov16K9dNA/Yi2b+CC2Wewo3IsP7bmtBXI7i/HhdWJ5dj5DJM +GDocf22pUmaKkZs1AWV7+GiKLRgxiwqMHushKqx0/m1DT5HwlbwSQn8utiwmr/FM +lP/bs8rRBsCIieR14N0dJTL7OQ+4srrysk7TfvV9UuTFg+IaoyjK1j+FgNtxMQ5Y +7E63ulGO5dogiTxAmxrYOtzxcUat6TZp7vAXoBuGcxf2foV2dEIzMS4XIiVWMyOv +jghCWfI5DGIe0lB7H7I7PXFV9EmV43P04GNPRyVXkMeSUrkQw++HDsS4oH7AqQ== +-----END PRIVATE KEY----- diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/SERVER/server.pem b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/SERVER/server.pem new file mode 100644 index 0000000..0d5248f --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_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ow9rNiJr8L5fRp4qCm3gq8NC4DE4Jhj2sQdpnP7h/BYTcVvQsePBM +99k0hZyWJKkBXBZuszFEqm66xeNArxGFxiBJY9hPFHGB0j//QDRpQJrHq+2Uwgcf +xKYqpP1h83hkvZtCv/JwakAHykogDfDMOlRAWjczJzIZ0BbH7p9ckRAU0pGQ1jWs +H8otcl69wVaM1aEGewhX4PiCjYBYDdHqhSTSda797YMVf9gydAh+C7BnmWZfo0Pu +nVCyT66GoMLCvKnYFx/Zs/izXzPXv46HrRS7yW4ruz1LXYA2fFtj2EDR+LFK8l3F +ZJ8sWxSlM7LNnJYrS701Je+H8nxFONedjoqn+EvTnuHe7e3SIFSSUXjV+hZ5qSL/ +NXRUHLLphcgvyz5/5QgOOJQbdZBSAd17jKkV860QPMj5ZAuhU4qx7yHVUP7PIlWn +ZYTq4zY716AA96Z8xK5uqT3pN8ZvxN8eg6ZR+lLUpiHJa3pkVXbp3oh9L+F6uRlN +dhtgHHC4Y1Qy/Snu1h3/RAZeD1T0p0wk59uL+roPyVFOd2QhNLwHbriHftOTvsfc +qXIZM5tDK09z2OZBQKgpmi8zTHZ4oMfKLENbbICMkJGYxcbJ/Bk9dHe3ztTcjJW3 +wcTYCjtRVF6Rzufp8wsVQ0VWaH6UxtRkdZuwvMvf4QALFywxNTZ1f/L8/QgVHSMt +Nz9L +-----END CERTIFICATE----- diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/comp_client.bat b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/comp_client.bat new file mode 100644 index 0000000..69aa73e --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/comp_client.bat @@ -0,0 +1,9 @@ +:: Name: Martin Janitor +:: Subject: DP1 +:: Description: compilation for client.c file +:: Date: 2023-07-05 + +rem prikazy na prelozenie a linkovanie EXE programov s vyuzitim OpenSSL kniznice nainstalovanej v obraze BPS_PS +:: MJ Pridanie makra AUTHENTICATION pre autentizaciu klienta, ak nie je nutne autentizovat klienta staci zmazat -DAUTHENTICATION z procesu kompilacie + +gcc -Wall -Wextra -o client_run ./CLIENT/client.c -lcrypto -lssl -I C:\OPENSSL\include -L C:\OPENSSL\lib -lws2_32 -DAUTHENTICATION \ No newline at end of file diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/comp_server.bat b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/comp_server.bat new file mode 100644 index 0000000..a6a732a --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/comp_server.bat @@ -0,0 +1,9 @@ +:: Name: Martin Janitor +:: Subject: DP1 +:: Description: compilation for server.c file +:: Date: 2023-07-05 + +rem prikazy na prelozenie a linkovanie EXE programov s vyuzitim OpenSSL kniznice nainstalovanej v obraze BPS_PS +:: MJ Pridanie makra AUTHENTICATION pre autentizaciu klienta, ak nie je nutne autentizovat klienta staci zmazat -DAUTHENTICATION z procesu kompilacie + +gcc -Wall -Wextra -o server_run ./SERVER/server.c -lcrypto -lssl -I C:\OPENSSL\include -L C:\OPENSSL\lib -lws2_32 -DAUTHENTICATION \ No newline at end of file diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/makefile b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/makefile new file mode 100644 index 0000000..13b95f0 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/makefile @@ -0,0 +1,30 @@ +# Makefile created by Martin Janitor +# DP1 +# 9.5.2023 + +CC=gcc +CFLAGS=-Wall -Wextra +LIBS= -lcrypto -lssl +SRC_CLIENT= ./CLIENT/ +SRC_SERVER= ./SERVER/ +OPTIONAL= -DAUTHENTICATION + +ifeq ($(OS),Windows_NT) + # Windows-specific options + LIBS += -I C:\OPENSSL\include -L C:\OPENSSL\lib -lws2_32 +endif + +#I C:\BATCHES\include +#L C:\BATCHES\lib + +all: server_run client_run + +server_run: $(SRC_SERVER)server.c + $(CC) $(CFLAGS) -o server_run $(SRC_SERVER)server.c $(LIBS) $(OPTIONAL) + +client_run: $(SRC_CLIENT)client.c + $(CC) $(CFLAGS) -o client_run $(SRC_CLIENT)client.c $(LIBS) $(OPTIONAL) + +clean: + rm -f server client + del server.exe client.exe \ No newline at end of file diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/myCA.pem b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/myCA.pem new file mode 100644 index 0000000..97f7883 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/myCA.pem @@ -0,0 +1,160 @@ +-----BEGIN CERTIFICATE----- +MIIdjzCCC4SgAwIBAgIUN0p76iVLFlnmnk5I2lxh/FY89lUwDQYLKwYBBAECggsH +CAcwZTELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkZha2UgU3RhdGUxFjAUBgNVBAcM +DUZha2UgTG9jYWxpdHkxFTATBgNVBAoMDEZha2UgQ29tcGFueTESMBAGA1UEAwwJ +bG9jYWwuZGV2MB4XDTI0MDIyMzEyMTMxNVoXDTI5MDIyMTEyMTMxNVowZTELMAkG +A1UEBhMCVVMxEzARBgNVBAgMCkZha2UgU3RhdGUxFjAUBgNVBAcMDUZha2UgTG9j +YWxpdHkxFTATBgNVBAoMDEZha2UgQ29tcGFueTESMBAGA1UEAwwJbG9jYWwuZGV2 +MIIKNDANBgsrBgEEAQKCCwcIBwOCCiEA4mTQbxXW7KvE84Go8ktmQrst7JxioPjI +M+h6sZqAgLbMuZuG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FilYrbO31homWXKBqbPx8j1IXHTCyvT2DTp/5vIpMklPY2iC6SxDZoqL +7ERMXWuSmLvRAAAAAAAAAAAAAAAAAAAAAAAABg0WHiMrMTk= +-----END CERTIFICATE----- diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/schematic.svg b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/schematic.svg new file mode 100644 index 0000000..21588b2 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/schematic.svg @@ -0,0 +1,4 @@ + + + +

main()

main()
KLIENT
KLIENT
initSSLContext()
initSSLContext()
makeClientSocket()
makeClientSocket()
SSL_connect()
SSL_connect()
showCerts()
showCerts()
SSL_write()
SSL_write()
SSL_read()
SSL_read()
SSL_shutdown()
SSL_shutdown()
TLS_client_method()
TLS_client...
SSL_CTX_new()
SSL_CTX_new()
SSL_CTX_use_certificate_file()
SSL_CTX_use_certificate_file()
gethostbyname()
gethostbyname()
socket()
socket()
connect()
connect()
SSL_get_peer_certificate()
SSL_get_peer_certificate()
SSL_get_verify_result()
SSL_get_verify_result()

main()

main()
SERVER
SERVER
initSSLContext()
initSSLContext()
loadCertificates()
loadCertificates()
while(1) loop
while(1) loop
accept()
accept()
výpis IP + Port
výpis IP + Port
SSL_set_fd()
SSL_set_fd()
routine()
routine()
TLS_client_method()
TLS_client...
SSL_CTX_new()
SSL_CTX_ne...
socket()
socket()
bind()
bind()
SSL_CTX_use_certificate_file()
SSL_CTX_use_certificate_file()
SSL_CTX_use_PrivateKey_file()
SSL_CTX_use_PrivateKey_file()
SSL_CTX_check_private_key()
SSL_CTX_check_private_key()
 SSL_CTX_set_verify()
 SSL_CTX_set_verify()
SSL_CTX_load_verify_locations()
SSL_CTX_load_verify_locations()
makeServerSocket()
makeServerSocket()
listen()
listen()
SSL_accept()
SSL_accept()
showCerts()
showCerts()
SSL_get_peer_certificate()
SSL_get_peer_certificate()
SSL_read()
SSL_read()
SSL_write()
SSL_write()
SSL_get_fd()
SSL_get_fd()
SSL_shutdown()
SSL_shutdown()
SSL_CTX_use_PrivateKey_file()
SSL_CTX_use_PrivateKey_file()
SSL_CTX_check_private_key()
SSL_CTX_check_private_key()
Autentizácia klienta
Autentizácia klienta
Nezašifrovaná komunikácia
Nezašifrovaná komunikácia
Zašifrovaná komunikácia
Zašifrovaná komunikácia
SSL_library_init()
SSL_load_error_strings()
OpenSSL_add_all_algorithms()
SSL_library_init()...
SSL_set_fd()
SSL_set_fd()
 SSL_set_mode()
 SSL_set_mode()
SSL_library_init()
SSL_load_error_strings()
OpenSSL_add_all_algorithms()
SSL_library_init()...

PROJECT = CLIENT_SERVER_SECURE

PROJECT = CLIENT_SERVER_SECURE
1. Inicializácia OpenSSL knižnice
2. Vytvorenie nového SSL/TLS kontextu. obsahujúceho
konfiguračné a kryptografické parametre potrebné pre
vytvorenie a udržiavanie SSL/TLS pripojenia
1. Inicializácia OpenSSL k...
1. Načítanie digitálneho certifikátu
2. Načítanie súkromného kľúča do SSL_CTX objektu.
3. Overenie súkromného kľúča
1. Načítanie digitálneho ce...
1. Získanie IP adresy na základe náazu domény
2. Vytvorenie socketu
3. Vytvorenie spojenia so vzdialeným socketom alebo serverom
1. Získanie IP adresy na z...
1.Iniciovanie SSL/TLS handshaku so vzdialeným serverom. Vytvára zabezpečené, šifrované spojenie medzi klientoma serverom pomocou protokolu SSL/TLS
2. Nastavenie módu pre SSL/TLS
1.Iniciovanie SSL/TLS hand...
1. Načítanie údajov z digitálneho certifikátu
2. Overenie digitálneho certifikátu
1. Načítanie údajov z digit...
1. Zašifrovanie a odoslanie dát do za definovaného socketu
2. Načítanie a dešifrovanie dostupných dát
3. Ukončenie SSL/TLS spojenia
1. Zašifrovanie a odoslanie...
1. Nastavenie režimu overenia diditálnych certifikátov
2. Načítanie CA zo súboru a vloženie do SSL_CTX štruktúry
1. Nastavenie režimu overen...
1. Vytvorenie socketu
2. Priradenie IP adresy a číslo portu ku socketu
3.Spracovanie prichadzajúceho spojenia
4.Akceptovanie prichadzajúceho soketu
1. Vytvorenie socketu...
1. Inicializovanie SSL/TLS handshaku
1. Inicializovanie SSL/TLS...
Text is not SVG - cannot display
\ No newline at end of file diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/start_client.bat b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/start_client.bat new file mode 100644 index 0000000..1c26571 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/start_client.bat @@ -0,0 +1,7 @@ +:: Name: Martin Janitor +:: Subject: DP1 +:: Description: run client .bat file +:: Date: 2023-07-05 + +rem testovanie spojenia klient server na lokalhost adrese s vyuzitim portu 5000 +client_run 127.0.0.1 5000 ./CLIENT/client.key ./CLIENT/client.pem diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/start_server.bat b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/start_server.bat new file mode 100644 index 0000000..50559fb --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE/start_server.bat @@ -0,0 +1,7 @@ +:: Name: Martin Janitor +:: Subject: DP1 +:: Description: run server .bat file +:: Date: 2023-07-05 + +rem Spustenie servra, ktory "pocuva" na porte 5000 +server_run 5000 ./SERVER/server.pem ./SERVER/server.key diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/CLIENT/client.c b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/CLIENT/client.c new file mode 100644 index 0000000..5d8dbb0 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/CLIENT/client.c @@ -0,0 +1,324 @@ +/* + JS 2024-04-11 testovane s OpenSSL 3.3.0, liboqs 0.10.0 a oqs-provider 0.6.0 +*/ +/* + JS 2024-04-11 testovane s OpenSSL 3.3.0, liboqs 0.10.0 a oqs-provider 0.5.3 +*/ +/* + JS 2024-03-04 - doplnenie funkcii pre uvolnenie nacitanych providerov +*/ +/* + JS 2024-02-24 - funkcia initSSLContext() rozsirena o nacitanie OQS-providera + pre plne funkcne PQ algoritmy na kazdej platforme + - doplnene priklady nastavenia premennej DEFAULT_GROUPS + - testovane s oqsprovider 0.5.3 +*/ +/* + JS 2024-02-17 - testovanie PQ algoritmov s pouzitim oqs-providera + - pridane vypisy s informaciami o pouzivanych algoritmoch + pre KEX a certifikaty +*/ + +/* + JS 2024-02-08 testovane s aktualnou najnovsou verziou OpenSSL 3.2.1 +*/ + +/* + Name: Martin Janitor + Subject: DP1 + Description: Implemenation SSL/TLS [CLIENT] connection with usage of BIO structure + Date: 2023-07-12 +*/ + +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +/* +Premenna na definovanie "exchange groups", algoritmov na vymenu klucov +Server moze podporovat viacero KEX/KEM algoritmov, v premennej musi byt kazdy +algoritmus oddeleny dvojbodkou, napr. "kyber512:bikel1" +Podporovane algoritmy je mozne ziskat prikazom "openssl list -kem-algorithms" +Prazdna premenna alebo naplnena neplatnymi protokolmi sposobi prerusenie aplikacie + +Ak server a klient nenajdu spolocny KEX/KEM protokol, tak +SSL vyhodi chybu SSL routines:final_key_share:no suitable key share + +Priklad pouzitia: +- klasicke algoritmy: "x25519:x448:prime256v1:secp521r1:secp384r1:ffdhe2048:ffdhe3072" +- PQ algoritmy: "kyber512:kyber768:kyber1024:bikel1:bikel3:bikel5:hqc128:hqc192:hqc256:frodo640aes:frodo640shake:frodo976aes:frodo976shake:frodo1344aes:frodo1344shake" +- hybrid algoritmy: "x25519_kyber768:x25519_frodo640aes:x25519_hqc128:x448_bikel3:x448_kyber768:p256_kyber768" + +Podporovane algoritmy OQS-providerom: https://github.com/open-quantum-safe/oqs-provider/blob/0.6.0/ALGORITHMS.md + +POZOR - BIKE protokol nefunguje na Windows platforme (liboqs 0.10.0, oqs-provider 0.6.0) + +*/ +#define DEFAULT_GROUPS "X25519:kyber512:kyber768" + +/** + * printUsage function who describe the utilisation of this script. + * @param char* bin : the name of the current binary. + */ +void printHeader(char *bin) +{ + /* JS update */ + printf("[?] Usage : %s \n", bin); + return; +} + +/** + * makeClientSocket function who create a traditionnal client socket to the hostname throught the port. + * @param char* hostname : the target to connect to + * @param int port : the port to connect throught + * @return BIO context structure + */ +BIO* makeClientSocket(const char *hostname, int port) +{ + char buffer[25]; + memset(buffer,'\0',25); + sprintf(buffer, "%s:%d",hostname,port); + + BIO *bio = BIO_new_connect(buffer); + + if (bio == NULL){ + fprintf(stderr, "Error creating connection BIO\n"); + return NULL; + } + return bio; +} + +/** JS update + * initSSLContext function who initialize the SSL/TLS engine with right method/protocol + * SSL/TLS engine provided by PQ algorithms functions of OQS provider + * @param client_key name of file where is stored private key of client + * @param client_pem name of file where is stored public key of client + * @return SSL_CTX *ctx ; a pointer to the SSL context created +*/ +SSL_CTX *initSSLContext(char *client_key, char *client_pem) +{ + const SSL_METHOD *method; + SSL_CTX *ctx; + + // initialize the SSL library + SSL_library_init(); + SSL_load_error_strings(); + OpenSSL_add_all_algorithms(); + + // MJ only TLS connection + method = TLS_client_method(); + + // create new context from selected method + ctx = SSL_CTX_new(method); + if (ctx == NULL){ + ERR_print_errors_fp(stderr); + abort(); + } + + // MD zabezpecenie overenia certifikatu servera pomocou CA + if (SSL_CTX_load_verify_locations(ctx, "myCA.pem", 0)){ + printf("CA certificate loaded\n"); + SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL); + } + + else{ + printf("\nCA certificate not loaded! Abort ...\n"); + abort(); + } + +// MD nacitanie dat pre autentizaciu klineta +// MJ Update [Define Macro] +#ifdef AUTHENTICATION + int res = 0; + + res = SSL_CTX_use_certificate_file(ctx, client_pem, SSL_FILETYPE_PEM); + if (res <= 0){ + // handle error + ERR_print_errors_fp(stderr); + printf("\nCLIENT certificate not loaded! Abort ...\n"); + abort(); + } + + res = SSL_CTX_use_PrivateKey_file(ctx, client_key, SSL_FILETYPE_PEM); + if (res <= 0){ + // handle error + printf("\nCLIENT key not loaded! Abort ...\n"); + abort(); + } + + /* verify private key */ + if (!SSL_CTX_check_private_key(ctx)){ + fprintf(stderr, "Private key does not match the public certificate\n"); + abort(); + } + + printf("Certificate attached\n"); + printf("\n"); +#endif + + return ctx; +} + +/** + * showCerts function who catch and print out certificat's data from the server + * @param SSL* ssl : the SSL/TLS connection + */ +void showCerts(SSL *ssl) +{ + X509 *cert; + char *subject, *issuer; + + // get the server's certificate + cert = SSL_get_peer_certificate(ssl); + if (cert != NULL){ + + // JS get server's certificate algorithm name + int nid; + SSL_get_peer_signature_type_nid(ssl, &nid); + printf("Server signature algorithm: %s\n", OBJ_nid2sn(nid)); + + // get certificat's subject + subject = X509_NAME_oneline(X509_get_subject_name(cert), 0, 0); + // get certificat's issuer + issuer = X509_NAME_oneline(X509_get_issuer_name(cert), 0, 0); + + printf("[+] Server certificates :\n"); + printf("\tSubject: %s\n", subject); + printf("\tIssuer: %s\n", issuer); + + // Free memory + free(subject); + free(issuer); + X509_free(cert); + + // check certificat's trust + if (SSL_get_verify_result(ssl) == X509_V_OK) + printf("[+] Server certificates X509 is trust!\n"); + else + printf("[-] Server certificates X509 is not trust...\n"); + } + else + printf("[-] No server's certificates\n"); + return; +} + +/** + * main function who coordinate the socket and SSL connection creation, then receive and + emit data to and from the server. + */ +int main(int argc, char **argv) +{ + BIO* sock = NULL; + int bytes, port; + SSL_CTX *ctx; + SSL *ssl; + char buf[1024]; + char *hostname; + + if (argc != 5){ + printHeader(argv[0]); + exit(0); + } + + // MJ Add keys for communication + char *client_key = argv[3]; + char *client_pem = argv[4]; + + hostname = argv[1]; + + // Assign correct port number + port = (atoi(argv[2]) > 0 && atoi(argv[2]) < 65535) ? atoi(argv[2]) : 433; + + // Load default and OQS providers + // Default provider must be loaded before OQS provider + OSSL_PROVIDER* provider; + provider = OSSL_PROVIDER_load(NULL, "default"); + if (provider == NULL) { + printf("Failed to load Default provider\n"); + exit(0); + } + + OSSL_PROVIDER* custom_provider = OSSL_PROVIDER_load(NULL, "oqsprovider"); + if (custom_provider == NULL){ + printf("Failed to load OQS-provider\n"); + OSSL_PROVIDER_unload(provider); + exit(0); + } + + // load SSL library and dependances + ctx = initSSLContext(client_key, client_pem); + + // make a classic socket to the hostname throught the port + sock = makeClientSocket(hostname, port); + + // create new SSL connection state + ssl = SSL_new(ctx); + + // JS set default groups for key exchange/encapsulation + // Without this function, server will use default X25519 protocol + // First protocol supported by both server and client will be used for KEX/KEM + // Empty DEFAULT_GROUPS or list of unsupported protocol by client will fail communication + if (SSL_set1_groups_list(ssl, DEFAULT_GROUPS) != 1){ + printf("KEX/KEM algorithms undefined unknown - check DEFAULT_GROUPS variable\n"); + ERR_print_errors_fp(stderr); + SSL_free(ssl); + SSL_CTX_free(ctx); + OSSL_PROVIDER_unload(provider); + OSSL_PROVIDER_unload(custom_provider); + exit(0); + } + + // attach the socket descriptor + SSL_set_bio(ssl, sock, sock); + + if (SSL_connect(ssl) == -1) // make the SSL connection + ERR_print_errors_fp(stderr); + else + { + // JS get chosen (negotiated) key exchange/encapsulation algorithm name + printf("Used group (KEM): %s\n", SSL_group_to_name(ssl, SSL_get_negotiated_group(ssl))); + + /* + if the server suddenly wants a new handshake, + OpenSSL handles it in the background. Without this + option, any read or write operation will return an + error if the server wants a new handshake. + */ + SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY); + + char msg[] = "ClientName"; + printf("[+] Cipher used : %s\n", SSL_get_cipher(ssl)); + + // show certificats data + showCerts(ssl); + + // encrypt and send message + SSL_write(ssl, msg, strlen(msg)); + + // get response and decrypt content + bytes = SSL_read(ssl, buf, sizeof(buf)); + buf[bytes] = 0; + printf("[+] Server data received : %s\n", buf); + SSL_shutdown(ssl); + } + + // release SSL connection state + SSL_free(ssl); + + // release SSL's context + SSL_CTX_free(ctx); + // JS Unload both providers + OSSL_PROVIDER_unload(provider); + OSSL_PROVIDER_unload(custom_provider); + return 0; +} diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/CLIENT/client.key b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/CLIENT/client.key new file mode 100644 index 0000000..5530dc4 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/CLIENT/client.key @@ -0,0 +1,48 @@ +-----BEGIN PRIVATE KEY----- +MIIIlgIBADAHBgUrzg8DBgSCCIYEggiCWQAuggQPvwR+gw/ROxCfAA+QvPgBxPvh +hPvhfhe/vRexAvwPvPifCvfAgQPAuBgAgwPOwggwBP++O/g+/hQfv+//O/vP/xBh +vwBhigv/P/efAwQeQRQgBPxAQQP/wRfAgQPQuxAvSBQvxuwfPfuAAAwvgfhPRAvf +AeggAev/AAfAvhfRvxg+wgAvxvuegf/fvgBPgQwg/fQQwAOQPPgvvQvhQhQfgARO +PPhPP/hus+yAewRRvwvgAfh+gdgfeQfQQwPgewAfPfhPAwfewRgAvwwgAQuuPwvw +ROwwAPyAAPPAugAgAQC/AQewwAAxOvuvuwBxBPwP+g9uwPStgfwPuQQBPPuwAvBy +BQf9fhdPAfwPAv/wgwvPxf+vNt/BOARO/AAwvvvvff/QwghO/AgPAQvww/wfAQvu +wxSgP/QvgBP/wgQgDQvPQ/Afffv/fxgBvxOuvwevfwf/wwQ/gPQRPfPBhfgfAeww +AB/Px/+vRP/APu+wguQgBRQgRwft/uw/gBfxP+fhuQOwPfvQQAe+uAhgQgwAQPfg +BvQAeiPCA/PvA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iW0vzsiWSa9INhx7RFHoLE1M+bugh3GwKC7UdpSGeRjbBJ8iLw3E +f0o+yxu83dmF+1t3Ou6sYMuV4rc5ZEvSYOMb1eOBnq/EAQLyGrUAoFCq8eSZyv4x +baDh+N1Js4mjB+bGVClWNFMCHn6oTYZXSK17E1xmtU3Pd75FsysU29YD6k0VgeJV +C7HCcz6YzxxUeRIGJi2xcQVwMGKMfQhYoaqOxA4AK+ZV5CqfXbKivaQi +-----END PRIVATE KEY----- diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/CLIENT/client.pem b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/CLIENT/client.pem new file mode 100644 index 0000000..3dba5ff --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/CLIENT/client.pem @@ -0,0 +1,43 @@ +-----BEGIN CERTIFICATE----- +MIIHjDCCBOmgAwIBAgIUSaqkQplPGf1X7L8bQu6ywQZ2gGwwBwYFK84PAwYwZTEL +MAkGA1UEBhMCVVMxEzARBgNVBAgMCkZha2UgU3RhdGUxFjAUBgNVBAcMDUZha2Ug +TG9jYWxpdHkxFTATBgNVBAoMDEZha2UgQ29tcGFueTESMBAGA1UEAwwJbG9jYWwu +ZGV2MB4XDTI0MDIyMzA5NDAxMFoXDTI5MDIyMTA5NDAxMFowZTELMAkGA1UEBhMC +VVMxEzARBgNVBAgMCkZha2UgU3RhdGUxFjAUBgNVBAcMDUZha2UgTG9jYWxpdHkx +FTATBgNVBAoMDEZha2UgQ29tcGFueTESMBAGA1UEAwwJbG9jYWwuZGV2MIIDjzAH +BgUrzg8DBgOCA4IACVZJpvTSzbO/eq72xQ9lsjB3BD0oN30S8wAjSg0K6PV3HMaQ +SFzZNnvFaLeRJMX7ogyu8WUbBZ3WktLOZ6+KAmxWwpU4wAWVxXPoZ8PVoZ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PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/SERVER/server.c b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/SERVER/server.c new file mode 100644 index 0000000..467e96f --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/SERVER/server.c @@ -0,0 +1,394 @@ +/* + JS 2024-04-11 testovane s OpenSSL 3.3.0, liboqs 0.10.0 a oqs-provider 0.6.0 +*/ +/* + JS 2024-04-11 testovane s OpenSSL 3.3.0, liboqs 0.10.0 a oqs-provider 0.5.3 +*/ +/* + JS 2024-03-04 - doplnenie funkcii pre uvolnenie nacitanych providerov +*/ +/* + JS 2024-02-24 - funkcia initSSLContext() rozsirena o nacitanie OQS-providera + pre plne funkcne PQ algoritmy na kazdej platforme + - doplnene priklady nastavenia premennej DEFAULT_GROUPS + - testovane s oqsprovider 0.5.3 +*/ +/* + JS 2024-02-17 - testovanie PQ algoritmov s pouzitim oqs-providera + - uprava vypisu o pripojeni klienta + - pridane vypisy s informaciami o pouzivanych algoritmoch + pre KEX a certifikaty + - oprava kontroly navratovej hodnoty funkcii + SSL_CTX_use_certificate_file() a SSL_CTX_use_PrivateKey_file +*/ + +/* + JS 2024-02-08 testovane s aktualnou najnovsou verziou OpenSSL 3.2.1 +*/ + +/* + Name: Martin Janitor + Subject: DP1 + Description: Implemenation SSL/TLS [SERVER] connection with usage of BIO structure + Date: 2023-06-28 +*/ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +/* +Premenna na definovanie "exchange groups", algoritmov na vymenu klucov +Server moze podporovat viacero KEX/KEM algoritmov, v premennej musi byt kazdy +algoritmus oddeleny dvojbodkou, napr. "kyber512:bikel1" +Podporovane algoritmy je mozne ziskat prikazom "openssl list -kem-algorithms" +Prazdna premenna alebo naplnena neplatnymi protokolmi sposobi prerusenie aplikacie + +Ak server a klient nenajdu spolocny KEX/KEM protokol, tak +SSL vyhodi chybu SSL routines:final_key_share:no suitable key share + +Priklad pouzitia: +- klasicke algoritmy: "x25519:x448:prime256v1:secp521r1:secp384r1:ffdhe2048:ffdhe3072" +- PQ algoritmy: "kyber512:kyber768:kyber1024:bikel1:bikel3:bikel5:hqc128:hqc192:hqc256:frodo640aes:frodo640shake:frodo976aes:frodo976shake:frodo1344aes:frodo1344shake" +- hybrid algoritmy: "x25519_kyber768:x25519_frodo640aes:x25519_hqc128:x448_bikel3:x448_kyber768:p256_kyber768" + +Podporovane algoritmy OQS-providerom: https://github.com/open-quantum-safe/oqs-provider/blob/0.6.0/ALGORITHMS.md + +POZOR - BIKE protokol nefunguje na Windows platforme (liboqs 0.10.0, oqs-provider 0.6.0) + +*/ +#define DEFAULT_GROUPS "kyber768:frodo976aes:kyber1024" + +#define DEFAULT_PORT 443 + + +/** + * printUsage function who describe the utilisation of this script. + * @param char* bin: the name of the current binary. + */ +void printHeader(char* bin){ + // JS update + printf("[?] Usage: %s ]\n", bin); + return; +} + +/** + * makeServerSocket function who create a BIO structure for socket + * @param int port : the port to listen + * @return int socket : the socket number created + */ +BIO* makeServerSocket(int port){ + + char buffer[5]; + memset(buffer,'\0',5); + sprintf(buffer,"%d",port); + + BIO* accept_bio = BIO_new_accept(buffer); + if (accept_bio == NULL){ + fprintf(stderr, "Error creating accept BIO\n"); + return NULL; + } + + printf("\n"); + printf("[+] Server listening on the %d port...\n", port); + printf("[+] Waiting for connection\n"); + return accept_bio; +} + + +/** JS update + * initSSLContext function who initialize the SSL/TLS engine with right method/protocol + * SSL/TLS engine provided by PQ algorithms functions of OQS provider + * @return SSL_CTX *ctx : a pointer to the SSL context created +*/ +SSL_CTX* initSSLContext(){ + const SSL_METHOD *method; + SSL_CTX *ctx; + + // initialize the SSL library + SSL_library_init(); + SSL_load_error_strings(); + OpenSSL_add_all_algorithms(); + + // MJ only TLS connection + method = TLS_server_method(); + + // create new context from selected method + ctx = SSL_CTX_new(method); + if(ctx == NULL){ + ERR_print_errors_fp(stderr); + abort(); + } + + return ctx; +} + +/** + * loadCertificates function who load private key and certificat from files. + * 3 mecanisms available : + * - loading certificate and private key from file(s) + * - use embed hardcoded certificate and private key in the PEM format + * @param SSL_CTX* ctx : the SSL/TLS context + * @param char *server_pem : filename of the PEM certificat + * @param char *server_key : filename of the PEM private key + */ +void loadCertificates(SSL_CTX* ctx, const char* server_pem, const char* server_key){ + + +if (SSL_CTX_use_certificate_file(ctx, server_pem, SSL_FILETYPE_PEM) != 1 || + // namiesto MD SSL_CTX_use_RSAprivateKey_file + SSL_CTX_use_PrivateKey_file(ctx, server_key, SSL_FILETYPE_PEM) != 1) + { + + ERR_print_errors_fp(stderr); + abort(); + } + else + printf("[*] Server's certificat and private key loaded from file.\n"); + + // verify private key match the public key into the certificate + if(!SSL_CTX_check_private_key(ctx)){ + fprintf(stderr, "[-] Private key does not match the public certificate...\n"); + abort(); + } + else{ + printf("[+] Server's private key match public certificate\n"); + } + + // JS get server's signature algorithm name + X509 *cert = SSL_CTX_get0_certificate(ctx); + int pknid; + if (X509_get_signature_info(cert, NULL, &pknid, NULL, NULL) != 1){ + printf("Certificate signature algorithm: Unknown algorithm"); + } + else{ + printf("Certificate signature algorithm: %s\n", OBJ_nid2sn(pknid)); + } + + // MD kod na autentizaciu klienta + #ifdef AUTHENTICATION + + SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER|SSL_VERIFY_FAIL_IF_NO_PEER_CERT, NULL); + + // load the trusted client CA certificate into context + if (SSL_CTX_load_verify_locations(ctx, "myCA.pem", NULL) != 1) + { + fprintf(stderr, "[-] CA certificate not loaded...\n"); + abort(); + } + #endif + + return; +} + +/** + * showCerts function who catch and print out certificate's data from the client. + * @param SSL* ssl : the SSL/TLS connection + */ +void showCerts(SSL *ssl) +{ + X509 *cert; + char *subject, *issuer; + + // get the client's certificate + cert = SSL_get_peer_certificate(ssl); + + // get certificate info + if (cert != NULL){ + // get certificate's subject + subject = X509_NAME_oneline(X509_get_subject_name(cert), 0, 0); + // get certificate's issuer + issuer = X509_NAME_oneline(X509_get_issuer_name(cert), 0, 0); + + printf("[+] Client certificates :\n"); + printf("\tSubject: %s\n", subject); + printf("\tIssuer: %s\n", issuer); + printf("[+] Cipher used : %s\n", SSL_get_cipher(ssl)); + + // Free memory + free(subject); + free(issuer); + X509_free(cert); + } + else + printf("[-] No client's certificates\n"); + return; +} + +/** + * routine function who treat the content of data received and reply to the client. + * this function is threadable and his context sharedable. + * @param SSL* ssl : the SSL/TLS connection + */ +void routine(SSL* ssl) +{ + char buf[1024 / 2], reply[1024]; + + int bytes; + const char *echo = "Enchante %s, je suis ServerName.\n"; + + // accept SSL/TLS connection + if (SSL_accept(ssl) == -1) + ERR_print_errors_fp(stderr); + else{ + + // JS get chosen (negotiated) key exchange/encapsulation algorithm name + printf("Used group (KEM): %s\n", SSL_group_to_name(ssl, SSL_get_negotiated_group(ssl))); + + // JS get client's certificate algorithm name + int nid; + SSL_get_peer_signature_type_nid(ssl, &nid); + printf("Peer signature name: %s\n", OBJ_nid2sn(nid)); + + // show certificates data + showCerts(ssl); + + // read data from client request + bytes = SSL_read(ssl, buf, sizeof(buf)); + if (bytes > 0){ + buf[bytes] = 0; + printf("[+] Client data received: %s\n", buf); + + // construct response + sprintf(reply, echo, buf); + // send response + SSL_write(ssl, reply, strlen(reply)); + } + else{ + switch (SSL_get_error(ssl, bytes)){ + case SSL_ERROR_ZERO_RETURN: + printf("SSL_ERROR_ZERO_RETURN : "); + break; + case SSL_ERROR_NONE: + printf("SSL_ERROR_NONE : "); + break; + case SSL_ERROR_SSL: + printf("SSL_ERROR_SSL : "); + break; + } + ERR_print_errors_fp(stderr); + } + } + + SSL_shutdown(ssl); + SSL_free(ssl); +} + + +/** + * main function who coordinate the socket and SSL connection creation, then receive and + emit data to and from the client. + */ +int main(int argc, char **argv){ + BIO* sock; + int port; + SSL_CTX *ctx; + const char *server_pem, *server_key; + + if(argc != 4){ + printHeader(argv[0]); + exit(0); + } + + // Select PORT number + port = (atoi(argv[1]) > 0 && atoi(argv[1]) < 65535) ? atoi(argv[1]) : DEFAULT_PORT; + + // Load default and OQS providers + // Default provider must be loaded before OQS provider + OSSL_PROVIDER* provider; + provider = OSSL_PROVIDER_load(NULL, "default"); + if (provider == NULL) { + printf("Failed to load Default provider\n"); + exit(0); + } + + OSSL_PROVIDER* custom_provider = OSSL_PROVIDER_load(NULL, "oqsprovider"); + if (custom_provider == NULL){ + OSSL_PROVIDER_unload(provider); + printf("Failed to load OQS-provider\n"); + exit(0); + } + + // load SSL library and dependances + ctx = initSSLContext(); + server_pem = argv[2]; + server_key = argv[3]; + + // load certificats and keys + loadCertificates(ctx, server_pem, server_key); + + // make a classic server socket + sock = makeServerSocket(port); + + // Pridane na skusku od predosleho + BIO_set_bind_mode(sock, BIO_BIND_REUSEADDR); + + if (BIO_do_accept(sock) <= 0) + ERR_print_errors_fp(stderr); + + while (1) + { + // Accept incoming connection + if (BIO_do_accept(sock) <= 0) + { + ERR_print_errors_fp(stderr); + break; + } + + printf("\n"); + + // Create a new BIO object + BIO *conn = BIO_pop(sock); + if (conn == NULL){ + ERR_print_errors_fp(stderr); + break; + } + + // JS added info about connected client (IP) + printf("Connection of client %s accepted\n", BIO_get_peer_name(sock)); + + // Create a new SSL object + SSL *ssl = SSL_new(ctx); + if (ssl == NULL){ + ERR_print_errors_fp(stderr); + BIO_free(conn); + break; + } + + // JS set key exchange/encapsulation protocols supported by server + // Without this function, client will use default X25519 protocol + // First protocol supported by both server and client will be used for KEX/KEM + // Empty DEFAULT_GROUPS or list of unsupported protocol by server will fail communication + if (SSL_set1_groups_list(ssl, DEFAULT_GROUPS) != 1){ + printf("KEX/KEM algorithms undefined unknown - check DEFAULT_GROUPS variable\n"); + ERR_print_errors_fp(stderr); + BIO_free(conn); + break; + } + + // Assign the SSL object to the connection BIO + SSL_set_bio(ssl, conn, conn); + + routine(ssl); + // JS remove break if you want server running in loop + break; + } + + SSL_CTX_free(ctx); + // JS Unload both providers + OSSL_PROVIDER_unload(provider); + OSSL_PROVIDER_unload(custom_provider); + BIO_free_all(sock); + return 0; +} + diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/SERVER/server.key b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/SERVER/server.key new file mode 100644 index 0000000..960d7a5 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/SERVER/server.key @@ -0,0 +1,48 @@ +-----BEGIN PRIVATE KEY----- +MIIIlgIBADAHBgUrzg8DBgSCCIYEggiCWQAOQ+/BACAfAAfAwgvfgQQRivydw+wR +fAQgwgRwAvQi+ggA/vwAgvhfQiAxev/egfvBBeSgBugPfQefxvfufwfAAQAAhQeA +u//wQhCBOwfPfQAQhQAhBPf/vRBePhxPgxefN/AgQSSvfBfe/P+ufQheQwu/vgQ/ +wvf/AQ/vfvQRifBPvfAAw/hBAwwwAxgfRfAv+uAgf/QfgAuRAOOPPQB/fR/whNwx +//APPSQw/vwAAff+uRBfuwgv/xAuAABOwwf//e/xCBfgPw///ftwRRAffQQQgPgv +PfQ/wfffwgPAfCRgQwPw/vgCQhgPPuyxAeAQf/PRQvwxtgAexBO/whAwQBABgQgR +QAs/9evAvfNACfwOgxBRACvRuRPNgOwPwgeduyAvAPAAQ/vguhxB//wORxQfPPv+ +vgQRABxBPxwRxfvQBP/QwQ/+/PQRAQPvfSQfAge/QBA/OxOvgvgdQAhfAhg+wf+Q +BCvwP/wQggAQhfRRBBBwRQfegg/h/fvxQhBvuwewfQPv+uQBAggQQf+Agu/B8+gN +hPxPgBPBPugPPAwgP/uuQQgABghRwAxPwwiOAuvQOSAghBPgQPwNfwwg+gfv//vf +fgA+/f/uxOwQAP/BAhQvjPxf/uBQPgevdAgPgfBRgBAfQQQvvggBPwgudvxvhv/x +A/MgwQhgePgwQxfQA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nCl1LFREigyoRilcDV8M+IZ/o95qCu17r8hfJaKdANrNvVjyvCb+zCx3zsUbDBXI +Rl2j10ebgliRiQGSFWqlfu30Ty5kBL2xyF1NDYnMkbUWYd2SQXapOyOZ +-----END PRIVATE KEY----- diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/SERVER/server.pem b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/SERVER/server.pem new file mode 100644 index 0000000..a130c18 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/SERVER/server.pem @@ -0,0 +1,43 @@ +-----BEGIN CERTIFICATE----- +MIIHiTCCBOmgAwIBAgIUSaqkQplPGf1X7L8bQu6ywQZ2gG0wBwYFK84PAwYwZTEL +MAkGA1UEBhMCVVMxEzARBgNVBAgMCkZha2UgU3RhdGUxFjAUBgNVBAcMDUZha2Ug +TG9jYWxpdHkxFTATBgNVBAoMDEZha2UgQ29tcGFueTESMBAGA1UEAwwJbG9jYWwu +ZGV2MB4XDTI0MDIyMzA5NDAxMFoXDTI5MDIyMTA5NDAxMFowZTELMAkGA1UEBhMC +VVMxEzARBgNVBAgMCkZha2UgU3RhdGUxFjAUBgNVBAcMDUZha2UgTG9jYWxpdHkx +FTATBgNVBAoMDEZha2UgQ29tcGFueTESMBAGA1UEAwwJbG9jYWwuZGV2MIIDjzAH +BgUrzg8DBgOCA4IACTGe2QB0pUqoEha1+VtNfJUHwiNB5ToyqfiHRJh/DSCidpe0 +u1VYxFBlJqmNZht4WqIfeQOy4kbqKWEpReje1kqpTrfmHb2IVdDDA0cKb0kE+qAQ +szNhE9Z9aoEsse81hBVWp1SwG4HbfF990nTUJ/YTAnVSSyRYLRGm6RMoqqL0ruae +mf65uaqJL8X1TRJwY17v8oF+ApQUCWkwHvpAq2BZWLHZs7eBxlEA2JdZXLS4wY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KPADnHeGlvw2iL/4DsrXZKHw6+ +x9De5cOsjpkpCdG8DmVi+lb6/CPkZhjCPKxiXIeMYyvzNIzW8Wr8fuQ4yWMwaySD +rwBHlNRGREXYNr0mNxQtv3Y9WUmK6lCk5bLYS7Kxz0xmNvyJSZE5do0UhInrojmY +xh7ceLHNh1UmdPnOXTY7prbsHSl807b/pfKPUnOCZdryr/9S5nhXXL+QlCaabyCe +luU0Lf3J5mKMxZnaf+WPKArlrQBW4R0NG3y4VjVc2C5o4e2p1u+ZdqMnS2zu7EVi +2bajkdCcI+1fFvkFQ7U7hVe7HMw+jSOgpf1X3m6Mw9GaT7Hsh02mzo0psEWMAj6k +2niKxaGpP7ppvIpEyt5o8zkk3L+qvOjuJwj0XTZ2dvELMxAI9IOGtURaOaZHs4Kq +p9WuJyMcfhuOW07clXgRbfLnoJII9ATCa8isjFsamWJl0FSv9FJtZc1asYfhNsLn +vEdtet8RJDqnYcxPSiM5ty+whlNblvsz+GcOGZOx8P6mK5axqtXGQOn+dmrB6pi/ ++hUaonGRRZxdoQ11A7tw1B0LJGJiiTxuxkz0OroF6UOE7esJQ0kB7CacHfXvYwgn +WTCYyGgYAOxaHodbep+0fdTwkpIYa0Co5BcKy+mrkykx0zMx1ru04fhr80fyM3iS +STFnsajH5LitpiuppxtYDDtW5ch5t5Y9H47pouSz7zl9Gahap89qyMFffNF+D5fb +iGHW+cwxGII6tOzjO+LXefVZTWTMLTbVJXSkYlMfNDk6o5y+aVHGru2dc0lVI4oU +4TkU2DYqNkhs0l7Lyz2ZpSuCkUOhshbEzT+cRT6SVkbQ/kiZBMonF0b+Tw41yr3V +i8Jgnmcsib8TOaRwYA== +-----END CERTIFICATE----- diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/comp_client.bat b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/comp_client.bat new file mode 100644 index 0000000..69aa73e --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/comp_client.bat @@ -0,0 +1,9 @@ +:: Name: Martin Janitor +:: Subject: DP1 +:: Description: compilation for client.c file +:: Date: 2023-07-05 + +rem prikazy na prelozenie a linkovanie EXE programov s vyuzitim OpenSSL kniznice nainstalovanej v obraze BPS_PS +:: MJ Pridanie makra AUTHENTICATION pre autentizaciu klienta, ak nie je nutne autentizovat klienta staci zmazat -DAUTHENTICATION z procesu kompilacie + +gcc -Wall -Wextra -o client_run ./CLIENT/client.c -lcrypto -lssl -I C:\OPENSSL\include -L C:\OPENSSL\lib -lws2_32 -DAUTHENTICATION \ No newline at end of file diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/comp_server.bat b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/comp_server.bat new file mode 100644 index 0000000..a6a732a --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/comp_server.bat @@ -0,0 +1,9 @@ +:: Name: Martin Janitor +:: Subject: DP1 +:: Description: compilation for server.c file +:: Date: 2023-07-05 + +rem prikazy na prelozenie a linkovanie EXE programov s vyuzitim OpenSSL kniznice nainstalovanej v obraze BPS_PS +:: MJ Pridanie makra AUTHENTICATION pre autentizaciu klienta, ak nie je nutne autentizovat klienta staci zmazat -DAUTHENTICATION z procesu kompilacie + +gcc -Wall -Wextra -o server_run ./SERVER/server.c -lcrypto -lssl -I C:\OPENSSL\include -L C:\OPENSSL\lib -lws2_32 -DAUTHENTICATION \ No newline at end of file diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/makefile b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/makefile new file mode 100644 index 0000000..13b95f0 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/makefile @@ -0,0 +1,30 @@ +# Makefile created by Martin Janitor +# DP1 +# 9.5.2023 + +CC=gcc +CFLAGS=-Wall -Wextra +LIBS= -lcrypto -lssl +SRC_CLIENT= ./CLIENT/ +SRC_SERVER= ./SERVER/ +OPTIONAL= -DAUTHENTICATION + +ifeq ($(OS),Windows_NT) + # Windows-specific options + LIBS += -I C:\OPENSSL\include -L C:\OPENSSL\lib -lws2_32 +endif + +#I C:\BATCHES\include +#L C:\BATCHES\lib + +all: server_run client_run + +server_run: $(SRC_SERVER)server.c + $(CC) $(CFLAGS) -o server_run $(SRC_SERVER)server.c $(LIBS) $(OPTIONAL) + +client_run: $(SRC_CLIENT)client.c + $(CC) $(CFLAGS) -o client_run $(SRC_CLIENT)client.c $(LIBS) $(OPTIONAL) + +clean: + rm -f server client + del server.exe client.exe \ No newline at end of file diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/myCA.pem b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/myCA.pem new file mode 100644 index 0000000..d1e472e --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/myCA.pem @@ -0,0 +1,42 @@ +-----BEGIN CERTIFICATE----- +MIIHdzCCBNmgAwIBAgIUWXaR57uTKy4p1O4cX1NPjeafBsQwBwYFK84PAwYwZTEL +MAkGA1UEBhMCVVMxEzARBgNVBAgMCkZha2UgU3RhdGUxFjAUBgNVBAcMDUZha2Ug +TG9jYWxpdHkxFTATBgNVBAoMDEZha2UgQ29tcGFueTESMBAGA1UEAwwJbG9jYWwu +ZGV2MB4XDTI0MDIyMzA5NDAxMFoXDTI5MDIyMTA5NDAxMFow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w1sXNmET+8L0lsmULKCuNyxPH7VI/WcoVP2k +vGvm+TW6utmwaZ0hr8FX3Mv0B3UHXbR6lIvs4sp/MJS3mZWS0eY1Wh3TwTTiyBOu +IsE4yND/v/u8caAlXw4bkbx5DwotdsdwMbgvlN7bpsvg/7sJKtjOXu2PDFSgezGZ +pGP7vHrzUEjc84X9freSJr08QLUd9ESpT2Ra+uMowbKECRyR0Np30ajBQA== +-----END CERTIFICATE----- diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/schematic.svg b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/schematic.svg new file mode 100644 index 0000000..63a2141 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/schematic.svg @@ -0,0 +1,4 @@ + + + +

main()

main()
KLIENT
KLIENT
initSSLContext()
initSSLContext()
makeClientSocket()
makeClientSocket()
SSL_connect()
SSL_connect()
showCerts()
showCerts()
SSL_write()
SSL_write()
SSL_read()
SSL_read()
SSL_shutdown()
SSL_shutdown()
TLS_client_method()
TLS_client...
SSL_CTX_new()
SSL_CTX_new()
SSL_CTX_use_certificate_file()
SSL_CTX_use_certificate_file()
SSL_get_peer_certificate()
SSL_get_peer_certificate()
SSL_get_verify_result()
SSL_get_verify_result()

main()

main()
SERVER
SERVER
initSSLContext()
initSSLContext()
loadCertificates()
loadCertificates()
routine()
routine()
TLS_client_method()
TLS_client...
SSL_CTX_new()
SSL_CTX_ne...
BIO_new_accept()
BIO_new_accept()
SSL_CTX_use_certificate_file()
SSL_CTX_use_certificate_file()
SSL_CTX_use_PrivateKey_file()
SSL_CTX_use_PrivateKey_file()
SSL_CTX_check_private_key()
SSL_CTX_check_private_key()
 SSL_CTX_set_verify()
 SSL_CTX_set_verify()
SSL_CTX_load_verify_locations()
SSL_CTX_load_verify_locations()
makeServerSocket()
makeServerSocket()
SSL_accept()
SSL_accept()
showCerts()
showCerts()
SSL_get_peer_certificate()
SSL_get_peer_certificate()
SSL_read()
SSL_read()
SSL_write()
SSL_write()
SSL_get_fd()
SSL_get_fd()
SSL_shutdown()
SSL_shutdown()
SSL_CTX_use_PrivateKey_file()
SSL_CTX_use_PrivateKey_file()
SSL_CTX_check_private_key()
SSL_CTX_check_private_key()
Autentizácia klienta
Autentizácia klienta
Nezašifrovaná komunikácia
Nezašifrovaná komunikácia
Zašifrovaná komunikácia
Zašifrovaná komunikácia
SSL_library_init()
SSL_load_error_strings()
OpenSSL_add_all_algorithms()
SSL_library_init()...
SSL_set_bio()
SSL_set_bio()
 SSL_set_mode()
 SSL_set_mode()
SSL_library_init()
SSL_load_error_strings()
OpenSSL_add_all_algorithms()
SSL_library_init()...

PROJECT = CLIENT_SERVER_SECURE_BIO

PROJECT = CLIENT_SERVER_SECURE_BIO
1. Inicializácia OpenSSL knižnice
2. Vytvorenie nového SSL/TLS kontextu. obsahujúceho
konfiguračné a kryptografické parametre potrebné pre
vytvorenie a udržiavanie SSL/TLS pripojenia
1. Inicializácia OpenSSL k...
1. Načítanie digitálneho certifikátu
2. Načítanie súkromného kľúča do SSL_CTX objektu.
3. Overenie súkromného kľúča
1. Načítanie digitálneho ce...
1. Vytvorenie BIO objektu pre sieťovú komunikáciu
1. Vytvorenie BIO objektu...
1.Iniciovanie SSL/TLS handshaku so vzdialeným serverom. Vytvára zabezpečené, šifrované spojenie medzi klientoma serverom pomocou protokolu SSL/TLS
2. Nastavenie módu pre SSL/TLS
1.Iniciovanie SSL/TLS hand...
1. Načítanie údajov z digitálneho certifikátu
2. Overenie digitálneho certifikátu
1. Načítanie údajov z digit...
1. Zašifrovanie a odoslanie dát do za definovaného socketu
2. Načítanie a dešifrovanie dostupných dát
3. Ukončenie SSL/TLS spojenia
1. Zašifrovanie a odoslanie...
1. Nastavenie režimu overenia diditálnych certifikátov
2. Načítanie CA zo súboru a vloženie do SSL_CTX štruktúry
1. Nastavenie režimu overen...
1. Vytvorenie BIO objektu pre zviazanie soketu pre prijímajúce spojenia
2. Prijímanie BIO spojení
1. Vytvorenie BIO objektu...
BIO_new_connect()
BIO_new_connect()
BIO_set_bind_mode()
BIO_set_bind_mode()
BIO_do_accept()
BIO_do_accept()
while(1) loop
while(1) loop
BIO_do_accept()
BIO_do_accept()
BIO_pop()
BIO_pop()
SSL_new()
SSL_new()
SSL_set_bio()
SSL_set_bio()
1. Zahájenie sieťového spojenia
2. Vypráznenie zásobika BIO štruktúry
3. Vytvorenie nového SSL spojenia
1. Zahájenie sieťového spoj...
1. Inicializovanie SSL/TLS handshaku
1. Inicializovanie SSL/TLS...
Text is not SVG - cannot display
\ No newline at end of file diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/start_client.bat b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/start_client.bat new file mode 100644 index 0000000..1c26571 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/start_client.bat @@ -0,0 +1,7 @@ +:: Name: Martin Janitor +:: Subject: DP1 +:: Description: run client .bat file +:: Date: 2023-07-05 + +rem testovanie spojenia klient server na lokalhost adrese s vyuzitim portu 5000 +client_run 127.0.0.1 5000 ./CLIENT/client.key ./CLIENT/client.pem diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/start_server.bat b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/start_server.bat new file mode 100644 index 0000000..2bc61e0 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/CLIENT_SERVER_SECURE_BIO/start_server.bat @@ -0,0 +1,7 @@ +:: Name: Martin Janitor +:: Subject: DP1 +:: Description: run server.bat file +:: Date: 2023-07-05 + +rem Spustenie servra, ktory "pocuva" na porte 5000 +server_run 5000 ./SERVER/server.pem ./SERVER/server.key diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/dokumentacia.pdf b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/dokumentacia.pdf new file mode 100644 index 0000000..d9e7dab Binary files /dev/null and b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/dokumentacia.pdf differ diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/oqsprovider/README.txt b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/oqsprovider/README.txt new file mode 100644 index 0000000..9b036f2 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/oqsprovider/README.txt @@ -0,0 +1,54 @@ +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 + +Cely postup je dostupny online: +https://git.kemt.fei.tuke.sk/js331zc/MastersThesis/src/branch/master/OpenSSL_liboqs_oqsprovider + +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. diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/oqsprovider/openssl.cnf b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/oqsprovider/openssl.cnf new file mode 100644 index 0000000..1c96969 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/oqsprovider/openssl.cnf @@ -0,0 +1,394 @@ +# +# OpenSSL example configuration file. +# See doc/man5/config.pod for more info. +# +# This is mostly being used for generation of certificate requests, +# but may be used for auto loading of providers + +# Note that you can include other files from the main configuration +# file using the .include directive. +#.include filename + +# This definition stops the following lines choking if HOME isn't +# defined. +HOME = . + + # Use this in order to automatically load providers. +openssl_conf = openssl_init + +# Comment out the next line to ignore configuration errors +config_diagnostics = 1 + +# Extra OBJECT IDENTIFIER info: +# oid_file = $ENV::HOME/.oid +oid_section = new_oids + +# To use this configuration file with the "-extfile" option of the +# "openssl x509" utility, name here the section containing the +# X.509v3 extensions to use: +# extensions = +# (Alternatively, use a configuration file that has only +# X.509v3 extensions in its main [= default] section.) + +[ new_oids ] +# We can add new OIDs in here for use by 'ca', 'req' and 'ts'. +# Add a simple OID like this: +# testoid1=1.2.3.4 +# Or use config file substitution like this: +# testoid2=${testoid1}.5.6 + +# Policies used by the TSA examples. +tsa_policy1 = 1.2.3.4.1 +tsa_policy2 = 1.2.3.4.5.6 +tsa_policy3 = 1.2.3.4.5.7 + +# For FIPS +# Optionally include a file that is generated by the OpenSSL fipsinstall +# application. This file contains configuration data required by the OpenSSL +# fips provider. It contains a named section e.g. [fips_sect] which is +# referenced from the [provider_sect] below. +# Refer to the OpenSSL security policy for more information. +# .include fipsmodule.cnf + +[openssl_init] +providers = provider_sect + +# List of providers to load +[provider_sect] +default = default_sect +oqsprovider = oqsprovider_sect +# The fips section name should match the section name inside the +# included fipsmodule.cnf. +# fips = fips_sect + +# If no providers are activated explicitly, the default one is activated implicitly. +# See man 7 OSSL_PROVIDER-default for more details. +# +# If you add a section explicitly activating any other provider(s), you most +# probably need to explicitly activate the default provider, otherwise it +# becomes unavailable in openssl. As a consequence applications depending on +# OpenSSL may not work correctly which could lead to significant system +# problems including inability to remotely access the system. +[default_sect] +activate = 1 + +[oqsprovider_sect] +activate = 1 + + +#################################################################### +[ ca ] +default_ca = CA_default # The default ca section + +#################################################################### +[ CA_default ] + +dir = ./demoCA # Where everything is kept +certs = $dir/certs # Where the issued certs are kept +crl_dir = $dir/crl # Where the issued crl are kept +database = $dir/index.txt # database index file. +#unique_subject = no # Set to 'no' to allow creation of + # several certs with same subject. +new_certs_dir = $dir/newcerts # default place for new certs. + +certificate = $dir/cacert.pem # The CA certificate +serial = $dir/serial # The current serial number +crlnumber = $dir/crlnumber # the current crl number + # must be commented out to leave a V1 CRL +crl = $dir/crl.pem # The current CRL +private_key = $dir/private/cakey.pem# The private key + +x509_extensions = usr_cert # The extensions to add to the cert + +# Comment out the following two lines for the "traditional" +# (and highly broken) format. +name_opt = ca_default # Subject Name options +cert_opt = ca_default # Certificate field options + +# Extension copying option: use with caution. +# copy_extensions = copy + +# Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs +# so this is commented out by default to leave a V1 CRL. +# crlnumber must also be commented out to leave a V1 CRL. +# crl_extensions = crl_ext + +default_days = 365 # how long to certify for +default_crl_days= 30 # how long before next CRL +default_md = default # use public key default MD +preserve = no # keep passed DN ordering + +# A few difference way of specifying how similar the request should look +# For type CA, the listed attributes must be the same, and the optional +# and supplied fields are just that :-) +policy = policy_match + +# For the CA policy +[ policy_match ] +countryName = match +stateOrProvinceName = match +organizationName = match +organizationalUnitName = optional +commonName = supplied +emailAddress = optional + +# For the 'anything' policy +# At this point in time, you must list all acceptable 'object' +# types. +[ policy_anything ] +countryName = optional +stateOrProvinceName = optional +localityName = optional +organizationName = optional +organizationalUnitName = optional +commonName = supplied +emailAddress = optional + +#################################################################### +[ req ] +default_bits = 2048 +default_keyfile = privkey.pem +distinguished_name = req_distinguished_name +attributes = req_attributes +x509_extensions = v3_ca # The extensions to add to the self signed cert + +# Passwords for private keys if not present they will be prompted for +# input_password = secret +# output_password = secret + +# This sets a mask for permitted string types. There are several options. +# default: PrintableString, T61String, BMPString. +# pkix : PrintableString, BMPString (PKIX recommendation before 2004) +# utf8only: only UTF8Strings (PKIX recommendation after 2004). +# nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings). +# MASK:XXXX a literal mask value. +# WARNING: ancient versions of Netscape crash on BMPStrings or UTF8Strings. +string_mask = utf8only + +# req_extensions = v3_req # The extensions to add to a certificate request + +[ req_distinguished_name ] +countryName = Country Name (2 letter code) +countryName_default = AU +countryName_min = 2 +countryName_max = 2 + +stateOrProvinceName = State or Province Name (full name) +stateOrProvinceName_default = Some-State + +localityName = Locality Name (eg, city) + +0.organizationName = Organization Name (eg, company) +0.organizationName_default = Internet Widgits Pty Ltd + +# we can do this but it is not needed normally :-) +#1.organizationName = Second Organization Name (eg, company) +#1.organizationName_default = World Wide Web Pty Ltd + +organizationalUnitName = Organizational Unit Name (eg, section) +#organizationalUnitName_default = + +commonName = Common Name (e.g. server FQDN or YOUR name) +commonName_max = 64 + +emailAddress = Email Address +emailAddress_max = 64 + +# SET-ex3 = SET extension number 3 + +[ req_attributes ] +challengePassword = A challenge password +challengePassword_min = 4 +challengePassword_max = 20 + +unstructuredName = An optional company name + +[ usr_cert ] + +# These extensions are added when 'ca' signs a request. + +# This goes against PKIX guidelines but some CAs do it and some software +# requires this to avoid interpreting an end user certificate as a CA. + +basicConstraints=CA:FALSE + +# This is typical in keyUsage for a client certificate. +# keyUsage = nonRepudiation, digitalSignature, keyEncipherment + +# PKIX recommendations harmless if included in all certificates. +subjectKeyIdentifier=hash +authorityKeyIdentifier=keyid,issuer + +# This stuff is for subjectAltName and issuerAltname. +# Import the email address. +# subjectAltName=email:copy +# An alternative to produce certificates that aren't +# deprecated according to PKIX. +# subjectAltName=email:move + +# Copy subject details +# issuerAltName=issuer:copy + +# This is required for TSA certificates. +# extendedKeyUsage = critical,timeStamping + +[ v3_req ] + +# Extensions to add to a certificate request + +basicConstraints = CA:FALSE +keyUsage = nonRepudiation, digitalSignature, keyEncipherment + +[ v3_ca ] + + +# Extensions for a typical CA + + +# PKIX recommendation. + +subjectKeyIdentifier=hash + +authorityKeyIdentifier=keyid:always,issuer + +basicConstraints = critical,CA:true + +# Key usage: this is typical for a CA certificate. However since it will +# prevent it being used as an test self-signed certificate it is best +# left out by default. +# keyUsage = cRLSign, keyCertSign + +# Include email address in subject alt name: another PKIX recommendation +# subjectAltName=email:copy +# Copy issuer details +# issuerAltName=issuer:copy + +# DER hex encoding of an extension: beware experts only! +# obj=DER:02:03 +# Where 'obj' is a standard or added object +# You can even override a supported extension: +# basicConstraints= critical, DER:30:03:01:01:FF + +[ crl_ext ] + +# CRL extensions. +# Only issuerAltName and authorityKeyIdentifier make any sense in a CRL. + +# issuerAltName=issuer:copy +authorityKeyIdentifier=keyid:always + +[ proxy_cert_ext ] +# These extensions should be added when creating a proxy certificate + +# This goes against PKIX guidelines but some CAs do it and some software +# requires this to avoid interpreting an end user certificate as a CA. + +basicConstraints=CA:FALSE + +# This is typical in keyUsage for a client certificate. +# keyUsage = nonRepudiation, digitalSignature, keyEncipherment + +# PKIX recommendations harmless if included in all certificates. +subjectKeyIdentifier=hash +authorityKeyIdentifier=keyid,issuer + +# This stuff is for subjectAltName and issuerAltname. +# Import the email address. +# subjectAltName=email:copy +# An alternative to produce certificates that aren't +# deprecated according to PKIX. +# subjectAltName=email:move + +# Copy subject details +# issuerAltName=issuer:copy + +# This really needs to be in place for it to be a proxy certificate. +proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo + +#################################################################### +[ tsa ] + +default_tsa = tsa_config1 # the default TSA section + +[ tsa_config1 ] + +# These are used by the TSA reply generation only. +dir = ./demoCA # TSA root directory +serial = $dir/tsaserial # The current serial number (mandatory) +crypto_device = builtin # OpenSSL engine to use for signing +signer_cert = $dir/tsacert.pem # The TSA signing certificate + # (optional) +certs = $dir/cacert.pem # Certificate chain to include in reply + # (optional) +signer_key = $dir/private/tsakey.pem # The TSA private key (optional) +signer_digest = sha256 # Signing digest to use. (Optional) +default_policy = tsa_policy1 # Policy if request did not specify it + # (optional) +other_policies = tsa_policy2, tsa_policy3 # acceptable policies (optional) +digests = sha1, sha256, sha384, sha512 # Acceptable message digests (mandatory) +accuracy = secs:1, millisecs:500, microsecs:100 # (optional) +clock_precision_digits = 0 # number of digits after dot. (optional) +ordering = yes # Is ordering defined for timestamps? + # (optional, default: no) +tsa_name = yes # Must the TSA name be included in the reply? + # (optional, default: no) +ess_cert_id_chain = no # Must the ESS cert id chain be included? + # (optional, default: no) +ess_cert_id_alg = sha1 # algorithm to compute certificate + # identifier (optional, default: sha1) + +[insta] # CMP using Insta Demo CA +# Message transfer +server = pki.certificate.fi:8700 +# proxy = # set this as far as needed, e.g., http://192.168.1.1:8080 +# tls_use = 0 +path = pkix/ + +# Server authentication +recipient = "/C=FI/O=Insta Demo/CN=Insta Demo CA" # or set srvcert or issuer +ignore_keyusage = 1 # potentially needed quirk +unprotected_errors = 1 # potentially needed quirk +extracertsout = insta.extracerts.pem + +# Client authentication +ref = 3078 # user identification +secret = pass:insta # can be used for both client and server side + +# Generic message options +cmd = ir # default operation, can be overridden on cmd line with, e.g., kur + +# Certificate enrollment +subject = "/CN=openssl-cmp-test" +newkey = insta.priv.pem +out_trusted = insta.ca.crt +certout = insta.cert.pem + +[pbm] # Password-based protection for Insta CA +# Server and client authentication +ref = $insta::ref # 3078 +secret = $insta::secret # pass:insta + +[signature] # Signature-based protection for Insta CA +# Server authentication +trusted = insta.ca.crt # does not include keyUsage digitalSignature + +# Client authentication +secret = # disable PBM +key = $insta::newkey # insta.priv.pem +cert = $insta::certout # insta.cert.pem + +[ir] +cmd = ir + +[cr] +cmd = cr + +[kur] +# Certificate update +cmd = kur +oldcert = $insta::certout # insta.cert.pem + +[rr] +# Certificate revocation +cmd = rr +oldcert = $insta::certout # insta.cert.pem diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/oqsprovider/oqsprovider.dll b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/oqsprovider/oqsprovider.dll new file mode 100644 index 0000000..61d9ed9 Binary files /dev/null and b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/oqsprovider/oqsprovider.dll differ diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/program_structure.svg b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/program_structure.svg new file mode 100644 index 0000000..26d58de --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/program_structure.svg @@ -0,0 +1,4 @@ + + + +
CERTIFICATEs
CERTIFICATEs
SERVER
SERVER
ECC
ECC
RSA
RSA
gen_cert_ECC.bat
gen_cert_ECC.bat
gen_cert_RSA.bat
gen_cert_RSA.bat
certificate-authority-options.conf
certificate-authority...
client.ext
client.ext
options.conf
options.conf
server.ext
server.ext
server.c
server.c
server.key
server.key
server.pem
server.pem
myCA.pem
myCA.pem
Zrdojový kód pre rolu - server
Zrdojový kód pre rolu - s...
Súkromný kľúč
Súkromný kľúč
Podpísaný cerifikát pomocou CA
Podpísaný cerifikát pomoc...
Skript vygeneruje ECC certifikáty pre: server, klient a CA + podpísanie certifikátov CA
Skript vygeneruje ECC certifikáty pre: s...
Nastavenia pre vygenerovanie certifikátov
Nastavenia pre...
Skript vygeneruje RSA certifikáty pre: server, klient a CA + podpísanie certifikátov CA
Skript vygeneruje RSA certifikáty pre: s...
Certifikát CA
Certifikát CA
Po spustení skriptu generujúceho certifikáty sa v aktuálnom adresári vytvoria dodatočné súbory
Po spustení skriptu generujúceho ce...
client.key
client.key
client.pem
client.pem
server.key
server.key
server.pem
server.pem
myCA.key
myCA.key
myCA.pem
myCA.pem
myCA.srl
myCA.srl
Certifáty
Certifáty
Súkromné kľúče
Súkromné kľúče
Sériové číslo priradené certifikátu CA
Sériové číslo priraden...
CLIENT_SERVER_SECURE
CLIENT_SERVER_SECURE
CLIENT_SERVER_SECURE_BIO
CLIENT_SERVER_SECURE_BIO
client.c
client.c
client.key
client.key
client.pem
client.pem
CLIENT
CLIENT
Zrdojový kód pre rolu - klient
Zrdojový kód pre rolu - k...
Súkromný kľúč
Súkromný kľúč
Podpísaný cerifikát pomocou CA
Podpísaný cerifikát pomoc...
comp_client.bat
comp_client.bat
start_client.bat
start_client.bat
Skript na preloženie zdrojového kódu client.c
Skript na preloženie zdroj...
Skript na spustenie klienta
Skript na spustenie klien...
comp_server.bat
comp_server.bat
start_server.bat
start_server.bat
Skript na preloženie zdrojového kódu server.c
Skript na preloženie zdroj...
Skript na spustenie servera
Skript na spustenie serve...
makefile
makefile
makefile na preloženie zdrojových kódov server.c a client.c
makefile na preloženie zdro...
PROJECT_SECURE_SSL_TLS
PROJECT_SECURE_SSL_TLS
dokumentacia.pdf
dokumentacia.pdf
schematic.svg
schematic.svg
Schéma využitých funkcií
Schéma využitých funkcií
Text is not SVG - cannot display
\ No newline at end of file diff --git a/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/readme b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/readme new file mode 100644 index 0000000..4028194 --- /dev/null +++ b/OpenSSL_liboqs_oqsprovider/PQ_PROJECT_SSL_TLS/readme @@ -0,0 +1,91 @@ +[14.04.2024] +CLIENT_SERVER_SECURE, CLIENT_SERVER_SECURE_BIO +- Testovane na verzii OpenSSL 3.3.0, liboqs 0.10.0, oqs-provider 0.6.0 + +[11.04.2024] +CLIENT_SERVER_SECURE, CLIENT_SERVER_SECURE_BIO +- Testovane na verzii OpenSSL 3.3.0 + +[24.2.2024] +CLIENT_SERVER_SECURE, CLIENT_SERVER_SECURE_BIO +- Rozsirenie funkcie initSSLContext(), aktivacia OQS-providera cez API +- Doplnene priklady nastavenia premennej DEFAULT_GROUPS +- Testovane s oqsprovider 0.5.3 zalozenom na liboqs 0.9.2 +- Testovane na Win11 x64, Win10 x64, Ubuntu 22 a Win 7 x86 + +OQSPROVIDER +- Pridany priecinok so suborom oqsprovider.dll vytvoreny pre BPS obraz Win 7 +- Vytvorene README s navodom na pouzitie prilozeneho oqsprovidera + +[17.2.2024] +CLIENT_SERVER_SECURE, CLIENT_SERVER_SECURE_BIO +- testovanie oqs-providera, ktory umoznuje vyuzivat PQ algoritmy v TLS 1.3 +- Upravene vypisy oboch aplikacii +- Doplnene vypisy o pouzitych key exchange/encapsulation a signature algoritmov + +CERTIFICATEs +- Pridana zlozka pre generovanie PQ algoritmov +- Pridany subor gen_PQ_cert.bat na generovanie PQ algoritmov +- Vytvoreny README so zoznamom dostupnych PQ algoritmov + +[8.2.2024] +CLIENT_SERVER_SECURE, CLIENT_SERVER_SECURE_BIO +- Testovane na verzii OpenSSL 3.2.1 + +CERTIFICATEs +- Upravene certificate-authority-options.conf pri generovani ECC a RSA +- Upraveny subor gen_cert_RSA.bat - zmenena velkost generovanych klucov + +[12.9.2023] +- Konverzia obrazkov v dokumentacii na vektorove + +[28.8.2023] +- Vektorove obrazky pridane do wordu +- Pridal som k otestovanym nastrojom aj 32-bitovou GCC 13.2 posix winlibs rel.1 a OpenSSL 3.1.2, ktore ste avizovali v readme +- Vygeneroval som vektorove obrazky do PDF formatu +- Pod niektorymi obrazkami som upravil lenegdy (opis obrazka) +- Formalna uprava textu +- Pridal som zdroj z ktoreho pochadza povodny projekt +- Vektorove PDF obrazky som umiestnil do .zip suboru Janitor_Martin_documents/Documents + +[10.8.2023] +- Zmena v subore CLIENT_SERVER_SECURE_BIO/CLIENT/client.c + BIO_free_all(sock) -> SSL_free(ssl); kvoli spravnemu + uvolneniu pamate +- Uprava opisu serioveho cisla v dokumentacii + pridanie nazornej ukazky do prilohy +- Uprava prikazu pre zobrazenie certifikatu v dokumentacii + + +[12.7.2023] +------------------------------------------------------------------------------------- +CLIENT_SERVER_SECURE, CLIENT_SERVER_SECURE_BIO +- Zmazanie prebitocnych suborov +- Sparovanie pre BPS obraz +- Pridanie osobitnych kompilacnych suborov pre + client a server [comp_client.bat a comp_server.bat] +- Pridanie bat suborov pre spustenie klienta a servera + [start_server.bat a start_client.bat] +- Formalna uprava zdrojovych kodov client.c a server.c +- Nahradenie tabulatorov medzerami + +CLIENT_SERVER_SECURE_BIO +- Oprava chyby ktora sposobovala zlihanie a nasledne + spadnutie servera [server.c -> Pridanie BIO_pop() funkcie] + +DOKUMENTACIA +- Pridanie nazornych ukazok do priloh +- Opisanie extensions v prilohe +- Podrobnejsie opisanie serioveho cisla +- Formalna uprava textu +- Oprava opisu niektorych funkcii, prepinacov ... +- modifikacia suboru program_structure.svg +- vytvorenie 2 suborov schematic pre obidva projekty, + ktore zobrazuju schemu a opis vyuzitych funkcii v projekte +- Pridanie uzitocnych liniek + + +Nastroje +- Otestovane na najnovsej verzii OpenSSL 3.1.1 30 May 2023 +- Otestovane na najnovsom Winlibs gcc prekladaci: gcc (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders) 13.1.0 +- Otestovane s nastrojmi vyuzitymi v BPS obraze +