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

LibWeb+LibCrypto: Add Ed448 support in WebCryptoAPI #3009

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

devgianlu
Copy link
Contributor

Make use of the recently merged OpenSSL PR to implement Ed488 quick and easy.

Apart from implementing Ed448, I've also started defining some macros to aid development of code based on OpenSSL (see OPENSSL_TRY and OPENSSL_TRY_PTR).

The implemention is a bit different from the other curves obviously and now all the methods could be static. I have evaluated some possibilities:

  • We preallocate common OpenSSL structures when creating the class -> not ideal because then we would need OwnPtrs everywhere
  • We restructure the class to behave like RSA and require to initialize it with the keys instead of passing them to the methods
  • We make all methods static and make the class just an utility container

I think the decision can wait based on how the implementation of other things using OpenSSL goes, but wanted to share.

@devgianlu devgianlu requested a review from alimpfard as a code owner December 22, 2024 18:34
Libraries/LibCrypto/Curves/Ed448.cpp Outdated Show resolved Hide resolved
Libraries/LibCrypto/Curves/Ed448.h Outdated Show resolved Hide resolved
Libraries/LibCrypto/Curves/Ed448.cpp Outdated Show resolved Hide resolved
@ADKaster
Copy link
Member

After this goes in, a comment on WICG/webcrypto-secure-curves#20 seems appropriate

@devgianlu devgianlu force-pushed the ed448 branch 3 times, most recently from 1a3dde2 to fc1b5c5 Compare December 23, 2024 20:18
Add a couple of macros to aid error handling with OpenSSL and some RAII
classes that manage the lifetime of some OpenSSL objects.
Implement the Ed448 curve for signing and verifying using OpenSSL.

The methods could be all made static, but all other curves are not.
I think this is material for further refactoring.
Add full support for Ed448 and import relevant tests.
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.

4 participants