libp2p-crypto
Version:
Crypto primitives for libp2p
10 lines (7 loc) • 333 B
JavaScript
const ecdh = require('./ecdh')
// Generates an ephemeral public key and returns a function that will compute
// the shared secret key.
//
// Focuses only on ECDH now, but can be made more general in the future.
module.exports = async (curve) => ecdh.generateEphmeralKeyPair(curve) // eslint-disable-line require-await