aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/rng.h4
-rw-r--r--src/kdf/tls_prf/prf_tls.h4
-rw-r--r--src/mac/cbc_mac/cbc_mac.h4
-rw-r--r--src/math/bigint/divide.h4
-rw-r--r--src/math/gfpmath/curve_gfp.h28
-rw-r--r--src/math/gfpmath/gfp_element.h18
-rw-r--r--src/math/gfpmath/point_gfp.h2
-rw-r--r--src/pubkey/ec_dompar/ec_dompar.h7
8 files changed, 37 insertions, 34 deletions
diff --git a/src/core/rng.h b/src/core/rng.h
index d6d37a7a0..6a8ce63b2 100644
--- a/src/core/rng.h
+++ b/src/core/rng.h
@@ -3,8 +3,8 @@
* (C) 1999-2008 Jack Lloyd *
*************************************************/
-#ifndef BOTAN_RANDOM_NUMBER_GENERATOR__
-#define BOTAN_RANDOM_NUMBER_GENERATOR__
+#ifndef BOTAN_RANDOM_NUMBER_GENERATOR_H__
+#define BOTAN_RANDOM_NUMBER_GENERATOR_H__
#include <botan/exceptn.h>
diff --git a/src/kdf/tls_prf/prf_tls.h b/src/kdf/tls_prf/prf_tls.h
index 9bd221ca4..e5ddc9c0f 100644
--- a/src/kdf/tls_prf/prf_tls.h
+++ b/src/kdf/tls_prf/prf_tls.h
@@ -3,8 +3,8 @@
* (C) 1999-2007 Jack Lloyd *
*************************************************/
-#ifndef BOTAN_TLS_PRF__
-#define BOTAN_TLS_PRF__
+#ifndef BOTAN_TLS_PRF_H__
+#define BOTAN_TLS_PRF_H__
#include <botan/kdf.h>
#include <botan/base.h>
diff --git a/src/mac/cbc_mac/cbc_mac.h b/src/mac/cbc_mac/cbc_mac.h
index 9559751c8..b3e2b08a9 100644
--- a/src/mac/cbc_mac/cbc_mac.h
+++ b/src/mac/cbc_mac/cbc_mac.h
@@ -3,8 +3,8 @@
* (C) 1999-2007 Jack Lloyd *
*************************************************/
-#ifndef BOTAN_CBC_MAC__
-#define BOTAN_CBC_MAC__
+#ifndef BOTAN_CBC_MAC_H__
+#define BOTAN_CBC_MAC_H__
#include <botan/base.h>
diff --git a/src/math/bigint/divide.h b/src/math/bigint/divide.h
index d0de3da75..a50cbfb47 100644
--- a/src/math/bigint/divide.h
+++ b/src/math/bigint/divide.h
@@ -3,8 +3,8 @@
* (C) 1999-2007 Jack Lloyd *
*************************************************/
-#ifndef BOTAN_DIVISON_ALGORITHM__
-#define BOTAN_DIVISON_ALGORITHM__
+#ifndef BOTAN_DIVISON_ALGORITHM_H__
+#define BOTAN_DIVISON_ALGORITHM_H__
#include <botan/bigint.h>
diff --git a/src/math/gfpmath/curve_gfp.h b/src/math/gfpmath/curve_gfp.h
index dd785c749..4d8f9e1b8 100644
--- a/src/math/gfpmath/curve_gfp.h
+++ b/src/math/gfpmath/curve_gfp.h
@@ -139,9 +139,11 @@ class BOTAN_DLL CurveGFp
// relational operators
bool operator==(const CurveGFp& lhs, const CurveGFp& rhs);
-inline bool operator!=(const CurveGFp& lhs, const CurveGFp& rhs) {
-return !operator==(lhs, rhs);
-}
+
+inline bool operator!=(const CurveGFp& lhs, const CurveGFp& rhs)
+ {
+ return !(lhs == rhs);
+ }
// io operators
std::ostream& operator<<(std::ostream& output, const CurveGFp& elem);
@@ -149,9 +151,10 @@ std::ostream& operator<<(std::ostream& output, const CurveGFp& elem);
// swaps the states of curve1 and curve2, does not throw!
// cf. Meyers, Item 25
inline
-void swap(CurveGFp& curve1, CurveGFp& curve2) {
-curve1.swap(curve2);
-}
+void swap(CurveGFp& curve1, CurveGFp& curve2)
+ {
+ curve1.swap(curve2);
+ }
} // namespace Botan
@@ -160,13 +163,12 @@ namespace std {
// swaps the states of curve1 and curve2, does not throw!
// cf. Meyers, Item 25
-template<>
-inline
-void swap<Botan::CurveGFp>(
- Botan::CurveGFp& curve1,
- Botan::CurveGFp& curve2) {
-curve1.swap(curve2);
-}
+template<> inline
+void swap<Botan::CurveGFp>(Botan::CurveGFp& curve1,
+ Botan::CurveGFp& curve2)
+ {
+ curve1.swap(curve2);
+ }
} // namespace std
diff --git a/src/math/gfpmath/gfp_element.h b/src/math/gfpmath/gfp_element.h
index ab0e0e5ab..6535d7e3e 100644
--- a/src/math/gfpmath/gfp_element.h
+++ b/src/math/gfpmath/gfp_element.h
@@ -68,19 +68,19 @@ class BOTAN_DLL GFpElement
explicit GFpElement (const BigInt& p, const BigInt& value, bool use_montgm = false);
- /** construct an element of GF(p) with the given value (defaults to 0).
- * use_montg defaults to false and determines wether montgomery multiplications
- * will be use when applying operators '*' , '*='.
- * Use this constructor for efficient use of Montgomery multiplication in a context with a
- * fixed a modulus.
- * Warning: do not use this function unless you know in detail about
- * the implications of using
- * the shared GFpModulus objects!
+ /** construct an element of GF(p) with the given value (defaults
+ * to 0). use_montg defaults to false and determines wether
+ * montgomery multiplications will be use when applying operators
+ * '*' , '*='. Use this constructor for efficient use of
+ * Montgomery multiplication in a context with a fixed a modulus.
+ * Warning: do not use this function unless you know in detail
+ * about the implications of using the shared GFpModulus objects!
* @param mod shared pointer to the GFpModulus to be shared
* @param value the element value
* @param use_montgm whether this object will use Montgomery multiplication
*/
- explicit GFpElement(std::tr1::shared_ptr<GFpModulus> const mod, const BigInt& value, bool use_mongm = false);
+ explicit GFpElement(std::tr1::shared_ptr<GFpModulus> const mod,
+ const BigInt& value, bool use_mongm = false);
/**
* Copy constructor
diff --git a/src/math/gfpmath/point_gfp.h b/src/math/gfpmath/point_gfp.h
index 4ecc3e936..8b00987aa 100644
--- a/src/math/gfpmath/point_gfp.h
+++ b/src/math/gfpmath/point_gfp.h
@@ -275,7 +275,7 @@ PointGFp operator*(const BigInt& scalar, const PointGFp& point);
PointGFp operator*(const PointGFp& point, const BigInt& scalar);
PointGFp mult_point_secure(const PointGFp& point, const BigInt& scalar, const BigInt& point_order, const BigInt& max_secret);
-PointGFp const mult2 (const PointGFp& point);
+PointGFp const mult2(const PointGFp& point);
PointGFp const create_random_point(RandomNumberGenerator& rng,
const CurveGFp& curve);
diff --git a/src/pubkey/ec_dompar/ec_dompar.h b/src/pubkey/ec_dompar/ec_dompar.h
index 1fd5ceae0..f7ac627c2 100644
--- a/src/pubkey/ec_dompar/ec_dompar.h
+++ b/src/pubkey/ec_dompar/ec_dompar.h
@@ -1,10 +1,11 @@
/*************************************************
* ECDSA Domain Parameters Header File *
-* (C) 2007 Falko Strenzke, FlexSecure GmbH *
+* (C) 2007 Falko Strenzke, FlexSecure GmbH *
+* 2008 Jack Lloyd *
*************************************************/
-#ifndef EC_DOMPAR_H__
-#define EC_DOMPAR_H__
+#ifndef BOTAN_ECC_DOMAIN_PARAMETERS_H__
+#define BOTAN_ECC_DOMAIN_PARAMETERS_H__
#include <botan/point_gfp.h>
#include <botan/gfp_element.h>