2012-10-19 04:24:41 +00:00
|
|
|
|
|
|
|
#ifndef __SERVALD_CRYPTO_H
|
|
|
|
#define __SERVALD_CRYPTO_H
|
|
|
|
|
|
|
|
#include "nacl.h"
|
|
|
|
#define SIGNATURE_BYTES crypto_sign_edwards25519sha512batch_BYTES
|
|
|
|
|
|
|
|
int crypto_verify_signature(unsigned char *sas_key,
|
2013-07-13 05:17:06 +00:00
|
|
|
unsigned char *content, int content_len,
|
|
|
|
unsigned char *signature_block, int signature_len);
|
2012-10-19 04:24:41 +00:00
|
|
|
int crypto_verify_message(struct subscriber *subscriber, unsigned char *message, int *message_len);
|
|
|
|
int crypto_create_signature(unsigned char *key,
|
2013-07-13 05:17:06 +00:00
|
|
|
unsigned char *content, int content_len,
|
|
|
|
unsigned char *signature, int *sig_length);
|
2012-10-19 04:24:41 +00:00
|
|
|
int crypto_sign_message(struct subscriber *source, unsigned char *content, int buffer_len, int *content_len);
|
|
|
|
|
2013-07-13 05:17:06 +00:00
|
|
|
#endif
|