-
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
[2/3] Implement the exportKey
and importKey
operations with support for AES algorithms
#31
Conversation
exportKey
and importKey
operations with support for AES algorithms
Comment on the PR description: Can we update the README in all of those PRs and
|
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.
Nice work 👍
The only blocker for me is the panic. The other comments are minor suggestions.
68abb91
to
a2cd5eb
Compare
d5d54c8
to
9060976
Compare
a2cd5eb
to
34fa553
Compare
9060976
to
b30f6cc
Compare
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.
LGTM 👍
575c685
to
86e837f
Compare
9de2272
to
a2a2a71
Compare
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.
My only request can likely be fixed later, on some kind of polishing pass
This commit imports and adapts the WebCrypto test suite to work within the k6 context. We also commented out algorithms that are not yet implemented.
a2a2a71
to
f5585b0
Compare
What this is
This PR implements to support the
importKey
andexportKey
operations. To keep Pull Requests as small and manageable as possible, It only implements support for the AES family of algorithms.main
✋🏻The
exportKey
operation allows exporting an existingCryptoKey
object into its raw format representation (note that this PR does not support the JWK format) as anArrayBuffer
, for being either written down to storage or reimported in a different context.The
importKey
operation does the opposite. It allows importing of a key in its raw (note that here too, this PR does not support the JWK format) representation format (anArrayBuffer
) as aCryptoKey
object.🟢 While the PR shows +400 changes, roughly half of them are from the official test suites, which do not need to be reviewed 🟢
Review
Test suite
While the PR might look big at first glance, you can safely disregard and ignore the files in the
webcrypto/tests
folder. Those files are directly imported and slightly adapted from the official test suite so that they are runnable in k6, but we haven't written those originally. We won't make any functional changes to them, as they are our safety net, ensuring that our implementation matches the specifications expectation (and that what we do is 🥁 safe).References
This PR is the second chain of 3 implementing support for key generation (1.), import/export (2.), and encryption/decryption using them. We intend to merge these in order in master: 1->2->3.