Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
ecdsa-wasm
Advanced tools
Readme
This is a wasm version of mcl/ecdsa.h
serialize()
supports the format defined at BitCoin
npm test
const ecdsa = require('ecdsa-wasm')
// create secret key
const sec = new ecdsa.SecretKey()
// initialize sec
sec.setByCSPRNG()
// get public key
const pub = sec.getPublicKey()
// make signature
const sig = sec.sign("abc")
// verify signatpure by pub
> pub.verify(sig, "abc")
true
> pub.verify(sig, "abcd")
false
// create precomputed public key(faster than pub)
const ppub = new ecdsa.PrecomputedPublicKey()
// initialize ppub
ppub.init(pub)
// verify signature by ppub
> ppub.verify(sig, "abc")
true
> ppub.verify(sig, "abcd")
false
// destroy ppub if unnecessary
ppub.destroy()
SecretKey.serialize()
return 32-bytes Uint8Array as big-endianPublicKey.serialize()
return 65-bytes Uint8Array as 0x04 + x
+ y
PublicKey.serializeCompressed()
return 33-bytes Uint8Array as 0x02 (y is even) or 0x03 (y is odd) + x
Signature.serialize()
return DER-formatSecretKey.deserialize(a)
PublicKey.deserialize(a)
Signature.deserialize(a)
Uint8Array
of a
and constract the objectInstall emscripten.
git clone --recurse-submodules git@github.com:herumi/ecdsa-wasm
cd ecdsa-wasm
make -C src wasm
modified new BSD License http://opensource.org/licenses/BSD-3-Clause
光成滋生 MITSUNARI Shigeo(herumi@nifty.com)
FAQs
ecdsa/secp256k1 + SHA-256 for Node.js by WebAssembly
The npm package ecdsa-wasm receives a total of 8 weekly downloads. As such, ecdsa-wasm popularity was classified as not popular.
We found that ecdsa-wasm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.