-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathREADME
28 lines (22 loc) · 1.32 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
########################### THIS IS OUTDATED ############################
### There is a maintained fork at ###
### <https://github.com/volschin/node-curve25519>, try that instead. ###
### Or, if possible, use libsodium instead of working with curve25519 ###
### directly. ###
#########################################################################
This is a binding to the curve25519-donna library for node. Usage:
var curve = require('curve25519');
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
==========
Not yet on npm, I will only put it there when it's stable. Just work with `git clone` and `npm link`.