aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/ed25519/ed25519_internal.h
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-06-09 10:47:08 -0400
committerJack Lloyd <[email protected]>2017-06-09 10:47:08 -0400
commit76604b2d8878d333d2bcb5b6d5727d7cc4004c7a (patch)
tree98e229ae03b2aaf73588f282286e195b0fa6f870 /src/lib/pubkey/ed25519/ed25519_internal.h
parent7d7aee091b3a18ff158061bd87a9a12b7f262892 (diff)
Fix 32-bit error in Ed25519
Blamed VC miscompilation but actually a bug on my part.
Diffstat (limited to 'src/lib/pubkey/ed25519/ed25519_internal.h')
-rw-r--r--src/lib/pubkey/ed25519/ed25519_internal.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/pubkey/ed25519/ed25519_internal.h b/src/lib/pubkey/ed25519/ed25519_internal.h
index b2dc037fc..2a86bb30e 100644
--- a/src/lib/pubkey/ed25519/ed25519_internal.h
+++ b/src/lib/pubkey/ed25519/ed25519_internal.h
@@ -27,7 +27,13 @@ inline uint64_t load_3(const uint8_t* in)
inline uint64_t load_4(const uint8_t* in)
{
- return load_le<uint32_t>(in, 0);
+ uint64_t result;
+ result = (uint64_t) in[0];
+ result |= ((uint64_t) in[1]) << 8;
+ result |= ((uint64_t) in[2]) << 16;
+ result |= ((uint64_t) in[3]) << 24;
+ return result;
+ //return load_le<uint32_t>(in, 0);
}
/*