JSPM

curve25519-n

1.5.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 99
  • Score
    100M100P100Q75252F
  • License ISC

A binding to the curve25519-donna library.

Package Exports

  • curve25519-n

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (curve25519-n) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

node-curve25519

npm version Build Status Build status Known Vulnerabilities Greenkeeper badge

This is a binding to the curve25519-donna library for node. Usage:

var curve = require('curve25519-n');

Methods

curve.makeSecretKey(secret)

Provide it with a 32-bytes-long Buffer and it will be modified in-place in order to be a usable secret key. Doesn't return anything.

curve.derivePublicKey(secret)

Provide it with your secret key as a 32-bytes-long Buffer and get a Buffer containing your public key as the result.

curve.deriveSharedSecret(mysecret, hispublic)

Derive your shared secret with someone else by giving this function two 32-bytes-long buffers containing your secret key and the other persons public key. Returns a Buffer.

Installing

npm i -S curve25519-n or yarn add curve25519-n.