3.0.0 • Published 2 years ago

noise-curve-secp v3.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

noise-curve-secp

secp256k1 elliptic curve operations for use with noise-handshake

Usage

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

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

API

constants

DHLEN = 32 PKLEN = 64 SKLEN = 32 ALG = 'secp256k1'

generateKeyPair([privKey])

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

{
  publicKey,
  secretKey
}

dh(pk, lsk)

Perform DH between pk and lsk and return the result.

3.0.0

2 years ago

2.0.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago