vsss-wasm
v0.2.0
Published
Porting publicly verifiable shamir secret sharing from Rust to WASM for javascript.
Downloads
70
Maintainers
Readme
Description
Porting publicly verifiable shamir secret sharing from Rust to WASM for javascript.
secret size = 32 bytes.
verifier size = 130 bytes. (optional)
Compile Wasm
install wasm-pack :
$ npm install -g @bytecodealliance/jco
$ npm install -g @bytecodealliance/componentize-js
$ rustup target install wasm32-wasip2 wasm32-wasip1 wasm32-wasi
$ cargo install cargo-component
to build the project use one of the provided target options :
$ jco transpile vsss_wasm.wasm -o target
Run
Web sample
You can use any web server, here I use python.
To install Python simple web server :
$ python -m pip install simple-http-server
run these commands :
$ cd samples/web-pkg
$ python -m simple_http_server
then open localhost:9090/web.html
then look at browser console logs in verbose mode.
Node.js sample
$ cd samples/node-pkg
$ node --trace-warnings app.mjs