test: cover ECDH deriveBits length boundaries - #249
Conversation
|
Please rebase, I think CI mostly works on master branch now. |
I have rebased the branch onto the latest master so the CI tests can run properly. |
3797510 to
0c84b6e
Compare
|
I updated the branch based on the feedback:
I also cleaned up the branch history into a single commit and verified it locally with dart format, dart analyze, and dart test test/webcrypto_test.dart -p vm. |
HamdaanAliQuatil
left a comment
There was a problem hiding this comment.
these tests are still useful even though #130 was closed by #289. the generated cases added there don’t actually hit the documented limits: maxDeriveLength is a bit count, but those calls pass 32/48/66, and the random range excludes its upper bound.
could we correct those calls here by setting both minDeriveLength and maxDeriveLength to 256/384/528 respectively?
since #130 is already closed, I’d also reframe this as a follow-up to #289, replace Fixes #130, and perhaps rename the PR to test: cover ECDH deriveBits length boundaries.
Follow-up to #289.
This change adds explicit ECDH
deriveBitsboundary coverage for each supported curve:The tested limits are 256 bits for P-256, 384 bits for P-384, and 528 bits for P-521.