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.
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";
...
git clone https://github.com/dedis/cothority
cd cothority/external/js/kyber
npm run link
cd $WORK_DIR
npm link @dedis/kyber
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
Execute npm test
to run the unit tests and get the coverage
Execute npm run doc
to generate the documentation and browse doc/index.html
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.