{"name":"noise-curve-ed","version":"2.0.1","description":"Ed25519 elliptic curve operations for [`noise-handshake`](https://github.com/chm-diederichs/noise-handshake)","main":"index.js","scripts":{"test":"npx standard && tape test.js"},"repository":{"type":"git","url":"git+https://github.com/chm-diederichs/noise-curve-ed.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/chm-diederichs/noise-curve-ed/issues"},"homepage":"https://github.com/chm-diederichs/noise-curve-ed#readme","dependencies":{"b4a":"^1.1.0","nanoassert":"^2.0.0","sodium-universal":"^4.0.0"},"devDependencies":{"hypercore-crypto-tweak":"github:holepunchto/hypercore-crypto-tweak","noise-handshake":"^3.0.0","standard":"^16.0.3","tape":"^5.2.2"},"gitHead":"685370b87a9b0a3e08151e3cd0c55aca51add6ff","_id":"noise-curve-ed@2.0.1","_nodeVersion":"16.17.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-8HMZ40Wmarg8RQjVemLrjB49JSL6eGeOD+tlzaQW5/p+hNPfHFEMC3UZZ57zUqUprMuz6GN+gsPExpz2DWL+iA==","shasum":"c07adb2dde8dfaffb90aa95be9a522f5ed661e6d","tarball":"http://registry-npm.ywwl.com/noise-curve-ed/download/noise-curve-ed-2.0.1.tgz","fileCount":4,"unpackedSize":4428,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFxEdOq2vLTwixI52jO5Boj1AXXz10hgcBYAe7vB7F4KAiEA+a2x0N+0e/N/5ifzWU+jmqwedtF5QwSBOu/GhC4Prf4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvT4zACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrU7Q/+L0azkpIEzhvL5wKWYCN7EsNbQam4Fgqk6BZPwbhAbhZSur+o\r\nNPa2eVSLxEZg0WydV1tHvf/3Uf/QoD8RQZp5PoiINlcR5bwwRv+L9AW8o0nX\r\nVH5pzvRSP4kJy2MV72ZmcPPd5ifhUKbvoU28s6Bj0iJd3qoDg561XSMy7Yjt\r\nSP/xNTKIHbT7/EIQzR1sGrGPaQ/F5DsgE050/IE/CxtwkAZvcmUz4AtPtfh7\r\nm20UYP1I1Op8E2GL0mCPngtf5yjpeEHhmlCElYrwf/Y6QTbZ711zmIjYxVS5\r\npTSdJDb5a6Lyi0k5s6PanC+lAnzRz5SbID67NC54ZfjIsByV2h6IzRKRhM1E\r\n/wrX39HcmtCMg1LSMIhro0E7JI1CVGdwIp5/NXmxngIZ+gAsqs4FnTRANfUv\r\nroAVS3853/oGsmqQEK4QCji+4z9NXQERjcIUKkhGYXGyFyYt8unIUHitdvRx\r\n2gZAXs0a5EYXcz+Jumo7mfnpB5XHzNXh+g2K2Z7gJZk+hz6lvI+TzugQ359g\r\nOuBtAfAXhyXrhcODgfUFU5oFpG7Zm0IViNIDQzFWYGiB1w1DVJtCJgh8E80F\r\nD2H/qgL9MC2M33UOUdwzrwD+ANmKmOgjWa1nHpko89QgZ5tHys/R0IJeXW16\r\naJFIZk/JMxeQLV1CSSlruflAN3Me4GZPqDg=\r\n=w6AR\r\n-----END PGP SIGNATURE-----\r\n","size":1637,"noattachment":false,"key":"/noise-curve-ed/-/noise-curve-ed-2.0.1.tgz"},"_npmUser":{"name":"chm-diederichs","email":"chm-diederichs@protonmail.com"},"directories":{},"maintainers":[{"name":"chm-diederichs","email":"chm-diederichs@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/noise-curve-ed_2.0.1_1673346611426_0.028455562511207733"},"_hasShrinkwrap":false,"readme":"# noise-curve-ed\n\nEd25519 elliptic curve operations for [`noise-handshake`](https://github.com/chm-diederichs/noise-handshake)\n\n## Usage\n```js\nconst curve = require('noise-curve-ed')\nconst Noise = require('noise-handshake')\n\nconst handshake = new Noise(pattern, initiator, staticKeyPair, { curve })\n```\n\n## API\n\n#### constants\n\n`DHLEN` = 32\n`PKLEN` = 32\n`SCALARLEN` = 32\n`SKLEN` = 64\n`ALG` = 'Ed25519'\n\n#### `generateKeyPair([privKey])`\n\nGenerate a new keypair, optionally pass in a preexisting `privKey`. Return value is of the form:\n\n```\n{\n  publicKey,\n  secretKey,\n}\n```\n\n#### `dh(publicKey, { secretKey, scalar })`\n\nPerform DH between `publicKey` and `secretKey`/`scalar` and return the result.\n","publish_time":1673346611707,"_cnpm_publish_time":1673346611707,"dist-tags":{"latest":"2.1.0"}}