Document and test maximum deriveBits length for ECDH curves#249
Open
harrshita123 wants to merge 3 commits intogoogle:masterfrom
Open
Document and test maximum deriveBits length for ECDH curves#249harrshita123 wants to merge 3 commits intogoogle:masterfrom
harrshita123 wants to merge 3 commits intogoogle:masterfrom
Conversation
HamdaanAliQuatil
requested changes
Mar 4, 2026
Co-authored-by: HamdaanAliQuatil <96776914+HamdaanAliQuatil@users.noreply.github.com>
jonasfj
reviewed
Apr 24, 2026
|
|
||
| expect( | ||
| aliceKeyPair.privateKey.deriveBits(257, bobKeyPair.publicKey), | ||
| throwsA(anyOf(isA<subtle.JSDomException>(), isA<Error>())), |
Member
There was a problem hiding this comment.
Hmm, this implies a different kind of issue.
I think we are supposed to catch JSDomException and make it into an Exception or an Error.
Member
There was a problem hiding this comment.
To be clear that is probably an orthogonal issue to this PR and should be fixed separately.
Contributor
Author
There was a problem hiding this comment.
since it’s kind of a separate thing, I will leave it out of this PR for now so this doesn’t get messy. I can open a new issue for the JSDomException part if needed.
Member
|
Please rebase, I think CI mostly works on master branch now. |
…o issue-130-ecdh-derivebits-docs
Contributor
Author
I have rebased the branch onto the latest master so the CI tests can run properly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds documentation clarifying the maximum number of bits that can be derived using EcdhPrivateKey.deriveBits for each supported elliptic curve.
It also includes tests to ensure that deriving the maximum allowed length succeeds and that requests exceeding the limit are correctly rejected.
Fixes #130