Skip to content

[ML-KEM] Provide idiomatic Rust API & PQCP common API #1012

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

jschneider-bensch
Copy link
Collaborator

This PR attempts to provide an idiomatic Rust API for ML-KEM, as well as the PQCP common APIs.

  • introduce default feature c-apis for old APIs
    • Add deprecation warning to old APIs
  • Implement idiomatic Rust API for packed key generation, encapsulation, decapsulation. These will always perform key validation before encapsulation and decapsulation.
    • ML-KEM-512
    • ML-KEM 768
    • ML-KEM 1024
  • Implement idiomatic Rust API for unpacked key generation, encapsulation, decapsulation. These will perform key validation once on deserialization and then perform encapsulation and decapsulation without further validation.
    • ML-KEM-512
    • ML-KEM 768
    • ML-KEM 1024
  • Provide PQCP API on top of idiomatic API
    • ML-KEM-512 ??? I am not sure about crypto_kem_sk_from_seed and crypto_kem_pk_from_sk, specifically whether they should work for unpacked or packed keys.
    • ML-KEM 768
    • ML-KEM 1024
  • Update all doc comments
  • Update examples, benchmarks and tests to use new APIs

@franziskuskiefer franziskuskiefer linked an issue Jun 5, 2025 that may be closed by this pull request
@dconnolly
Copy link

This is lovely to see 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ML-KEM] Support PQCP APIs
2 participants