PeculiarVentures / webcrypto-liner

webcrypto-liner is a polyfill that let's down-level User Agents (like IE/Edge) use libraries that depend on WebCrypto. (Keywords: Javascript, WebCrypto, Shim, Polyfill)
MIT License
149 stars 26 forks source link

Add x25519 Support #88

Open TJKoury opened 3 years ago

TJKoury commented 3 years ago

Since integration of the ECDH_ES mech is waiting on this issue, and I need x25519 for a project, I integrated a different crypto library for the time being.

Seems to be passing the test suite copied from the ED mech, though I am certain I missed something.

Standing by for feedback.

microshine commented 3 years ago

@TJKoury webcrypto-liner supports Ed25519 https://github.com/PeculiarVentures/webcrypto-liner/blob/master/test/ed.ts#L12

TJKoury commented 3 years ago

Great! I need x25519 support as well, for ECDH.

TJKoury commented 3 years ago

To clarify:

I'm aware that you can actually use Ed25519 for ECDH, but most heavily used libraries follow the separation of using Ed25519 for 'sign' & 'verify', and x25519 for 'deriveBits' & 'deriveKey' for ECDH_ES, including Node.

Seeing as how all the examples are testing using the Node API, and hopefully the WebCrypto browser standards will follow the Node example, implementing x25519 for completeness seems appropriate for an isomorphic library to bring the browser up to Node's capabilities.

TJKoury commented 3 years ago

So, thoughts?

rmhrisk commented 3 years ago

@microshine

TJKoury commented 3 years ago

Bump

TJKoury commented 2 years ago

Bump

TJKoury commented 2 years ago

Bump