crypto-ecdh

Easy ECDH

Usage no npm install needed!

<script type="module">
  import cryptoEcdh from 'https://cdn.skypack.dev/crypto-ecdh';
</script>

README

crypto-ecdh

Travis branch GitHub Workflow Status npm David npm

install

  yarn add crypto-ecdh

usage

const client = ecdh();
const server = ecdh();

const sharedClient = client.derive(server.public);
const sharedServer = server.derive(client.public);

client.encrypt('this is a test')
  .then(cipher => server.decrypt(cipher))
  .then(data => tape.equal(data, 'this is a test', 'encrypt/decrypt'))

development

install builder/compiler

npm i -g backed-cli

build

backed -b