aboutsummaryrefslogtreecommitdiffstats
path: root/src/math
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-11-13 22:51:01 +0000
committerlloyd <[email protected]>2009-11-13 22:51:01 +0000
commit0972ba645555b0bf283eba71e4b9edacdf424eba (patch)
treeec5c59370b7ded3e0cc4e057601bad9df0d5d815 /src/math
parent1860807e4ed230f3aeea0831ec180e55d2f0eaa4 (diff)
parentbe9b28137b0de48d3f86c96655fa1bbc5c70973c (diff)
propagate from branch 'net.randombit.botan' (head ac888e57b614c623590d79ab615353ad7c76ef68)
to branch 'net.randombit.botan.c++0x' (head 9bf78ed7e2521a328f6db7acbc1cd81b07718230)
Diffstat (limited to 'src/math')
-rw-r--r--src/math/bigint/monty_amd64/mp_monty.S2
-rw-r--r--src/math/bigint/mulop_ia32/mp_mulop.S2
-rw-r--r--src/math/gfpmath/curve_gfp.h30
-rw-r--r--src/math/gfpmath/gfp_element.cpp17
-rw-r--r--src/math/gfpmath/gfp_element.h7
-rw-r--r--src/math/gfpmath/gfp_modulus.h7
6 files changed, 23 insertions, 42 deletions
diff --git a/src/math/bigint/monty_amd64/mp_monty.S b/src/math/bigint/monty_amd64/mp_monty.S
index 22045c369..d5f97601d 100644
--- a/src/math/bigint/monty_amd64/mp_monty.S
+++ b/src/math/bigint/monty_amd64/mp_monty.S
@@ -1,5 +1,5 @@
/*
-* Montgomery Reduction Source File
+* Montgomery Reduction in x86-64 assembler
* (C) 2008 Jack Lloyd
*
* Distributed under the terms of the Botan license
diff --git a/src/math/bigint/mulop_ia32/mp_mulop.S b/src/math/bigint/mulop_ia32/mp_mulop.S
index 716166fd9..988ef573c 100644
--- a/src/math/bigint/mulop_ia32/mp_mulop.S
+++ b/src/math/bigint/mulop_ia32/mp_mulop.S
@@ -1,5 +1,5 @@
/*
-* Multiply/Add Algorithm Source File
+* Multiply/Add Algorithm in IA-32 assembler
* (C) 1999-2007 Jack Lloyd
*
* Distributed under the terms of the Botan license
diff --git a/src/math/gfpmath/curve_gfp.h b/src/math/gfpmath/curve_gfp.h
index eab8a57da..5b0ec0558 100644
--- a/src/math/gfpmath/curve_gfp.h
+++ b/src/math/gfpmath/curve_gfp.h
@@ -1,13 +1,10 @@
-/******
- * Elliptic curves over GF(p) (header file)
- *
- * (C) 2007 Martin Doering
- * Christoph Ludwig
- * Falko Strenzke
- ******/
+/*
+* Elliptic curves over GF(p)
+*
+* (C) 2007 Martin Doering, Christoph Ludwig, Falko Strenzke
+*
+* Distributed under the terms of the Botan license
+*/
#ifndef BOTAN_GFP_CURVE_H__
#define BOTAN_GFP_CURVE_H__
@@ -20,8 +17,6 @@ namespace Botan {
/**
* This class represents an elliptic curve over GF(p)
-*
-* Distributed under the terms of the Botan license
*/
class BOTAN_DLL CurveGFp
{
@@ -112,11 +107,12 @@ class BOTAN_DLL CurveGFp
}*/
/**
- * Retrieve a shared pointer to the curves GFpModulus object for efficient storage
- * and computation of montgomery multiplication related data members and functions.
- * Warning: do not use this function unless you know in detail how the sharing of values
- * in the various EC related objects works.
- * Do NOT spread pointers to a GFpModulus over different threads!
+ * Retrieve a shared pointer to the curves GFpModulus object for
+ * efficient storage and computation of montgomery multiplication
+ * related data members and functions. Warning: do not use this
+ * function unless you know in detail how the sharing of values
+ * in the various EC related objects works. Do NOT spread
+ * pointers to a GFpModulus over different threads!
* @result a shared pointer to a GFpModulus object
*/
inline std::shared_ptr<GFpModulus> const get_ptr_mod() const
diff --git a/src/math/gfpmath/gfp_element.cpp b/src/math/gfpmath/gfp_element.cpp
index 55a8a1dd3..872000a58 100644
--- a/src/math/gfpmath/gfp_element.cpp
+++ b/src/math/gfpmath/gfp_element.cpp
@@ -1,12 +1,7 @@
/*
* Arithmetic for prime fields GF(p)
*
-* (C) 2007 Martin Doering
-* Christoph Ludwig
-* Falko Strenzke
+* (C) 2007 Martin Doering, Christoph Ludwig, Falko Strenzke
*
* Distributed under the terms of the Botan license
*/
@@ -24,7 +19,9 @@ namespace Botan {
namespace {
-void inner_montg_mult_sos(word result[], const word* a_bar, const word* b_bar, const word* n, const word* n_dash, u32bit s)
+void inner_montg_mult_sos(word result[],
+ const word* a_bar, const word* b_bar,
+ const word* n, const word* n_dash, u32bit s)
{
SecureVector<word> t;
t.grow_to(2*s+1);
@@ -130,10 +127,8 @@ void montg_mult(BigInt& result, BigInt& a_bar, BigInt& b_bar, const BigInt& m, c
}
/**
-*calculates R=b^n (here b=2) with R>m (and R beeing as small as possible) for an odd modulus m.
-* no check for oddity is performed!
-*
-* Distributed under the terms of the Botan license
+* Calculates R=b^n (here b=2) with R>m (and R beeing as small as
+* possible) for an odd modulus m. No check for parity is performed!
*/
BigInt montgm_calc_r_oddmod(const BigInt& prime)
{
diff --git a/src/math/gfpmath/gfp_element.h b/src/math/gfpmath/gfp_element.h
index f8aaf62db..d340c77b1 100644
--- a/src/math/gfpmath/gfp_element.h
+++ b/src/math/gfpmath/gfp_element.h
@@ -1,12 +1,7 @@
/*
* Arithmetic for prime fields GF(p)
*
-* (C) 2007 Martin Doering
-* Christoph Ludwig
-* Falko Strenzke
+* (C) 2007 Martin Doering, Christoph Ludwig, Falko Strenzke
*
* Distributed under the terms of the Botan license
*/
diff --git a/src/math/gfpmath/gfp_modulus.h b/src/math/gfpmath/gfp_modulus.h
index 8e37e9a73..4773a8b89 100644
--- a/src/math/gfpmath/gfp_modulus.h
+++ b/src/math/gfpmath/gfp_modulus.h
@@ -1,12 +1,7 @@
/*
* Modulus and related data for a specific implementation of GF(p)
*
-* (C) 2008 Martin Döring
-* Christoph Ludwig
-* Falko Strenzke
+* (C) 2008 Martin Doering, Christoph Ludwig, Falko Strenzke
*
* Distributed under the terms of the Botan license
*/