little docs improvements
This commit is contained in:
parent
ae5f9678cb
commit
75216d602b
16
readme.md
16
readme.md
@ -68,10 +68,9 @@ void ed25519_sign(unsigned char *signature,
|
||||
const unsigned char *public_key, const unsigned char *private_key);
|
||||
```
|
||||
|
||||
Creates a signature of the given message with the keypair `(public_key,
|
||||
private_key)`. `signature` must be a writable 64 byte buffer. `message` must
|
||||
have at least `message_len` bytes to be read. The given keypair must be a
|
||||
keypair generated by `ed25519_create_keypair`.
|
||||
Creates a signature of the given message with the given key pair. `signature`
|
||||
must be a writable 64 byte buffer. `message` must have at least `message_len`
|
||||
bytes to be read.
|
||||
|
||||
```c
|
||||
int ed25519_verify(const unsigned char *signature,
|
||||
@ -81,15 +80,18 @@ int ed25519_verify(const unsigned char *signature,
|
||||
|
||||
Verifies the signature on the given message using `public_key`. `signature`
|
||||
must be a readable 64 byte buffer. `message` must have at least `message_len`
|
||||
bytes to be read. `public_key` must be a 32 byte public key generated by
|
||||
`ed25519_create_keypair`. Returns 1 if the signature matches, 0 otherwise.
|
||||
bytes to be read. Returns 1 if the signature matches, 0 otherwise.
|
||||
|
||||
```c
|
||||
void ed25519_add_scalar(unsigned char *public_key, unsigned char *private_key,
|
||||
const unsigned char *scalar);
|
||||
```
|
||||
|
||||
Adds `scalar` to the given keypair where scalar is a 32 byte buffer (possibly generated with `ed25519_create_seed`), generating a new keypair. You can calculate the public key sum without knowing the private key and vice versa by passing in NULL. This is useful for enforcing randomness on a keypair while only knowing the public key, among other things.
|
||||
Adds `scalar` to the given key pair where scalar is a 32 byte buffer (possibly
|
||||
generated with `ed25519_create_seed`), generating a new key pair. You can
|
||||
calculate the public key sum without knowing the private key and vice versa by
|
||||
passing in NULL for the key you don't know. This is useful for enforcing
|
||||
randomness on a key pair while only knowing the public key, among other things.
|
||||
|
||||
Example
|
||||
-------
|
||||
|
Loading…
Reference in New Issue
Block a user