aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-01-23 17:09:54 +0000
committerlloyd <[email protected]>2015-01-23 17:09:54 +0000
commitb6cc9a4084caf6d9d4b955fadc321f6521f2b36e (patch)
tree89eb2fcb93014c016ed61b0967f3af649e5b8c86 /src/lib/pubkey
parent9a0da0565c042c0f0a09caed036621c47e3f494e (diff)
Amalgamation fixes
Diffstat (limited to 'src/lib/pubkey')
-rw-r--r--src/lib/pubkey/curve25519/donna.cpp19
-rw-r--r--src/lib/pubkey/mce/mce_kem.h2
-rw-r--r--src/lib/pubkey/mce/mceliece.h6
3 files changed, 4 insertions, 23 deletions
diff --git a/src/lib/pubkey/curve25519/donna.cpp b/src/lib/pubkey/curve25519/donna.cpp
index 29d40ce13..8a29e0db9 100644
--- a/src/lib/pubkey/curve25519/donna.cpp
+++ b/src/lib/pubkey/curve25519/donna.cpp
@@ -29,13 +29,10 @@
#include <botan/curve25519.h>
#include <botan/mul128.h>
+#include <botan/internal/donna128.h>
#include <botan/loadstor.h>
#include <string.h>
-#if !defined(BOTAN_TARGET_HAS_NATIVE_UINT128)
- #include <botan/internal/donna128.h>
-#endif
-
namespace Botan {
typedef byte u8;
@@ -44,20 +41,6 @@ typedef limb felem[5];
#if !defined(BOTAN_TARGET_HAS_NATIVE_UINT128)
typedef donna128 uint128_t;
-
-#else
-
-inline u64bit carry_shift(const uint128_t a, size_t shift)
- {
- return static_cast<u64bit>(a >> shift);
- }
-
-inline u64bit combine_lower(const uint128_t a, size_t s1,
- const uint128_t b, size_t s2)
- {
- return static_cast<u64bit>((a >> s1) | (b << s2));
- }
-
#endif
/* Sum two numbers: output += in */
diff --git a/src/lib/pubkey/mce/mce_kem.h b/src/lib/pubkey/mce/mce_kem.h
index 14d5cd678..cbb2fc553 100644
--- a/src/lib/pubkey/mce/mce_kem.h
+++ b/src/lib/pubkey/mce/mce_kem.h
@@ -52,4 +52,4 @@ class BOTAN_DLL McEliece_KEM_Decryptor
};
}
-#endif /* h-guard */
+#endif
diff --git a/src/lib/pubkey/mce/mceliece.h b/src/lib/pubkey/mce/mceliece.h
index b0246ac88..649153233 100644
--- a/src/lib/pubkey/mce/mceliece.h
+++ b/src/lib/pubkey/mce/mceliece.h
@@ -9,16 +9,14 @@
*
*/
-
+#ifndef BOTAN_MCELIECE_H__
+#define BOTAN_MCELIECE_H__
#include <botan/secmem.h>
#include <botan/types.h>
#include <botan/pk_ops.h>
#include <botan/mceliece_key.h>
-#ifndef BOTAN_MCELIECE_H__
-#define BOTAN_MCELIECE_H__
-
#define MASK_LOG2_BYTE ((1 << 3) - 1)
#define _BITP_TO_BYTEP(__bit_pos) (__bit_pos >> 3)
#define _BITP_TO_BYTEOFFS(__bit_pos) (__bit_pos & MASK_LOG2_BYTE)