Skip to content
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

Update Kyber APIs to ML-KEM APIs #8532

Closed

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Update Kyber APIs to ML-KEM APIs

This PR updates the Kyber APIs in the wolfSSL repository to use the wc_MlKemKey prefix and adds backward compatibility defines for existing wc_KyberKey APIs.

Changes

  • Change struct KyberKey to struct MlKemKey
  • Add backward compatibility typedef for KyberKey
  • Add function declarations for new wc_MlKemKey_ functions
  • Add backward compatibility #defines to map old wc_KyberKey APIs to new wc_MlKemKey APIs
  • Update wc_MlKemKey_Init to take the key first and the type second
  • Create new files wc_mlkem.h and wc_mlkem.c with updated content
  • Update internal APIs with lowercase kyberkey to lowercase mlkemkey

Testing

The changes have been tested with the configuration option --disable-shared --enable-kyber.

Link to Devin run

https://app.devin.ai/sessions/b84d53668bc44fb8a7bd1ea5815a42d9

Requested by

[email protected]

- Change struct KyberKey to struct MlKemKey
- Add backward compatibility typedef for KyberKey
- Add function declarations for new wc_MlKemKey_ functions
- Add backward compatibility #defines to map old wc_KyberKey APIs to new wc_MlKemKey APIs
- Update wc_MlKemKey_Init to take key first and type second
- Create new files wc_mlkem.h and wc_mlkem.c with updated content
- Update internal APIs with lowercase kyberkey to lowercase mlkemkey

Co-Authored-By: [email protected] <[email protected]>
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add "(aside)" to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Contributor Author

🛟 Devin Lifeguard found 1 likely issues in this PR

  • no-void-functions snippet: Change wc_MlKemKey_Free (and other void-returning functions) to return an appropriate error code (e.g., int) so errors can be propagated upstream, even if the function never fails.

@devin-ai-integration[bot]
please take a look at the above issues which Devin flagged. Devin will not fix these issues automatically.

@wolfSSL-Bot
Copy link

Can one of the admins verify this patch?

@SparkiDev
Copy link
Contributor

Work finished in #8536

@SparkiDev SparkiDev closed this Mar 6, 2025
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.

2 participants