kyber-js

0.0.1 • Public • Published

KyberJS

Javascript implementation of Kyber interfaces

  1. This is developmental, and not ready for protecting production data.
  2. This is not a constant time implementation, and likely has timing side channels that can be attacked.

Usage

<html>
  <head>
    <meta charset="UTF-8">
    <script src="dist/bundle.min.js" type="text/javascript"></script> 
    <script type="text/javascript">
      var nist = kyber.group.nist;
      var p256 = new nist.Curve(nist.Params.p256);
      var randomPoint = p256.point().pick();
      var randomScalar = p256.scalar().pick();
      var product = p256.point().mul(randomScalar, randomPoint);
      console.log(product.string(), randomPoint.string(), randomScalar.string());
    </script> 
  </head>
  <body>
  </body>
</html>
 

Dev Setup

git clone https://github.com/dedis/cothority
cd cothority/external/js/kyber
npm install

Browser Build

npm run build will output dist/bundle.min.js and dist/bundle.node.min.js

Running Tests

Execute npm test to run the unit tests.

Generate Documentation

Execute npm run doc to generate JSDoc output in markdown format in doc/doc.md

/kyber-js/

    Package Sidebar

    Install

    npm i kyber-js

    Weekly Downloads

    0

    Version

    0.0.1

    License

    none

    Unpacked Size

    2.81 MB

    Total Files

    54

    Last publish

    Collaborators

    • nikkolasg