summaryrefslogtreecommitdiffstats
path: root/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-11-29 05:33:12 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-11-29 05:35:49 +0100
commit61349d3d273aa23935b0c413c5885005db2669db (patch)
tree9cbc05acb31476d45b48d4a51e9edca19328b8e8 /src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h
parentc13fe36e4c0730037ae75d51f7f052d916486aac (diff)
downloadfastd-61349d3d273aa23935b0c413c5885005db2669db.tar
fastd-61349d3d273aa23935b0c413c5885005db2669db.zip
Compile with -std=c99 and restructure some code to ensure there is no invalid aliasing (hopefully)
Diffstat (limited to 'src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h')
-rw-r--r--src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h b/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h
index 01903c8..608276f 100644
--- a/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h
+++ b/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h
@@ -34,7 +34,11 @@
#include <libuecc/ecc.h>
-typedef ecc_int256_t __attribute__((aligned(4))) aligned_int256_t;
+typedef union aligned_int256 {
+ ecc_int256_t int256;
+ uint32_t u32[8];
+ uint8_t u8[32];
+} aligned_int256_t;
typedef struct keypair {
ecc_int256_t secret;