PeculiarVentures / webcrypto-core

A input validation layer for WebCrypto polyfills.
MIT License
28 stars 13 forks source link

Add secp256k1 #24

Closed Jack-Works closed 4 years ago

Jack-Works commented 4 years ago

Uncaught (in promise) Error: namedCurve: Must be one of P-256, P-384, P-521

even I have included elliptic

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 94.14% when pulling 512810563ad836c3ad76e02131d1c5da215a7a74 on Jack-Works:master into 8f2f506f96fee78e7e1065c90bff7b63d7daef13 on PeculiarVentures:master.

microshine commented 4 years ago

@Jack-Works Thank you for your PR.

W3 WebCrypto API doesn't support K-256 named curve. This is why I skipped that curve in webcrypto-core module. If you require to use that curve in your own WebCrypto implementation you can override namedCurves property in extending class.

I do it in @peculiar/webcrypto https://github.com/PeculiarVentures/webcrypto/blob/master/src/mechs/ec/ec_dsa.ts#L7-L9

@rmhrisk What do you think about it?

microshine commented 4 years ago

I'm sorry.

I found that our ECDSA provider already includes K-256 named curve

microshine commented 4 years ago

The new version is available + webcrypto-core@1.0.15

microshine commented 4 years ago

The new version of webcrypto-liner is available + webcrypto-liner@1.0.2

Jack-Works commented 4 years ago

Cool