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

Ed25519 Support #57

Open apowers313 opened 6 years ago

apowers313 commented 6 years ago

Based on the conversation in PeculiarVentures/PKI.js#164 I'm hoping I can get help with adding the Ed25519 curve to webcrypto-liner. It looks like @microshine just added secp256k1 -- I'm assuming the easiest path is to look at those edits and copy them?

I'm a little concerned about whether or not I'm going to be successful in creating a PR here without a significant investment of time. Any help would be appreciated.

microshine commented 6 years ago

@apowers313 webcrypto-liner is based on webcrypto-core which supports X25519 named curve. You can use this curve like standard WebCrypto curves (e.g. P-256, P-384, P-521)

node-webcrypto-p11 implements X25519. It hes test for key derivation for NSS PKCS#11

Mischala commented 6 years ago

I have done some work upstream in webcrypto-core to add EdDSA, and plan to implement it here in an upcoming PR. After the webcrypto-core PR is merged and published

Mischala commented 6 years ago

changes made in #61

TJKoury commented 5 years ago

@Mischala @microshine What's the status here? Is this going to be integrated soon? I'm willing to work on it if needed.

rmhrisk commented 5 years ago

No progress but we’re interested in a PR :)

TJKoury commented 5 years ago

@Mischala checking out your fork, what was the stopping point there? Some technical issue?

microshine commented 3 years ago

@peculiar/webcrypto implements EdDSA and ECDH-ES mechanism. I'm going to support the same mechanisms for webcrypto-liner (~1 week)

microshine commented 3 years ago

Try this example. But copy files locally and run it. It doesn't work in codesandbox (not clear why) https://codesandbox.io/s/ed25519-with-certs-goxlt

image

It uses an unpublished webcrypto-liner library with Ed25519 supporting

microshine commented 3 years ago

There is a problem with Ed448 curve. elliptic module doesn't implement it. So current version supports Ed25519 only

rmhrisk commented 3 years ago

@indutny any chance to get Ed448 working in elliptic for our use case?