-
Notifications
You must be signed in to change notification settings - Fork 3
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 of RSA #85
Support of RSA #85
Conversation
2e90a4a
to
af8f773
Compare
I think this closes #84 too. Thanks for the quick implementation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work 👏🏻 🚀 Feels great to see RSA coming to k6. Left a couple of absolutely disposable nits, but looks all good to me 🙇🏻
af8f773
to
76cdae6
Compare
- setup({explicit_done: true}); | ||
+ // setup({explicit_done: true}); | ||
|
||
- var subtle = self.crypto.subtle; // Change to test prefixed implementations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it won't be easier to actually set self
to globalThis
which seems to be what it meant to do https://developer.mozilla.org/en-US/docs/Web/API/Window/self
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, let me address this after merging this and #87 as part as clean up
gotErr := ts.EventLoop.Start(func() error { | ||
err := executeTestScripts(ts.VU.Runtime(), webPlatformTestSuite+"encrypt_decrypt", "rsa_vectors.js", "rsa.js") | ||
require.NoError(t, err) | ||
|
||
_, err = ts.VU.Runtime().RunString(`run_test()`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: a lot of this test semm ... the same apart from the name and the some strings here.
It might be .. .better to make them into a table test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, let me address this after merging this and #87 as part as clean up
07e911a
to
3732583
Compare
3732583
to
20c8ea5
Compare
What?
This PR brings support for the RSA algorithms across available APIs.
Sorry for the huge PR, but the predominant issue is that to make RSA useful (sign, verify, encrypt, decrypt), we need to have a lot of functionality already (generation, export, import), so it's kind of all related. However, I did break pieces in commits, so you could try checking them.
The vital highlight could be that for the RSA-PSS algorithm, we don't support saltLength 0 (since golang SDK doesn't support it). So, I'm thinking of also writing a log message whenever a user uses this to bring attention. But this will be in a separate PR.
Why?
Closes: #47
Closes: #84