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 NodeJS nativeCrypto #86

Open TJKoury opened 3 years ago

TJKoury commented 3 years ago

Adding NodeJS crypto.webcrypto per this issue.

@types/node typescript definition is incomplete, created local variable with :any for the time being.

rmhrisk commented 3 years ago

@TJKoury are you aware of @peculliar/webcrypto it is a node implementation of webcrypto and Node v15 also has native support. I am not against having liner support Node but its unclear of the objective?

TJKoury commented 3 years ago

The idea is to have an isomorphic code base that supports secp256k1 / Ed25519 / x25519. If I’m not mistaken, @peculiar/webcrypto does not enable those curves in the browser.

TJKoury commented 3 years ago

86

TJKoury commented 2 years ago

Bump

rmhrisk commented 2 years ago

@microshine

microshine commented 2 years ago

@peculiar/webcrypto supports Ed curves

See these tests

Ed25519/Ed448 X25519/X448

And also it supports P-256, P-384, P-521, K-256, brainpoolP160r1, brainpoolP160t1, brainpoolP192r1, brainpoolP192t1, brainpoolP224r1, brainpoolP224t1, brainpoolP256r1, brainpoolP256t1, brainpoolP320r1, brainpoolP320t1, brainpoolP384r1, brainpoolP384t1, brainpoolP512r1, and brainpoolP512t1 named curves for ECDSA and ECDH algorithms

TJKoury commented 2 years ago

Ok will check it out.