Forum » Programiranje » [nginx] PQC (Post-Quantum Cryptography)
[nginx] PQC (Post-Quantum Cryptography)
HotBurek ::
Dobro jutro.
Evo, fantje in dekline, nov dan nov izziv.
Danes sem opazil, da Qualys SSL test testira PQC in če ne dela, vrne:
This server does not support PQC (Post-Quantum Cryptography) key exchange.
Po nekje eni uri googlanja, spreminjanja config fajla, testiranja... mi zadeve ni uspelo spravit da bi delala.
Tole je izsek config fajla v nginx:
Takole se testira na client strani:
In output z errorjem ter praznim "TLS1.3 group":
Pa še en dokaj obširen link na to temo:
Prepare Your Servers: TLS 1.3 Must Evolve for the Post-Quantum Internet — ML-DSA and ML-KEM Are the New Standards
To je pa to zaenkrat.
Evo, fantje in dekline, nov dan nov izziv.
Danes sem opazil, da Qualys SSL test testira PQC in če ne dela, vrne:
This server does not support PQC (Post-Quantum Cryptography) key exchange.
Po nekje eni uri googlanja, spreminjanja config fajla, testiranja... mi zadeve ni uspelo spravit da bi delala.
Tole je izsek config fajla v nginx:
# TODO # post-quantum cryptography (pqc) ssl_ecdh_curve secp384r1; #ssl_ecdh_curve X25519MLKEM768:X25519:prime256v1:secp384r1; #ssl_conf_command Groups X25519MLKEM768:X25519:secp256r1:secp384r1; #ssl_ecdh_curve auto; #ssl_conf_command Groups X25519MLKEM768;
Takole se testira na client strani:
openssl s_client -groups "X25519MLKEM768" -tls1_3 -connect www.slo-tech.com:443
In output z errorjem ter praznim "TLS1.3 group":
Connecting to 91.236.1.130 CONNECTED(00000003) 4037E71AC87F0000:error:0A000410:SSL routines:ssl3_read_bytes:ssl/tls alert handshake failure:../ssl/record/rec_layer_s3.c:918:SSL alert number 40 --- no peer certificate available --- No client certificate CA names sent Negotiated TLS1.3 group: <NULL> --- SSL handshake has read 7 bytes and written 1427 bytes Verification: OK --- New, (NONE), Cipher is (NONE) Protocol: TLSv1.3 This TLS version forbids renegotiation. Compression: NONE Expansion: NONE No ALPN negotiated Early data was not sent Verify return code: 0 (ok)
Pa še en dokaj obširen link na to temo:
Prepare Your Servers: TLS 1.3 Must Evolve for the Post-Quantum Internet — ML-DSA and ML-KEM Are the New Standards
To je pa to zaenkrat.
root@debian:/# iptraf-ng
fatal: This program requires a screen size of at least 80 columns by 24 lines
Please resize your window
fatal: This program requires a screen size of at least 80 columns by 24 lines
Please resize your window
- spremenilo: HotBurek ()
mtošev ::
Saj vsi vemo da si stručko, ampak pqc mora podpirati tudi host. Probaj raje z example.com kot slo-tech.com.
HotBurek ::
Evo fantje, rešil sem zagonetko. S pomočjo ChatGPT, ki mi je v enem od koraku namignil:
If you have multiple server blocks listening on port 443, the ssl_ecdh_curve directive should be configured in the default server block, not just the virtual host for your domain.
OpenSSL determines the supported key exchange groups early in the TLS handshake, before nginx has completed SNI-based virtual server selection.
Consequently, a setting in your domain's server block might not be the setting actually used.
Ter link na debato: https://trac.nginx.org/nginx/ticket/2542
Tako sem šel v default config, ki pobere vse ostalo (razen tistih dveh: domena.com, www.domena.com), ter mu nastavil:
Restart in voila, dela. To pomeni, da ssl_ecdh_curve nastaviš v tem server blocku.
Za test se lahko uporabi command: openssl s_client -connect www.example.com:443 -servername www.example.com -tls1_3 </dev/null 2<&1
In pol se gleda dve vrstici:
Trenuten config za curve:
To je to.
Well done.
If you have multiple server blocks listening on port 443, the ssl_ecdh_curve directive should be configured in the default server block, not just the virtual host for your domain.
OpenSSL determines the supported key exchange groups early in the TLS handshake, before nginx has completed SNI-based virtual server selection.
Consequently, a setting in your domain's server block might not be the setting actually used.
Ter link na debato: https://trac.nginx.org/nginx/ticket/2542
Tako sem šel v default config, ki pobere vse ostalo (razen tistih dveh: domena.com, www.domena.com), ter mu nastavil:
#listen 127.0.0.1:80; listen 127.0.0.1:80 default_server; #listen 127.0.0.1:443; listen 127.0.0.1:443 default_server;
Restart in voila, dela. To pomeni, da ssl_ecdh_curve nastaviš v tem server blocku.
Za test se lahko uporabi command: openssl s_client -connect www.example.com:443 -servername www.example.com -tls1_3 </dev/null 2<&1
In pol se gleda dve vrstici:
Negotiated TLS1.3 group: X25519MLKEM768 New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Trenuten config za curve:
ssl_ecdh_curve X25519MLKEM768:X25519;
To je to.
Well done.
root@debian:/# iptraf-ng
fatal: This program requires a screen size of at least 80 columns by 24 lines
Please resize your window
fatal: This program requires a screen size of at least 80 columns by 24 lines
Please resize your window
Zgodovina sprememb…
- spremenilo: HotBurek ()
Vredno ogleda ...
| Tema | Ogledi | Zadnje sporočilo | |
|---|---|---|---|
| Tema | Ogledi | Zadnje sporočilo | |
| » | Nginx 1.25.x - Kako ponovno vklopit TLSv1.2 (ssl_protocols)?Oddelek: Programiranje | 877 (722) | HotBurek |
| » | Davčne blagajne (strani: 1 2 3 4 … 24 25 26 27 )Oddelek: Programiranje | 389293 (129296) | Macketina |
| » | 4096-bitni ključi ne bodo dovolj?Oddelek: Informacijska varnost | 3446 (2171) | zee |
| » | [Python] HTTPS na desktopu dela, na Arduinu neOddelek: Programiranje | 1959 (1572) | N4g4c3N |
| » | Apache SSL težaveOddelek: Programiranje | 2550 (2002) | hobbit |