-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Support for Ed(X)25519
#4263
Comments
Hey @olegbespalov! I'd like to take this issue on, I'll hopefully have a draft PR up by the end of the weekend. |
Hey @McMastS ! Sure, go ahead, thanks for doing that! Just in case, I've updated the description to reflect the actual path (we've got back-merged extensions code to k6). Don't hesitate to ask if you need any help or want to discuss something! P.S. I've assigned you to the issue for now just to highlight that the issue has activity. Cheers! |
Hey @olegbespalov! I've uncommented the My
The go test passes in about 20 seconds so it is running something, and if I throw an error on line 64 of that same file then the test "passes" in less than a second so it's definitely getting cut short. Is there any Sobek setup or something I'm missing to get these tests to propagate the JS error to the Go test? |
@McMastS you're absolutely right 🤔 If I uncomment these lines locally, the tests currently pass without any failures. But the simple script like: import { crypto } from "k6/experimental/webcrypto";
export default async function () {
const key = await crypto.subtle.generateKey(
{
name: "Ed25519"
},
true,
["sign", "verify"]
);
console.log(JSON.stringify(key));
} Fails with the:
It's probably some degradation (maybe in the tests happened), but I need to check deeper, why it so, and I've opened a separated issue for a better visibility of the problem. In theory, the work on this issue still could be continued since the key generation test case is simple enough, but doesn't actually check if the functionality there. But there are tests in |
Thanks for looking into it! Good to know I wasn't going crazy hahaha. I'll keep working on it without those tests and verify with manual Javascript scripts for now. |
What?
Even though original WebCrypto API doesn't include support of the Curve25519, but many of webcrypto implementation does w3c/webcrypto#362
Even WebPlatfrom test suit tests this support, which led us to patch https://github.com/grafana/k6/blob/master/internal/js/modules/k6/webcrypto/tests/wpt-patches/WebCryptoAPI__generateKey__failures.js.patch
Draft can be found https://wicg.github.io/webcrypto-secure-curves/
From the Golang's perspective, support also looks good since we have packages:
Why?
Seems like support of this Curve25519 is demanded, so having it in k6 makes k6's implementation more attractive and useful for customers.
The text was updated successfully, but these errors were encountered: