WebAssembly variant and accompanying browser interface for Private-ID generation adapted from and inspired by the Rust variant of Private-ID by Facebook Research.
The build process for this project requires Rust and Node.js. In addition, it is necessary to install wasm-pack:
cargo install wasm-packDon't forget to initialize the original Private-ID source!
git submodule initThe build process can be invoked in the following way via the Node package definitions:
npm run-script build # dev: build-debugAlternatively, it can be invoked directly in the following way:
wasm-pack build --release --no-typescript --target no-modules && npm run-script link-webTests can be invoked in the following way via the Node package definitions:
npm testAlternatively, they can be invoked directly in the following way:
cd src; cargo run --bin private-id-testNavigate two separate browser tabs or windows to the following two URLs (replacing <localhost> as necessary):
http://<localhost>/index.html?this=aaabcc&other=cccdee # Party A example.
http://<localhost>/index.html?other=cccdee&this=aaabcc # Party B example.
(Hosting the web directory can be done with cd web; python -m http.server 3000 and pointing your browser to http://localhost:3000/.)
An example build can be found on the gh-pages branch (Firebase key not included). Images party_a_example.png and party_b_example.png show the UI after a typical run of the protocol.
- parallelism using web workers
- compress messages as base64