google / webcrypto.dart

Cross-platform implementation of Web Cryptography APIs
https://pub.dev/packages/webcrypto
Apache License 2.0
78 stars 45 forks source link

Document the maximum length in EcdhPrivateKey.deriveBits for each curve #130

Open jonasfj opened 4 months ago

jonasfj commented 4 months ago

Documentation for EcdhPrivateKey.deriveBits could have bullet point list mentining the maximum length of bits that can be derived from each curve.

Example

[length] specifies the length of the derived secret in bits. The maximum length depends on the [EllipticCurve] used in the keys:
...
 * [EllipticCurve.p521] can provide up to 528 bits.

See:

https://github.com/google/webcrypto.dart/blob/b295d8d0a148e056c285a45c3b38b1ae95ccd34a/lib/src/webcrypto/webcrypto.ecdh.dart#L185-L205


HamdaanAliQuatil commented 3 months ago

Starting with the tests. Will post my progress here.