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 1da540e915fcaf70e92e2197312cb8d58c5d8c66
parent c31c4d78134ae57f8cf68315462dca9de31f8aeb
Author: finwo <finwo@pm.me>
Date:   Tue, 13 Aug 2019 12:34:34 +0200

Fixed a typo and added lib.sign description

Diffstat:
MREADME.md | 22++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md @@ -56,17 +56,27 @@ Generates a keypair containing the `.sign` and `.verify` functions ### lib.createKeyPair( seed ) -Generates a keypair from the provided 32-byte seed wieh the following +Generates a keypair from the provided 32-byte seed with the following properties: -- `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 -- `keypair.verify` - Function to verify a signature using the keypair +- arguments: + - `seed` - a 32-byte byffer +- 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 + - `keypair.verify` - Function to verify a signature using the keypair ### lib.sign( msg, publicKey, secretKey ) -TODO +Sign a message using the given keypair. + +- 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: + - `signature` - A 64-byte buffer ### lib.verify( sig, msg, publicKey )