supercop.ts

cross-compiled javascript implementation of ed25519 based on supercop-ref10
git clone git://git.finwo.net/lib/supercop.ts
Log | Files | Refs | README | LICENSE

commit de6a14e35a608214732e6ed31faaa1ffc559e75b
parent 625169af37a0ef3e8bcc401a93d476e035e1e12d
Author: finwo <finwo@pm.me>
Date:   Wed, 17 Jun 2020 17:32:33 +0200

Remove some unneeded files from npmjs

Diffstat:
M.npmignore | 5+++++
MREADME.md | 23+++++++++++++++--------
2 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/.npmignore b/.npmignore @@ -1,7 +1,12 @@ lib/ patch/ +scripts/ +.github/ .editorconfig +.gitmodules .eslint* package-lock.json *.o *.ll +*.sh +test.js diff --git a/README.md b/README.md @@ -1,6 +1,6 @@ # supercop -[orlp/ed25519](https://github.com/orlp/ed25519) patched and compiled using [dcodeio/webassembly](https://github.com/dcodeio/webassembly) +[orlp/ed25519](https://github.com/orlp/ed25519) patched and compiled using clang ## Examples @@ -59,9 +59,9 @@ Generates a keypair containing the `.sign` and `.verify` functions Generates a keypair from the provided 32-byte seed with the following properties: -- arguments: +- arguments - `seed` - a 32-byte byffer -- returns: +- returns - `keypair.publicKey` - A 32-byte public key as a buffer - `keypair.secretKey` - A 64-byte secret key as a buffer - `keypair.sign` - Function to sign a message using the keypair @@ -71,21 +71,28 @@ properties: Sign a message using the given keypair. -- arguments: +- arguments - `msg` - A buffer representing the message - `publicKey` - A 32-byte public key as a buffer - `secretKey` - A 64-byte secret key as a buffer -- returns: +- returns - `signature` - A 64-byte buffer ### lib.verify( sig, msg, publicKey ) -TODO +Verify a signature for a message and publickey + +- arguments + - `sig` - A buffer representing the signature + - `msg` - A buffer representing the signed message + - `publicKey` - A 32-byte public key to validate the signature with +- returns + - `valid` - Boolean, describes whether or not the signature is valid ### keypair.sign( msg ) -TODO +Generate a signature for a message from the keypair. Calls `lib.sign`, using itself as the keys. ### keypair.verify( sig, msg ) -TODO +Verify a signature for a message. Calls `lib.verify`, using itself as the key.