aboutsummaryrefslogtreecommitdiff
path: root/src/ext
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-12-07 12:45:46 -0500
committerNick Mathewson <nickm@torproject.org>2013-01-03 11:29:48 -0500
commit463e9378df7eaa07a895da34dc10d3c336760f09 (patch)
treebd5557925c179d438f8c20fe48945b1444cea1af /src/ext
parent095c70b7af571a61970ff8d212828b000c26eea2 (diff)
downloadtor-463e9378df7eaa07a895da34dc10d3c336760f09.tar
tor-463e9378df7eaa07a895da34dc10d3c336760f09.tar.gz
Update our copy of curve25519-donna-c64.
This now matches upstream at version 59a896970a1ad0a6cd7d0. (Adam took my patches.)
Diffstat (limited to 'src/ext')
-rw-r--r--src/ext/README3
-rw-r--r--src/ext/curve25519_donna/curve25519-donna-c64.c9
2 files changed, 4 insertions, 8 deletions
diff --git a/src/ext/README b/src/ext/README
index 8147691a4..cd23f2949 100644
--- a/src/ext/README
+++ b/src/ext/README
@@ -39,5 +39,4 @@ tor_queue.h
curve25519_donna/*.c
A copy of Adam Langley's curve25519-donna mostly-portable
- implementations of curve25519, with a couple of portability
- changes which Adam hasn't merged yet.
+ implementations of curve25519.
diff --git a/src/ext/curve25519_donna/curve25519-donna-c64.c b/src/ext/curve25519_donna/curve25519-donna-c64.c
index 38b94e7f2..9ebd8a12d 100644
--- a/src/ext/curve25519_donna/curve25519-donna-c64.c
+++ b/src/ext/curve25519_donna/curve25519-donna-c64.c
@@ -188,8 +188,7 @@ fsquare_times(felem output, const felem in, limb count) {
/* Load a little-endian 64-bit number */
static limb
-load_limb(const u8 *in)
-{
+load_limb(const u8 *in) {
return
((limb)in[0]) |
(((limb)in[1]) << 8) |
@@ -202,8 +201,7 @@ load_limb(const u8 *in)
}
static void
-store_limb(u8 *out, limb in)
-{
+store_limb(u8 *out, limb in) {
out[0] = in & 0xff;
out[1] = (in >> 8) & 0xff;
out[2] = (in >> 16) & 0xff;
@@ -216,8 +214,7 @@ store_limb(u8 *out, limb in)
/* Take a little-endian, 32-byte number and expand it into polynomial form */
static void
-fexpand(limb *output, const u8 *in)
-{
+fexpand(limb *output, const u8 *in) {
output[0] = load_limb(in) & 0x7ffffffffffff;
output[1] = (load_limb(in+6) >> 3) & 0x7ffffffffffff;
output[2] = (load_limb(in+12) >> 6) & 0x7ffffffffffff;