2.2. Post-quantum cryptography algorithms in OpenSSL


You can use the OpenSSL TLS toolkit to generate keys and certificates with post-quantum algorithms. This helps enhance security against emerging threats while maintaining compatibility with traditional algorithms.

Starting with RHEL 10.1, you can use OpenSSL for generating keys, signing messages, verifying signatures, and creating X.509 certificates with the ML-DSA post-quantum algorithms.

From OpenSSL 3.5, the hybrid ML-KEM (Module-Lattice-Based Key-Encapsulation Mechanism) method is preferred in TLS 1.3 handshakes. OpenSSL includes keys with both traditional algorithms and ML-KEM. The use of ML-KEM results in a slight delay in the initiation of TLS connections. Still, it does not affect performance after the handshake, as further communication uses a more efficient symmetric key.

예 2.1. Usage of ML-DSA for keys in OpenSSL

$ openssl genpkey -algorithm mldsa65 -out <mldsa-privatekey.pem>
Create a private key with the ML-DSA-65 algorithm.
$ openssl pkey -in <mldsa-privatekey.pem> -pubout -out <mldsa-publickey.pem>
Create a public key based on the ML-DSA-65-encrypted private key.
$ openssl dgst -sign <mldsa-privatekey.pem> -out <signature_message>
Sign a message with the private key.
$ openssl dgst -verify <mldsa-publickey.pem> -signature <signature_message>
Verify the ML-DSA-65 signature with the public key.

예 2.2. Usage of ML-DSA for certificates in OpenSSL

Because no public certificate authorities (CA) currently support post-quantum signatures, you can use only a local CA or self-signed certificates with ML-DSA signatures. For example:

$ openssl req \
    -x509 \
    -newkey mldsa65 \
    -keyout <localhost-mldsa.key> \
    -subj /CN=<localhost> \
    -addext subjectAltName=DNS:<localhost> \
    -days <30> \
    -nodes \
    -out <localhost-mldsa.crt>

예 2.3. Establishing a connection with PQC key exchange and PQC certificates

An OpenSSL server and client can establish a post-quantum connection and a connection that uses only traditional algorithms.

$ openssl s_server \
    -cert <localhost-mldsa.crt> -key <localhost-mldsa.key> \
    -dcert <localhost-rsa.crt> -dkey <localhost-rsa.key> >/dev/null &

$ openssl s_client \
    -connect <localhost:4433> \
    -CAfile <localhost-mldsa.crt> </dev/null \
    |& grep -E '(Peer signature type|Negotiated TLS1.3 group)'
Peer signature type: mldsa65
Negotiated TLS1.3 group: X25519MLKEM768

예 2.4. Establishing a connection that uses only non-post-quantum cryptographic algorithms

$ openssl s_client \
    -connect <localhost:4433> \
    -CAfile <localhost-rsa.crt> \
    -sigalgs 'rsa_pss_pss_sha256:rsa_pss_rsae_sha256' \
    -groups 'X25519:secp256r1:X448:secp521r1:secp384r1' </dev/null \
    |& grep -E '(Peer signature type|Server Temp Key)'
Peer signature type: RSA-PSS
Server Temp Key: X25519, 253 bits

You can configure a server to simultaneously use traditional certificates (RSA, ECDSA, and EdDSA) and post-quantum certificates. The server automatically and transparently selects the certificates preferred and supported by clients: the post-quantum for new clients and traditional for legacy ones.

See the openssl(1), openssl-genpkey(1), openssl-pkey(1), openssl-dgst(1), and openssl-verify(1) man pages on your system for more information.

Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2026 Red Hat
맨 위로 이동