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

api.SubtleCrypto.deriveBits - X25519 is no longer supported in Deno, due to the launch of their std. #24597

Closed
ChromaLTS opened this issue Oct 1, 2024 · 2 comments
Labels
data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API

Comments

@ChromaLTS
Copy link

What type of issue is this?

Incorrect support data (example: BrowserX says "86" but support was added in "40")

What information was incorrect, unhelpful, or incomplete?

X25519 is no longer supported in Deno. Consider adding a message to inform users to import from Node's implementation instead of std. Deno recently updated and launched its std library, which is advertised as the default library for the included features. This std is based on Chrome's implementation and includes their SubtleCrypto, which doesn't support X25519. So this is one case where updating results in progressive technological advancement - Just backwards.... :c

What browsers does this problem apply to, if applicable?

Deno

What did you expect to see?

I expected the result of using the example from MDN's page on SubtleCrypto under X25519 - specifically for the deriveBits function - to be something like:

Keys changed
234,189,125,157,50,51,232,127,158,251…[16 bytes total] (Alice secret)
234,189,125,157,50,51,232,127,158,251…[16 bytes total] (Bob secret)

Did you test this? If so, how?

I tested it in:

Deno --version
deno 1.46.3 (stable, release, x86_64-pc-windows-msvc)
v8 12.9.202.5-rusty
typescript 5.5.2

The browser. I used Chrome; it failed and gave the same error as Deno. Then I enabled the flag "#enable-experimental-web-platform-features" and restarted, then it gave the result I provided in my answer for "What did you expect to see".

Can you link to any release notes, bugs, pull requests, or MDN pages related to this?

Can you link to any release notes, bugs, pull requests, or MDN pages related to this?

The compatability chart with missing or incorrect information:
https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/deriveBits#browser_compatibility

The example i used in all environments:
https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/deriveBits#result

Do you have anything more you want to share?

No response

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/deriveBits

MDN metadata

MDN page report details
  • Query: api.SubtleCrypto.deriveBits
  • Report started: 2024-10-01T11:38:14.319Z
@queengooborg queengooborg added the data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Oct 1, 2024
@ChromaLTS
Copy link
Author

Deno has acknowledged this as a bug and is working on a fix - denoland/deno#25991
It's likely to be resolved soon.

However, I suspect this may be part of a larger issue stemming from recent changes to the standard library. My theory is that such problems arise from these significant changes, and if examined closely, Deno's compatibility will likely align more closely with the Chrome browser in many areas. These inconsistencies may only become apparent as users encounter and report them.

This is, of course, speculation on my part, and I don't intend to verify these assumptions personally.

@ChromaLTS
Copy link
Author

its now working again. The fix will probably be included in the next stable release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

No branches or pull requests

2 participants