@c4dt/kyber
v3.4.1-2
Published
A typescript implementation of Kyber interfaces
Downloads
8
Readme
KyberJS
Javascript implementation of Kyber interfaces
- This is developmental, and not ready for protecting production data.
- This is not a constant time implementation, and likely has timing side channels that can be attacked.
Usage
In the browser:
The bundle is compiled using the command:
npm run bundle
Check index.html for a browser-based usage
In NodeJS:
import kyber from "@dedis/kyber";
import { newCurve } from "@dedis/kyber/curve";
...
Dev Setup
git clone https://github.com/dedis/cothority
cd cothority/external/js/kyber
npm run link
cd $WORK_DIR
npm link @dedis/kyber
Browser Build
npm run build
will transpile the typescript files of the src folder into dist and
npm run bundle
will pack everything inside a minimalistic bundle again in dist
Running Tests
Execute npm test
to run the unit tests and get the coverage
Generate Documentation
Execute npm run doc
to generate the documentation and browse doc/index.html
Publishing
You must use the given script instead of npm publish
because we need to publish the dist folder instead. If you try to use the official command, you will get an error on purpose.