Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jason Rhinelander
ricochet-refresh
Commits
2ebe983d
Commit
2ebe983d
authored
Jan 15, 2020
by
Jarvis Dong
Browse files
sign returns int 1 if success
parent
52a2de06
Changes
3
Hide whitespace changes
Inline
Side-by-side
lib/onion_ed25519_signature/ed25519.c
View file @
2ebe983d
#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
...
...
lib/onion_ed25519_signature/orconfig.h
View file @
2ebe983d
...
...
@@ -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
...
...
lib/onion_ed25519_signature/sign.h
View file @
2ebe983d
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment