### Install OpenSSL Source: https://github.com/tongsuo-project/tongsuo/blob/master/INSTALL.md If tests pass, install OpenSSL using 'make install' on Unix or 'nmake install' on Windows. Ensure you have the necessary permissions to write to the installation directory. ```shell $ make install # Unix ``` ```shell $ nmake install # Windows ``` -------------------------------- ### Example QUIC Server Configuration Source: https://github.com/tongsuo-project/tongsuo/blob/master/README-QUIC.md An example of how to run the QUIC server with specific port, certificate, and key files. ```shell $ ./demos/quic/server/server 4433 server.pem server.key ``` -------------------------------- ### Install OpenSSL with nmake Source: https://github.com/tongsuo-project/tongsuo/blob/master/NOTES-WINDOWS.md Use this command to install the OpenSSL build after successful testing. ```bash nmake install ``` -------------------------------- ### Run Example QUIC Server Source: https://github.com/tongsuo-project/tongsuo/blob/master/README-QUIC.md Execute the example QUIC server implementation found in the source tree. You need to provide the port number, certificate file, and key file. ```shell $ ./demos/quic/server/server ``` -------------------------------- ### Specify Library Installation Directory Source: https://github.com/tongsuo-project/tongsuo/blob/master/INSTALL.md Set the directory name for installing libraries under the main installation tree. The default is `lib`. ```bash --libdir=DIR ``` -------------------------------- ### Install Tongsuo Binary Programs and Libraries Source: https://github.com/tongsuo-project/tongsuo/blob/master/README.en.md This command installs only the Tongsuo binary programs and their required library files. Use this if you do not need to develop applications but only run Tongsuo. ```bash make install_programs ``` -------------------------------- ### Install FIPS Provider on Unix Source: https://github.com/tongsuo-project/tongsuo/blob/master/README-FIPS.md This command installs the FIPS provider and related components on Unix-like systems. It is typically executed as part of the 'make install' process when 'enable-fips' is configured. ```bash $ make install ``` -------------------------------- ### Install FIPS Provider Artifacts Source: https://github.com/tongsuo-project/tongsuo/blob/master/README-FIPS.md Installing the FIPS provider artifacts system-wide using 'make install_fips'. ```bash $ cd ../openssl-3.1.2 $ sudo make install_fips ``` -------------------------------- ### Install Tongsuo Development Headers Source: https://github.com/tongsuo-project/tongsuo/blob/master/README.en.md Use this command to install header files necessary for developing applications based on Tongsuo. This ensures all development dependencies are met. ```bash make install_dev ``` -------------------------------- ### Start NTLS Server Source: https://github.com/tongsuo-project/tongsuo/wiki/NTLS使用手册 Starts an OpenSSL s_server with NTLS enabled, using specified encryption and signing certificates and keys. ```bash openssl s_server -accept 127.0.0.1:4433 -enc_cert test_certs/double_cert/SE.cert.pem -enc_key test_certs/double_cert/SE.key.pem -sign_cert test_certs/double_cert/SS.cert.pem -sign_key test_certs/double_cert/SS.key.pem -enable_ntls ``` -------------------------------- ### Specify Top-Level Installation Directory Source: https://github.com/tongsuo-project/tongsuo/blob/master/INSTALL.md Set the root of the installation directory tree for OpenSSL. Defaults are `/usr/local` on Unix and `C:\Program Files\OpenSSL` on Windows. ```bash --prefix=DIR ``` -------------------------------- ### Start OpenSSL Server with GMSSL Certificate Source: https://github.com/tongsuo-project/tongsuo/wiki/TLS1.3---国密单证书 Starts an OpenSSL server instance configured to use a GMSSL certificate and key for TLS connections. ```bash openssl s_server -cert test_certs/sm2_cert/sm2-second.crt -key test_certs/sm2_cert/sm2-second.key -accept 127.0.0.1:4433 ``` -------------------------------- ### Install OpenSSL to a Custom Location (Unix) Source: https://github.com/tongsuo-project/tongsuo/blob/master/INSTALL.md Use the `--prefix` and `--openssldir` options to specify custom installation directories for OpenSSL on Unix-like systems. This is useful for testing or non-standard deployments. ```bash $ ./Configure --prefix=/opt/openssl --openssldir=/usr/local/ssl ``` -------------------------------- ### Function Begin (No Pushing) Source: https://github.com/tongsuo-project/tongsuo/blob/master/crypto/perlasm/README.md Start a function without pushing edi, esi, ebx, and ebp. ```perl &function_begin_B(name,extra) ``` -------------------------------- ### Install Text::Template on Debian-based Linux Source: https://github.com/tongsuo-project/tongsuo/blob/master/NOTES-PERL.md Installs the Text::Template Perl module using the apt package manager on Debian-based Linux distributions. This is the recommended method for Linux users. ```bash $ apt-cache search Text::Template ... libtext-template-perl - perl module to process text templates $ sudo apt-get install libtext-template-perl ``` -------------------------------- ### Test OpenSSL Build Source: https://github.com/tongsuo-project/tongsuo/blob/master/INSTALL.md Run the test suite to verify the OpenSSL build. This is recommended for production installations on Unix-like systems. ```bash $ make test ``` -------------------------------- ### Manually Install FIPS Provider Configuration on Unix Source: https://github.com/tongsuo-project/tongsuo/blob/master/README-FIPS.md This command manually installs the FIPS provider configuration file. It runs the FIPS module self-tests and generates the configuration file, which contains module checksums and self-test status. ```bash $ openssl fipsinstall -out /usr/local/ssl/fipsmodule.cnf -module /usr/local/lib/ossl-modules/fips.so ``` -------------------------------- ### Configure OpenSSL for 1.1 with Custom Prefix Source: https://github.com/tongsuo-project/tongsuo/blob/master/NOTES-NONSTOP.md Specifies a custom installation directory for OpenSSL 1.1 to manage co-existing builds. ```bash --prefix=/usr/local-ssl1.1 --openssldir=/usr/local-ssl1.1/ssl ``` -------------------------------- ### RSA Private Key Generation (2048-bit) Source: https://github.com/tongsuo-project/tongsuo/blob/master/test/recipes/30-test_evp_data/evppkey_rsa_common.txt Example of a 2048-bit RSA private key in PEM format. ```text PrivateKey=RSA-OAEP-9 -----BEGIN PRIVATE KEY----- MIIDlwIBADANBgkqhkiG9w0BAQEFAASCA4EwggN9AgEAAoHBAM8s1B40yjpyjqXL iv9kw20nve9TZOM2/WjTEjxaGWqMKHAT6FPVFW1Y0VGVRSD7T217F6u2gXdlkJxX YRllnZArGQbtiisQwVXCTRJFKNq57q43m+rGbkpBF4bcuP0AYuvAMN4SGaBMKowb fdMTHk1rbK7i4xpe1BrBUJsu8e4qsYNkvlaMqUHCXsyE/51kO17Bqq4QKiDXP0eb eA/W2pEHUhLZ6sA6BnTYmeui5DH0xEthW2uiIyvUszuu1z1iXQIDAQABAoHAGYwU HiNxWpK8z2oRmlvBE4lGjSgR9UjXJ+F7SrDrmG1vIR77U7cffMvqh+5px17mFQCM UzLetSvzkKvfv+N9cgU2gVmyY4wd4ybiHSIlHw+1hIs78VAF0qdDMPCv6RbuYszB NE0dg6cJ5gZ2JzhA9/N3QkpeCk2nXwGzH/doGc+cv90hUkPDkXwD7zgZkxLlZ7O/ eu06tFfzce+KFCP0W2jG4oLsERu6KDO5h/1p+tg7wbjGE8Xh6hbBHtEl6n7BAmEA /I1sBL7E65qBksp5AMvlNuLotRnezzOyRZeYxpCd9PF2230jGQ/HK4hlpxiviV8b zZFFKYAnQjtgXnCkfPWDkKjD6I/IxI6LMuPaIQ374+iB6lZ0tqNIwh6T+eVepl79 AmEA0gDUXniKrOpgakAdBGD4fdXBAn4S3BoNdYbok52c94m0D1GsBEKWHefSHMIe BcgxVcHyqpGTOHz9+VbLSNFTuicEBvm7ulN9SYfZ4vmULXoUy//+p0/s3ako0j4l n17hAmEA2xaAL3mi8NRfNY1p/TPkS4H66ChiLpOlQlPpl9AbB0N1naDoErSqTmyL 6rIyjVQxlVpBimf/JqjFyAel2jVOBe8xzIz3WPRjcylQsD4mVyb7lOOdalcqJiRK sI23V1KtAmEAoKMXz+ffFCP4em3uhFH04rSmflSX8ptPHk6DC5+t2UARZwJvVZbl o5yXgX4PXxbifhnsmQLgHX6m+5qjx2Cv7h44G2neasnAdYWgatnEugC/dcitL6iY pHnoCuKU/tKhAmALIfM1w1M0LrRMOqJERXgMLWVblAF0yuOMfIpOZJPAup/TA3SC Z7CDuaemy2HkLbNiuMmJbbcGTgKtWuYVh9oVtGSckFlJCf6zfby2VL63Jo7IAeWo tKo5Eb69iFQvBb4= -----END PRIVATE KEY----- ``` -------------------------------- ### RSA Private Key Generation (1024-bit) Source: https://github.com/tongsuo-project/tongsuo/blob/master/test/recipes/30-test_evp_data/evppkey_rsa_common.txt Example of a 1024-bit RSA private key in PEM format. ```text PrivateKey=RSA-OAEP-8 -----BEGIN PRIVATE KEY----- MIICeQIBADANBgkqhkiG9w0BAQEFAASCAmMwggJfAgEAAoGBW98OMNMh3aUUf4gk CPppGVSA34+A0/bov1gYUE82QnypsfVUC5xlqPaXTPhEeiRNkoAgG7Sfy75jeNGU TNIn4jD5bj0Q+Bnc7ydsZKALKktnAefQHeX6veOx6aDfgvRjE1nNImaWR/uxcXJG E07XtJfP/73EK1nHOpbtkBZiEt/3AgMBAAECgYEPfR6eWqol/RPkoGY64UTg0V9c 0YvNsJ3yzH5k48XpFa1iZFMEFh0JjHFbt6uL0B0H6vP+18ftCK8qimLvRKsWsyDh SvcqSPlq/iYqCuTPZeY16RB5DNTuXOp2iksmOffm9nez8Ltr4yt1dH2JCQNvAmT1 jUAc26ExcWFXp17PYzECQQoC74RI2frYu9DQBMjCqpdR75chwbDQMjalSw35R8uu 1aJV7p6OINSR6hcj/glHBKl2Loiv0W67WZRBLKlm3E+fAkEJLTYuftOgv9np/Q5s AwG23ykVnbUMyDubDPTW7qcaYeACtG4K6fLeYtJbXXRS1Ji4HJrG/FhZPUw/tPXX LfuwqQJBB8cUEK8QOWLbNnQE43roULqk6cKd2SFFgVKUpnx9HG3tJjqgMKm2M65Q MD4UA10a8BQSPrpoeCAwjY68hbaVfX0CQQCuLHU4DALAFq0FiRszAd6IHyiuEXEY K2ssg76nxRXsqcopjHscq1gXpZcGj8hQYN5NqKAWN4quQ8f5Z7zDeQS5AkEFmNEF jraT2MgdSwJ2AX/fR8a4NAXru7pzvoNfdf/d15EtXgyL2QF1iEdoZUZZmqof9xM 2MiPa249Z+lh3Luj0A== -----END PRIVATE KEY----- ``` -------------------------------- ### Explicitly Install FIPS Provider on Unix Source: https://github.com/tongsuo-project/tongsuo/blob/master/README-FIPS.md This command explicitly installs only the FIPS provider without installing the rest of OpenSSL. This can be useful if you need to install the FIPS provider independently. ```bash $ make install_fips ``` -------------------------------- ### Out-of-Tree Build Example (Windows) Source: https://github.com/tongsuo-project/tongsuo/blob/master/INSTALL.md For Windows, create a build directory, change to it, and then invoke the Configure command using the Perl script from the source directory. ```shell $ C: $ mkdir \temp-openssl $ cd \temp-openssl $ perl d:\PATH\TO\OPENSSL\SOURCE\Configure [options...] ``` -------------------------------- ### Configure OpenSSL for AFL Fuzzing Source: https://github.com/tongsuo-project/tongsuo/blob/master/fuzz/README.md Configure OpenSSL for fuzzing with AFL. This command installs afl-clang-fast and sets up the build environment. ```bash sudo apt-get install afl-clang CC=afl-clang-fast ./config enable-fuzz-afl no-shared no-module \ -DPEDANTIC enable-tls1_3 enable-weak-ssl-ciphers enable-rc5 \ enable-ssl3 enable-ssl3-method enable-nextprotoneg \ enable-ec_nistp_64_gcc_128 -fno-sanitize=alignment \ --debug ``` -------------------------------- ### Function Begin (Standard) Source: https://github.com/tongsuo-project/tongsuo/blob/master/crypto/perlasm/README.md Start a function, including pushing edi, esi, ebx, and ebp. 'extra' is for win32 external info. ```perl &function_begin(name,extra) ``` -------------------------------- ### Get High Byte of Register Source: https://github.com/tongsuo-project/tongsuo/blob/master/crypto/perlasm/README.md Get the high byte of a given register. ```perl &HB(reg); ``` -------------------------------- ### Out-of-Tree Build Example (Unix) Source: https://github.com/tongsuo-project/tongsuo/blob/master/INSTALL.md To perform an out-of-tree build, create a separate build directory, navigate into it, and then invoke the Configure command from the source directory. ```shell $ mkdir /var/tmp/openssl-build $ cd /var/tmp/openssl-build $ /PATH/TO/OPENSSL/SOURCE/Configure [options...] ``` -------------------------------- ### List Available Configurations Source: https://github.com/tongsuo-project/tongsuo/blob/master/INSTALL.md Run Configure with the LIST argument to see all supported operating system, hardware, and compiler combinations. Use the Unix form on Unix-like systems and the Perl form on others. ```shell $ ./Configure LIST # Unix ``` ```shell $ perl Configure LIST # All other platforms ``` -------------------------------- ### Get Low Byte of Register Source: https://github.com/tongsuo-project/tongsuo/blob/master/crypto/perlasm/README.md Get the low byte of a given register. ```perl &LB(reg); ``` -------------------------------- ### Example CBC Encryption Call Source: https://github.com/tongsuo-project/tongsuo/blob/master/crypto/perlasm/README.md Example call to the CBC function generator for BF_cbc_encrypt. ```perl &cbc("BF_cbc_encrypt","BF_encrypt","BF_encrypt",1,4,5,3,-1,-1); ``` -------------------------------- ### Example DES CBC Encryption Call Source: https://github.com/tongsuo-project/tongsuo/blob/master/crypto/perlasm/README.md Example call to the CBC function generator for des_ncbc_encrypt. ```perl &cbc("des_ncbc_encrypt","des_encrypt","des_encrypt",0,4,5,3,5,-1); ``` -------------------------------- ### Configure OpenSSL for NonStop 64-bit with Random Seed Source: https://github.com/tongsuo-project/tongsuo/blob/master/NOTES-NONSTOP.md Example Configure command for a 64-bit NonStop build, specifying a random seed source. ```bash ./Configure nonstop-nsx_64 --with-rand-seed=rdcpu ``` -------------------------------- ### Build OpenSSL Libraries and Binary Source: https://github.com/tongsuo-project/tongsuo/blob/master/INSTALL.md Execute the make command (Unix) or nmake (Windows) in the top-level source directory to build the OpenSSL libraries and the openssl binary. ```shell $ make # Unix ``` ```shell $ nmake # Windows ``` -------------------------------- ### KAS-ECC-CDH P-384 Private Key (Partial Example) Source: https://github.com/tongsuo-project/tongsuo/blob/master/test/recipes/30-test_evp_data/evppkey_kas.txt Partial example of a KAS-ECC-CDH P-384 private key. ```text PrivateKey=KAS-ECC-CDH_P-384_C20 -----BEGIN PRIVATE KEY----- MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDASBI67QzHsGaHiPxos ``` -------------------------------- ### Configure OpenSSL Build Source: https://github.com/tongsuo-project/tongsuo/blob/master/INSTALL.md Run the Configure script to prepare the build environment for OpenSSL on Unix-like systems. This is the first step in the build process. ```bash $ ./Configure ``` -------------------------------- ### Example DES EDE3 CBC Encryption Call Source: https://github.com/tongsuo-project/tongsuo/blob/master/crypto/perlasm/README.md Example call to the CBC function generator for des_ede3_cbc_encrypt. ```perl &cbc("des_ede3_cbc_encrypt","des_encrypt3","des_decrypt3",0,6,7,3,4,5); ``` -------------------------------- ### NTLS Server API Setup (C) Source: https://github.com/tongsuo-project/tongsuo/wiki/NTLS使用手册 Sets up an NTLS server context in C, enabling the NTLS feature, and loading signing and encryption certificates/keys. ```c int main() { //变量定义 const SSL_METHOD *meth = NULL; SSL_CTX *ctx = NULL; const char *sign_key_file = "/path/to/sign_key_file"; const char *sign_cert_file = "/path/to/sign_cert_file"; const char *enc_key_file = "/path/to/enc_key_file"; const char *enc_cert_file = "/path/to/enc_cert_file"; //双证书相关server的各种定义 meth = NTLS_server_method(); //生成上下文 ctx = SSL_CTX_new(meth); //允许使用国密双证书功能 SSL_CTX_enable_ntls(ctx); //加载签名证书,加密证书 if (sign_key_file) { if (!SSL_CTX_use_sign_PrivateKey_file(cctx->ctx, sign_key_file, SSL_FILETYPE_PEM)) goto err; } if (sign_cert_file) { if (!SSL_CTX_use_sign_certificate_file(cctx->ctx, sign_cert_file, SSL_FILETYPE_PEM)) goto err; } if (enc_key_file) { if (!SSL_CTX_use_enc_PrivateKey_file(cctx->ctx, enc_key_file, SSL_FILETYPE_PEM)) goto err; } if (enc_cert_file) { if (!SSL_CTX_use_enc_certificate_file(cctx->ctx, enc_cert_file, SSL_FILETYPE_PEM)) goto err; } //...后续同标准tls流程 con = SSL_new(ctx); } ``` -------------------------------- ### Run pkcs11-provider Test Suite Source: https://github.com/tongsuo-project/tongsuo/blob/master/test/README-external.md Explicitly run the pkcs11-provider test suite with increased verbosity for debugging. Requires meson, softhsm, nss softokn tokens, and certtool, certutil, pkcs11-tool, expect. ```bash make test VERBOSE=1 TESTS=test_external_pkcs11_provider ``` -------------------------------- ### NTLS Client API Setup (C) Source: https://github.com/tongsuo-project/tongsuo/wiki/NTLS使用手册 Sets up an NTLS client context in C, enabling the NTLS feature, and optionally setting cipher suites and loading certificates/keys for specific ciphers. ```c int main() { //变量定义 const SSL_METHOD *meth = NULL; SSL_CTX *ctx = NULL; const char *sign_key_file = "/path/to/sign_key_file"; const char *sign_cert_file = "/path/to/sign_cert_file"; const char *enc_key_file = "/path/to/enc_key_file"; const char *enc_cert_file = "/path/to/enc_cert_file"; //双证书相关client的各种定义 meth = NTLS_client_method(); //生成上下文 ctx = SSL_CTX_new(meth); //允许使用国密双证书功能 SSL_CTX_enable_ntls(ctx); //设置算法套件为ECC-SM2-WITH-SM4-SM3或者ECDHE-SM2-WITH-SM4-SM3 //这一步并不强制编写,默认ECC-SM2-WITH-SM4-SM3优先 if(SSL_CTX_set_cipher_list(ctx, "ECC-SM2-WITH-SM4-SM3") <= 0) goto err; //加载签名证书,加密证书,仅ECDHE-SM2-WITH-SM4-SM3套件需要这一步, //该部分流程用...begin...和...end...注明 // ...begin... if (sign_key_file) { if (!SSL_CTX_use_sign_PrivateKey_file(cctx->ctx, sign_key_file, SSL_FILETYPE_PEM)) goto err; } if (sign_cert_file) { if (!SSL_CTX_use_sign_certificate_file(cctx->ctx, sign_cert_file, SSL_FILETYPE_PEM)) goto err; } if (enc_key_file) { if (!SSL_CTX_use_enc_PrivateKey_file(cctx->ctx, enc_key_file, SSL_FILETYPE_PEM)) goto err; } if (enc_cert_file) { if (!SSL_CTX_use_enc_certificate_file(cctx->ctx, enc_cert_file, SSL_FILETYPE_PEM)) goto err; } // ...end... //...后续同标准tls流程 con = SSL_new(ctx); } ``` -------------------------------- ### FFDHE 3072 Private Key Example Source: https://github.com/tongsuo-project/tongsuo/blob/master/test/recipes/30-test_evp_data/evppkey_ffdhe.txt An example of a FFDHE 3072-bit private key in PEM format. This key can be used for Diffie-Hellman key exchange operations. ```pem -----BEGIN PRIVATE KEY----- MIIByQIBADCCAZsGCSqGSIb3DQEDATCCAYwCggGBAP//////////rfhUWKK7Spqv 3FYgJz088di5xYPOLTaVqeE2QRRkM/vMk53OJJs++X0v42NjDHXY9oGyAq7EYXrT 3x7V1f1lYSQz9R9fBm7QhWNlVT3tGvO1VxNef1fJNZhPDHDg5ot34qaJ2vPv6HId 8VihNq3nNTCsyk9IOnl6vAqxgrMk+2HRCKlLssjj+7lq2rdg1/RoHU9Co945TfSu Vu3nY3K7GQsHp8juCm1wngL84c334uzANATNKDQvYZFy/pzphYP/jk8SMu7ygYPD /jsbTG+tczu1/LwuwiAFxY7xg30Wg7LG80omwbLv+ohrQjhhH8/c3jVbO2UZA1u8 NPTe+ZwCOGG0b8nW5skHetkdJpH39+5ZjLD6wYbZHK7+EwmFE5JwtBMMk7xDeUT0 /URS4tdN02Ty4h5x9Uv/XK6Cq5yd9p7obSvFIjY6DavFIZebDeraHb+aQtXESE4K vNBr+lPd7zwbIO4/1Z18JeQdK2bGLjf//////////wIBAgICARMEJQIjB8TRLx6q XYQJ0RAM+5ztVLhy9EXNdjY0EYODS7TFi5RZLE4= -----END PRIVATE KEY----- ``` ```pem -----BEGIN PRIVATE KEY----- MIIByQIBADCCAZsGCSqGSIb3DQEDATCCAYwCggGBAP//////////rfhUWKK7Spqv 3FYgJz088di5xYPOLTaVqeE2QRRkM/vMk53OJJs++X0v42NjDHXY9oGyAq7EYXrT 3x7V1f1lYSQz9R9fBm7QhWNlVT3tGvO1VxNef1fJNZhPDHDg5ot34qaJ2vPv6HId 8VihNq3nNTCsyk9IOnl6vAqxgrMk+2HRCKlLssjj+7lq2rdg1/RoHU9Co945TfSu Vu3nY3K7GQsHp8juCm1wngL84c334uzANATNKDQvYZFy/pzphYP/jk8SMu7ygYPD /jsbTG+tczu1/LwuwiAFxY7xg30Wg7LG80omwbLv+ohrQjhhH8/c3jVbO2UZA1u8 NPTe+ZwCOGG0b8nW5skHetkdJpH39+5ZjLD6wYbZHK7+EwmFE5JwtBMMk7xDeUT0 /URS4tdN02Ty4h5x9Uv/XK6Cq5yd9p7obSvFIjY6DavFIZebDeraHb+aQtXESE4K vNBr+lPd7zwbIO4/1Z18JeQdK2bGLjf//////////wIBAgICARMEJQIjBG9DysbR qsyURRygCXP6Z6CsUGaQR9/JD+RxbZ8P13po5PM= -----END PRIVATE KEY----- ``` -------------------------------- ### FFDHE 3072 Public Key Example Source: https://github.com/tongsuo-project/tongsuo/blob/master/test/recipes/30-test_evp_data/evppkey_ffdhe.txt An example of a FFDHE 3072-bit public key in PEM format. This key is used in conjunction with a private key for Diffie-Hellman key exchange. ```pem -----BEGIN PUBLIC KEY----- MIIDKTCCAZsGCSqGSIb3DQEDATCCAYwCggGBAP//////////rfhUWKK7Spqv3FYg Jz088di5xYPOLTaVqeE2QRRkM/vMk53OJJs++X0v42NjDHXY9oGyAq7EYXrT3x7V 1f1lYSQz9R9fBm7QhWNlVT3tGvO1VxNef1fJNZhPDHDg5ot34qaJ2vPv6HId8Vih Nq3nNTCsyk9IOnl6vAqxgrMk+2HRCKlLssjj+7lq2rdg1/RoHU9Co945TfSuVu3n Y3K7GQsHp8juCm1wngL84c334uzANATNKDQvYZFy/pzphYP/jk8SMu7ygYPD/jsb TG+tczu1/LwuwiAFxY7xg30Wg7LG80omwbLv+ohrQjhhH8/c3jVbO2UZA1u8NPTe +ZwCOGG0b8nW5skHetkdJpH39+5ZjLD6wYbZHK7+EwmFE5JwtBMMk7xDeUT0/URS 4tdN02Ty4h5x9Uv/XK6Cq5yd9p7obSvFIjY6DavFIZebDeraHb+aQtXESE4KvNBr +lPd7zwbIO4/1Z18JeQdK2bGLjf//////////wIBAgICARMDggGGAAKCAYEAmPK9 gPzxh69NyUdmvd76E2VjitXRFhA6mZvTD9zh9Isbl66yezKJcYROUv4HK81LNonz RaP5je7LXA/Vj4KkQEfjP/W00gZ/uMmi2hSQ0KbBuwRd/ECYwoigs+p9bjN4ZGra rYmQLiX2uJz2KSkx3YpM9cMH9Q41qdskGnK0QnMntwTysZ7Sdk7yeNaKUdZ3G4sA lUCEUAOr7lD8tV1fPjgMLL4EVsiZEF1v3TY5mY7ydcYPIrvrKXUKqrr7UsAdxt+r BATWe3V+JUGpsVjDLYUgaB95PkdSQtdNa094nanx+evI3vYZE9Vm/A/DNBTJuTlV rogeIx+Lq3foVUsW6nuJiGKYhbwI5xqFw+WEPMqa5QiIdoUqDExXkCi1mqxyivZ0 VW5yVac/67e9od3oMlWGU2tXvJwxIzhCBpjK8oBFxd2jFZ0BdTwBlI+Jpx5AW7oE la7P7Rxy1rkGTFs8ZSWM2cUdzBxsbwdWrmSZ6JjQstr8ST++TXC5F7ZBKaOu -----END PUBLIC KEY----- ``` ```pem -----BEGIN PUBLIC KEY----- MIIDKDCCAZsGCSqGSIb3DQEDATCCAYwCggGBAP//////////rfhUWKK7Spqv3FYg Jz088di5xYPOLTaVqeE2QRRkM/vMk53OJJs++X0v42NjDHXY9oGyAq7EYXrT3x7V 1f1lYSQz9R9fBm7QhWNlVT3tGvO1VxNef1fJNZhPDHDg5ot34qaJ2vPv6HId8Vih Nq3nNTCsyk9IOnl6vAqxgrMk+2HRCKlLssjj+7lq2rdg1/RoHU9Co945TfSuVu3n Y3K7GQsHp8juCm1wngL84c334uzANATNKDQvYZFy/pzphYP/jk8SMu7ygYPD/jsb TG+tczu1/LwuwiAFxY7xg30Wg7LG80omwbLv+ohrQjhhH8/c3jVbO2UZA1u8NPTe +ZwCOGG0b8nW5skHetkdJpH39+5ZjLD6wYbZHK7+EwmFE5JwtBMMk7xDeUT0/URS 4tdN02Ty4h5x9Uv/XK6Cq5yd9p7obSvFIjY6DavFIZebDeraHb+aQtXESE4KvNBr +lPd7zwbIO4/1Z18JeQdK2bGLjf//////////wIBAgICARMDggGFAAKCAYAWP0Ft 61TNzHfeUEGhr1gjw9cs3GfCGvx9Rbhql6oUA3tQdSOODxQCnLBv7KFnhRwhhh/Z 6BRRC3rX4HYeRsLxlFeOmOzv0Ty6vhnpJnhf8648ujLXdT1r/0G53OR5v5QFTzLq eAIYDV86EYL1/ffONV3P+OKQqpPx/kgmtKPsmr+U01KbfJk44uFkyR3bUnHq3cXj wrNCxdazibp3Iqt2jZblWdsUvBzj8VGNOQmTvxySjbJHJVtLAEZsboZQzvdV9n9f xC4/PxxI45s9/NT6JjN2+At3CPMSup1Dr9P98NYFh01bvWcIzUVUznUkNj732M3V IsPpUEq6WJR8bISdnc+HTWhjULxjbAN/ptz1K1aU3JwI2aG2sHt6r0m8ug9V1y2X Yr2hU7ohBoHhJxxmSbcqjzoQ9wdEvenfFjY+IydQ6j09AAPvBkNYwOVFOKp8TIr4 VZwIwf1eFAzs8mbbl+sFZENEM2aTpQL56AUv9FnGcg3AnVKs5/UJ8W0FYZw= -----END PUBLIC KEY----- ``` -------------------------------- ### Force Install Perl Module using CPAN Source: https://github.com/tongsuo-project/tongsuo/blob/master/NOTES-PERL.md Forces the installation of a Perl module using CPAN, even if tests fail. This is useful when tests indicate failure but are actually successful. ```bash $ cpan -f -i Text::Template ``` -------------------------------- ### Install Perl Module using CPAN Source: https://github.com/tongsuo-project/tongsuo/blob/master/NOTES-PERL.md Installs a Perl module, such as Text::Template, using the CPAN shell. This method typically requires root access and runs module tests. ```bash $ cpan -i Text::Template ``` -------------------------------- ### Run OQSprovider Test Suite Source: https://github.com/tongsuo-project/tongsuo/blob/master/test/README-external.md Explicitly run the OQSprovider test suite with increased verbosity for debugging. Requires CMake. ```bash make test VERBOSE=1 TESTS=test_external_oqsprovider ``` -------------------------------- ### Test OpenSSL Build with nmake Source: https://github.com/tongsuo-project/tongsuo/blob/master/NOTES-WINDOWS.md Run this command to execute tests on the OpenSSL build. ```bash nmake test ``` -------------------------------- ### FFDHE 3072-bit Shared Secret Example Source: https://github.com/tongsuo-project/tongsuo/blob/master/test/recipes/30-test_evp_data/evppkey_ffdhe.txt This example shows a derived shared secret for the FFDHE 3072-bit key exchange. It is used in scenarios requiring a 3072-bit ephemeral Diffie-Hellman key exchange. ```text Derive=ffdhe3072-2 PeerKey=ffdhe3072-1-pub SharedSecret=59C4B72684E68BC02148DF19FE6BECE40885AD037EE83F28C6E353C87026DAD66BB469C3F252BDC7ADA9271B6AD900620ECA15696B4E85561794A26259D61CAC7B56DDAED27BE2759A4C4BED5F8940784A255635D24E0D7B2BC796142CAF256D7A979240E9C8DD7230562B5D687971C4582A488E7BCA827FA32C4068C3C8B27ACA83E43EE9D7EAB3192F0DD877BA9C25D6334D233FC5752BEFE625B3D5DAE8589122B6C7E76538619E90AF1BD8D078496214C8F740F7BB5BFA284C811BEF5F9C6C1326E396DE17FDD47BE9D979643F2141FABB8950C3CECEEECFD0BB763F4D143A5AE284535F5E29B05E7DAC609D7080B5D1325F8D9242C67AC44482F5AA51131A763C370842D757EC16DE1988DF5BB4E4B6191A03F9E200DB491906871442FA98985DC976D5007C22FD491F49B8F0AB2AFDE0BDEFA18E56A686C712F4EDE53D924AA39CFED6C827CE0AD553132A474009203421F0A9373646200D8BA75725964079CF82D8C0C50AF6EEA4ECB607C02E7DD55C7998B4F849D79BE8867C69C62A ``` -------------------------------- ### Test OpenSSL Build Source: https://github.com/tongsuo-project/tongsuo/blob/master/INSTALL.md After building, run the tests using 'make test' on Unix or 'nmake test' on Windows. It is crucial to run tests from an unprivileged account. ```shell $ make test # Unix ``` ```shell $ nmake test # Windows ``` -------------------------------- ### Enable Brotli Compression Support Source: https://github.com/tongsuo-project/tongsuo/blob/master/INSTALL.md Build with support for brotli compression and decompression. ```bash --enable-brotli ``` -------------------------------- ### Stack Temporary Word Address Source: https://github.com/tongsuo-project/tongsuo/blob/master/crypto/perlasm/README.md Get the address of a temporary word on the stack. ```perl &swtmp(num) ``` -------------------------------- ### KAS-ECC-CDH_B-283_C14 Public Key Source: https://github.com/tongsuo-project/tongsuo/blob/master/test/recipes/30-test_evp_data/evppkey_kas.txt Example of a KAS-ECC-CDH_B-283_C14 public key in PEM format. ```text -----BEGIN PUBLIC KEY----- MF4wEAYHKoZIzj0CAQYFK4EEABEDSgAEBwVSZMPeOmItJv561wC96gRdSzznGPTm rkTPN2w6lqJlCzIhAPRcwROGaK3IFQ03wHK7QkVmDBh4VoPHsXqh+4WRumzaI2V6 -----END PUBLIC KEY----- ``` -------------------------------- ### KAS-ECC-CDH_B-283_C14 Private Key Source: https://github.com/tongsuo-project/tongsuo/blob/master/test/recipes/30-test_evp_data/evppkey_kas.txt Example of a KAS-ECC-CDH_B-283_C14 private key in PEM format. ```text -----BEGIN PRIVATE KEY----- MIGQAgEAMBAGByqGSM49AgEGBSuBBAARBHkwdwIBAQQkAWYvVUhWwCCKMbGVFI+C jgtckqTqTAMySL6/lXtYa0Ce1ZhQoUwDSgAEBwVSZMPeOmItJv561wC96gRdSzzn GPTmrkTPN2w6lqJlCzIhAPRcwROGaK3IFQ03wHK7QkVmDBh4VoPHsXqh+4WRumza I2V6 -----END PRIVATE KEY----- ``` -------------------------------- ### Build OpenSSL with FIPS Enabled Source: https://github.com/tongsuo-project/tongsuo/blob/master/README-FIPS.md Steps to download, configure, and build OpenSSL with FIPS support enabled. ```bash $ wget https://www.openssl.org/source/openssl-3.5.0.tar.gz $ tar -xf openssl-3.5.0.tar.gz $ cd openssl-3.5.0 $ ./Configure enable-fips $ make ``` -------------------------------- ### KAS-ECC-CDH_B-283_C13 Public Key Source: https://github.com/tongsuo-project/tongsuo/blob/master/test/recipes/30-test_evp_data/evppkey_kas.txt Example of a KAS-ECC-CDH_B-283_C13 public key in PEM format. ```text -----BEGIN PUBLIC KEY----- MF4wEAYHKoZIzj0CAQYFK4EEABEDSgAEA4a/3+YDc74RS0F8Tc60QyI/3mfA/vKe 0PhntaFfXqDMtNzKAvrDjshJTPdXYjPsgoLeOEtn8MqASAhCAQOdGUyL2k9uCv8+ -----END PUBLIC KEY----- ``` -------------------------------- ### Test QUIC Server Connection with openssl s_client Source: https://github.com/tongsuo-project/tongsuo/blob/master/README-QUIC.md Use this command to connect to a QUIC server and open a single bidirectional stream for testing. Replace placeholders for host, port, and ALPN. ```shell $ openssl s_client -quic -alpn myalpn -connect host:port ``` -------------------------------- ### KAS-ECC-CDH_B-283_C13 Private Key Source: https://github.com/tongsuo-project/tongsuo/blob/master/test/recipes/30-test_evp_data/evppkey_kas.txt Example of a KAS-ECC-CDH_B-283_C13 private key in PEM format. ```text -----BEGIN PRIVATE KEY----- MIGQAgEAMBAGByqGSM49AgEGBSuBBAARBHkwdwIBAQQkACkR2TjZUIrsy5h34SfR sUYaza7QNfIOD3RMd08ccnA7XEtJoUwDSgAEA4a/3+YDc74RS0F8Tc60QyI/3mfA /vKe0PhntaFfXqDMtNzKAvrDjshJTPdXYjPsgoLeOEtn8MqASAhCAQOdGUyL2k9u Cv8+ -----END PRIVATE KEY----- ``` -------------------------------- ### KAS-ECC-CDH_B-283_C12 Public Key Source: https://github.com/tongsuo-project/tongsuo/blob/master/test/recipes/30-test_evp_data/evppkey_kas.txt Example of a KAS-ECC-CDH_B-283_C12 public key in PEM format. ```text -----BEGIN PUBLIC KEY----- MF4wEAYHKoZIzj0CAQYFK4EEABEDSgAEB6/isitU/olcJCwgwFSYn6gE5ZGXDdqK fOEJ1r0xttqo8vx0BgczvVpOqbXqcJCs/ukYEGt/JScvP3yzbto4us0hN1YQzeko -----END PUBLIC KEY----- ``` -------------------------------- ### Configure OpenSSL Automatically on Windows Source: https://github.com/tongsuo-project/tongsuo/blob/master/NOTES-WINDOWS.md Run this command to let Configure automatically determine the platform and configure OpenSSL accordingly. ```bash perl Configure ``` -------------------------------- ### Configure OpenSSL for 64-bit Windows with MSVC Source: https://github.com/tongsuo-project/tongsuo/blob/master/NOTES-WINDOWS.md Use this command to configure OpenSSL for a 64-bit build on Windows using the MSVC toolchain. ```bash perl Configure VC-WIN64A ``` -------------------------------- ### KAS-ECC-CDH_B-283_C12 Private Key Source: https://github.com/tongsuo-project/tongsuo/blob/master/test/recipes/30-test_evp_data/evppkey_kas.txt Example of a KAS-ECC-CDH_B-283_C12 private key in PEM format. ```text -----BEGIN PRIVATE KEY----- MIGQAgEAMBAGByqGSM49AgEGBSuBBAARBHkwdwIBAQQkAV6oVnx7grSD+jZejmgc CmNfVjocgUcLTf5E8ZT6ket4QhgeoUwDSgAEB6/isitU/olcJCwgwFSYn6gE5ZGX DdqKfOEJ1r0xttqo8vx0BgczvVpOqbXqcJCs/ukYEGt/JScvP3yzbto4us0hN1YQ zeko -----END PRIVATE KEY----- ``` -------------------------------- ### KAS-ECC-CDH_B-283_C11 Private Key Source: https://github.com/tongsuo-project/tongsuo/blob/master/test/recipes/30-test_evp_data/evppkey_kas.txt Example of a KAS-ECC-CDH_B-283_C11 private key in PEM format. ```text -----BEGIN PRIVATE KEY----- MIGQAgEAMBAGByqGSM49AgEGBSuBBAARBHkwdwIBAQQkAWWXrm5J550GkDSXKmNS Wjw+LSwlO54d0/N4FoEs9UrWXFRqoUwDSgAEBQ6gc1ItvlFAj4Xwpghr1Mjv5XL4 Cq2t1+cOu0tyi/2/1PG8B9pSABfHrSkWonGbhViVj3fHEtNSz/nArZn7yYoOBl63 -----END PRIVATE KEY----- ``` -------------------------------- ### Configure OpenSSL for 64-bit Windows with Universal CRT Source: https://github.com/tongsuo-project/tongsuo/blob/master/NOTES-WINDOWS.md Use this command to configure OpenSSL for a 64-bit build on Windows that depends on the Universal CRT. ```bash perl Configure VC-WIN64A-HYBRIDCRT ``` -------------------------------- ### KAS-ECC-CDH_B-283_C10 Public Key Source: https://github.com/tongsuo-project/tongsuo/blob/master/test/recipes/30-test_evp_data/evppkey_kas.txt Example of a KAS-ECC-CDH_B-283_C10 public key in PEM format. ```text -----BEGIN PUBLIC KEY----- MF4wEAYHKoZIzj0CAQYFK4EEABEDSgAEBQ6gc1ItvlFAj4Xwpghr1Mjv5XL4Cq2t 1+cOu0tyi/2/1PG8B9pSABfHrSkWonGbhViVj3fHEtNSz/nArZn7yYoOBl63rH/r -----END PUBLIC KEY----- ``` -------------------------------- ### Test OpenSSL Build with make -N for C++Builder Source: https://github.com/tongsuo-project/tongsuo/blob/master/NOTES-WINDOWS.md Run this command to execute tests on the OpenSSL build configured for C++Builder. ```bash make -N test ``` -------------------------------- ### Build OpenSSL with nmake Source: https://github.com/tongsuo-project/tongsuo/blob/master/NOTES-WINDOWS.md After configuring, use this command to build OpenSSL using nmake. ```bash nmake ``` -------------------------------- ### KAS-ECC-CDH_B-283_C10 Private Key Source: https://github.com/tongsuo-project/tongsuo/blob/master/test/recipes/30-test_evp_data/evppkey_kas.txt Example of a KAS-ECC-CDH_B-283_C10 private key in PEM format. ```text -----BEGIN PRIVATE KEY----- MIGQAgEAMBAGByqGSM49AgEGBSuBBAARBHkwdwIBAQQkAWWXrm5J550GkDSXKmNS Wjw+LSwlO54d0/N4FoEs9UrWXFRqoUwDSgAEBQ6gc1ItvlFAj4Xwpghr1Mjv5XL4 Cq2t1+cOu0tyi/2/1PG8B9pSABfHrSkWonGbhViVj3fHEtNSz/nArZn7yYoOBl63 H/r -----END PRIVATE KEY----- ``` -------------------------------- ### Configure OpenSSL for 3.0 with Custom Prefix Source: https://github.com/tongsuo-project/tongsuo/blob/master/NOTES-NONSTOP.md Specifies a custom installation directory for OpenSSL 3.0, utilizing the multilib attribute for different models. ```bash --prefix=/usr/local-ssl3.0 --openssldir=/usr/local-ssl3.0/ssl ```