webcrypto.dart icon indicating copy to clipboard operation
webcrypto.dart copied to clipboard

Explore adding support for Ed25519 and X25519

Open jonasfj opened this issue 9 months ago • 3 comments

https://w3c.github.io/webcrypto/#algorithms

jonasfj avatar Feb 10 '25 14:02 jonasfj

We need to start by exploring how many browsers support these.

And write test cases that show browsers are implementing these in similar manners :D

jonasfj avatar Feb 10 '25 14:02 jonasfj

@jonasfj Can I Use mentions that X25519 is supported across major web browsers Support for Android [1] remains less (we have new developments in this front from 7 days ago - taken towards the end)

Image

from https://caniuse.com/mdn-api_subtlecrypto_generatekey_x25519

wrote a small script to test my suspicions for Edge and Brave: https://gist.github.com/HamdaanAliQuatil/2170d5336ed18e9261e6b77a434dae63

Brave does not support this (it uses Chromium 132.0.6834.160) but Edge does support x25519 - unlike what is mentioned in the above link. Similarly, [1] Chrome 133 (133.0.6943.49) was released for Android 7 days ago: https://chromereleases.googleblog.com/2025/02/chrome-for-android-update.html#:~:text=We've%20just%20released%20Chrome,includes%20stability%20and%20performance%20improvements.

X25519 is most likely supported for Android as well (as the release notes suggest). Now that confirms that Can I Use is not up to date.

I believe we should add support for X25519 as it it widely supported as of today.

HamdaanAliQuatil avatar Feb 11 '25 18:02 HamdaanAliQuatil

Update: Brave upgraded Chromium to 133.0.6943.54 6 days ago (https://brave.com/latest/) I updated my browser and tested the script. X25519 is supported and the script works

HamdaanAliQuatil avatar Feb 11 '25 18:02 HamdaanAliQuatil