pyca / pyca/pyopenssl

Support for Post-Quantum Cryptography in PyOpenSSL

Open
#1,424 1 comment 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
944
Forks
440
Avg merge
1d 6h
Merged PRs (30d)
6

Description

We are currently using PyOpenSSL in our project, bound to OpenSSL 3.5.0 (beta1 version), which includes support for post-quantum algorithms (ML-KEM and hybrid variants, plus post-quantum digital signatures). While we have successfully managed to use post-quantum certificates (with ML-DSA) created via OpenSSL and loaded them using for example the functions load_cert_chain and load_verify_locations, we have encountered issues when attempting to set the context to use ML-KEM or any key exchange other than elliptic curves.

Specifically, we want to explicitly force the use of ML-KEM, as the changes of the new version state that "The default TLS keyshares have been changed to offer X25519MLKEM768 and X25519."
Possibly, this requires the implementation of the SSL_CTX_set1_groups() function.

Is PyOpenSSL planning to integrate support for post-quantum cryptography in the short term after the release of a stable version of openssl 3.5.0? If not, are there any workarounds or temporary solutions available to achieve this functionality?

Any guidance or suggestions on how to proceed would be greatly appreciated.

Thank you!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing PyOpenSSL's context APIs around load_cert_chain and load_verify_locations, then investigate how SSL_CTX_set1_groups() relates to the requested ML-KEM and hybrid key exchanges. Compare the available OpenSSL 3.5 behavior with the wrapper's exposed functionality. Done means the project has a decided integration or workaround path for post-quantum key exchange support.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cryptography, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.