aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-07-30 01:40:49 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-07-30 01:40:49 +0200
commite8232f499124c398b6ce3fce6997ba72d7f9b317 (patch)
tree7855a4560f3ace4b36b4ea4f9560b8d3abca6e3b
parentAdd tweetnacl implementation (diff)
downloadkbench9000-e8232f499124c398b6ce3fce6997ba72d7f9b317.tar.xz
kbench9000-e8232f499124c398b6ce3fce6997ba72d7f9b317.zip
Inline all functions
-rw-r--r--curve25519-tweetnacl.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/curve25519-tweetnacl.c b/curve25519-tweetnacl.c
index b2e581a..91e86a3 100644
--- a/curve25519-tweetnacl.c
+++ b/curve25519-tweetnacl.c
@@ -19,7 +19,7 @@ static __always_inline void normalize_secret(u8 secret[CURVE25519_POINT_SIZE])
typedef s64 fe[16];
-static void carry(fe o)
+static inline void carry(fe o)
{
int i;
@@ -29,7 +29,7 @@ static void carry(fe o)
}
}
-static void cswap(fe p, fe q, int b)
+static inline void cswap(fe p, fe q, int b)
{
int i;
s64 t, c = ~(b - 1);
@@ -41,7 +41,7 @@ static void cswap(fe p, fe q, int b)
}
}
-static void pack(u8 *o, const fe n)
+static inline void pack(u8 *o, const fe n)
{
int i, j, b;
fe m, t;
@@ -67,7 +67,7 @@ static void pack(u8 *o, const fe n)
}
}
-static void unpack(fe o, const u8 *n)
+static inline void unpack(fe o, const u8 *n)
{
int i;
@@ -76,7 +76,7 @@ static void unpack(fe o, const u8 *n)
o[15] &= 0x7fff;
}
-static void add(fe o, const fe a, const fe b)
+static inline void add(fe o, const fe a, const fe b)
{
int i;
@@ -84,7 +84,7 @@ static void add(fe o, const fe a, const fe b)
o[i] = a[i] + b[i];
}
-static void subtract(fe o, const fe a, const fe b)
+static inline void subtract(fe o, const fe a, const fe b)
{
int i;
@@ -92,7 +92,7 @@ static void subtract(fe o, const fe a, const fe b)
o[i] = a[i] - b[i];
}
-static void multmod(fe o, const fe a, const fe b)
+static inline void multmod(fe o, const fe a, const fe b)
{
int i, j;
s64 t[31] = { 0 };
@@ -108,7 +108,7 @@ static void multmod(fe o, const fe a, const fe b)
carry(o);
}
-static void invert(fe o, const fe i)
+static inline void invert(fe o, const fe i)
{
fe c;
int a;