summaryrefslogtreecommitdiffhomepage
path: root/curve25519.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2020-05-30 00:05:49 +0800
committerMatt Johnston <matt@ucc.asn.au>2020-05-30 00:05:49 +0800
commitad1e9b7e3c30179a6f853817d4518ac75a60db74 (patch)
tree4bafa4c74feebddfb3bb93b2c804f600929b4474 /curve25519.c
parent846b8cdbf7929ba9fe7f44557722ecc6dbea3cd9 (diff)
void return types for curve25519
Diffstat (limited to 'curve25519.c')
-rw-r--r--curve25519.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/curve25519.c b/curve25519.c
index 4b83776..51e0e76 100644
--- a/curve25519.c
+++ b/curve25519.c
@@ -208,7 +208,7 @@ sv pow2523(gf o,const gf i)
#endif /* DROPBEAR_ED25519 && DROPBEAR_SIGNKEY_VERIFY */
#if DROPBEAR_CURVE25519
-int dropbear_curve25519_scalarmult(u8 *q,const u8 *n,const u8 *p)
+void dropbear_curve25519_scalarmult(u8 *q,const u8 *n,const u8 *p)
{
u8 z[32];
i64 x[80],r,i;
@@ -256,7 +256,6 @@ int dropbear_curve25519_scalarmult(u8 *q,const u8 *n,const u8 *p)
inv25519(x+32,x+32);
M(x+16,x+16,x+32);
pack25519(q,x+16);
- return 0;
}
#endif /* DROPBEAR_CURVE25519 */
@@ -338,7 +337,7 @@ sv scalarbase(gf p[4],const u8 *s)
scalarmult(p,q,s);
}
-int dropbear_ed25519_make_key(u8 *pk,u8 *sk)
+void dropbear_ed25519_make_key(u8 *pk,u8 *sk)
{
u8 d[64];
gf p[4];
@@ -352,8 +351,6 @@ int dropbear_ed25519_make_key(u8 *pk,u8 *sk)
scalarbase(p,d);
pack(pk,p);
-
- return 0;
}
static const u64 L[32] = {0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10};
@@ -392,7 +389,7 @@ sv reduce(u8 *r)
modL(r,x);
}
-int dropbear_ed25519_sign(const u8 *m,u32 mlen,u8 *s,u32 *slen,const u8 *sk, const u8 *pk)
+void dropbear_ed25519_sign(const u8 *m,u32 mlen,u8 *s,u32 *slen,const u8 *sk, const u8 *pk)
{
hash_state hs;
u8 d[64],h[64],r[64];
@@ -426,8 +423,6 @@ int dropbear_ed25519_sign(const u8 *m,u32 mlen,u8 *s,u32 *slen,const u8 *sk, con
FOR(i,32) x[i] = (u64) r[i];
FOR(i,32) FOR(j,32) x[i+j] += h[i] * (u64) d[j];
modL(s + 32,x);
-
- return 0;
}
#if DROPBEAR_SIGNKEY_VERIFY