gren-lang / core

Gren's core package
https://packages.gren-lang.org/package/gren-lang/core/version/latest/overview
Other
36 stars 8 forks source link

Crypto: support `Ed25519` key pairs #91

Closed eberfreitas closed 1 month ago

eberfreitas commented 1 month ago

Hello folks!

I'm trying to port Paseto's javascript library into Gren but it seems like, when generating keys, they use Ed25519 and I couldn't find a way to generate those with gren's crypto implementation.

I would gladly try to help if this is actually absent. Maybe I'm overlooking something or don't really understand how those keys function.

Thank you!

robinheghan commented 1 month ago

I believe Ed25519 are not yet supported by the WebCrypto API, but that it will be added at some point in the future (NodeJS v22 has experimental support). Once this becomes more available, it will be natural to support in Gren as well.

eberfreitas commented 1 month ago

Ah, that makes sense @robinheghan! Is there a threshold we should wait for until adopting this? Can I use... reports 14.7% of global usage.

robinheghan commented 1 month ago

It should work on all browsers and the current LTS version of NodeJS. So it will be a while.

eberfreitas commented 1 month ago

Closing this for now. Thank you!