noise-curve-ed
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/noise-curve-ed package

2.0.1 • Public • Published

noise-curve-ed

Ed25519 elliptic curve operations for noise-handshake

Usage

const curve = require('noise-curve-ed')
const Noise = require('noise-handshake')

const handshake = new Noise(pattern, initiator, staticKeyPair, { curve })

API

constants

DHLEN = 32 PKLEN = 32 SCALARLEN = 32 SKLEN = 64 ALG = 'Ed25519'

generateKeyPair([privKey])

Generate a new keypair, optionally pass in a preexisting privKey. Return value is of the form:

{
  publicKey,
  secretKey,
}

dh(publicKey, { secretKey, scalar })

Perform DH between publicKey and secretKey/scalar and return the result.

Readme

Keywords

none

Package Sidebar

Install

npm i noise-curve-ed

Weekly Downloads

2,369

Version

2.0.1

License

ISC

Unpacked Size

4.43 kB

Total Files

4

Last publish

Collaborators

  • chm-diederichs