Commit 2ebe983d authored by Jarvis Dong's avatar Jarvis Dong
Browse files

sign returns int 1 if success

parent 52a2de06
#include <stdio.h>
#include "sign.h"
#include "ed25519-hash.h"
#include "ed25519-donna.h"
unsigned char * convert(char *s) {
size_t src_len = strlen(s);
......@@ -55,7 +53,7 @@ ed25519_donna_sign(unsigned char *sig, const unsigned char *m, size_t mlen,
/* S = (r + H(R,A,m)a) mod L */
contract256_modm(sig + 32, S);
return 0;
return 1;
}
int
......
......@@ -208,7 +208,7 @@
#define SIZEOF_SIZE_T 4
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS
//#define STDC_HEADERS
/* Define to 1 iff unaligned int access is allowed */
#define UNALIGNED_INT_ACCESS_OK
......
......@@ -14,9 +14,9 @@ typedef unsigned char ed25519_signature[64];
typedef unsigned char ed25519_public_key[32];
typedef unsigned char ed25519_secret_key[32];
unsigned char * convert(char *s);
int
ed25519_donna_sign(unsigned char *sig, const unsigned char *m, size_t mlen,
int ed25519_donna_sign(unsigned char *sig, const unsigned char *m, size_t mlen,
const unsigned char *sk, const unsigned char *pk);
int ed25519_sign_open(const unsigned char *m, size_t mlen, const ed25519_public_key pk, const ed25519_signature RS);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment