aboutsummaryrefslogtreecommitdiff
path: root/math/miracl
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2014-04-11 03:57:13 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2014-04-11 03:57:13 +0000
commit2ff25b73b3d12108961ca060c86adaf4a77f17d2 (patch)
tree858eaafd46987eb658f8a8f027cbc851621468fb /math/miracl
parent492d310afa3ceedea90b50e202ee9dd03132cf77 (diff)
downloadports-2ff25b73b3d12108961ca060c86adaf4a77f17d2.tar.gz
ports-2ff25b73b3d12108961ca060c86adaf4a77f17d2.zip
Notes
Diffstat (limited to 'math/miracl')
-rw-r--r--math/miracl/files/patch-big.h43
-rw-r--r--math/miracl/files/patch-zzn.h19
2 files changed, 62 insertions, 0 deletions
diff --git a/math/miracl/files/patch-big.h b/math/miracl/files/patch-big.h
new file mode 100644
index 000000000000..35c2fb7176a1
--- /dev/null
+++ b/math/miracl/files/patch-big.h
@@ -0,0 +1,43 @@
+--- ./big.h.orig 2012-03-07 16:18:08.000000000 -0600
++++ ./big.h 2014-04-10 22:50:46.942771472 -0500
+@@ -299,7 +299,7 @@
+ {if (mr_compare(b1.fn,b2.fn)>0) return TRUE; else return FALSE;}
+
+ friend Big from_binary(int,char *);
+- friend int to_binary(const Big&,int,char *,BOOL justify=FALSE);
++ friend int to_binary(const Big&,int,char *,BOOL justify);
+ friend Big modmult(const Big&,const Big&,const Big&);
+ friend Big mad(const Big&,const Big&,const Big&,const Big&,Big&);
+ friend Big norm(const Big&);
+@@ -321,7 +321,7 @@
+ // x^m.y^k mod n
+ friend Big pow(int,Big *,Big *,Big); // x[0]^m[0].x[1].m[1]... mod n
+
+- friend Big luc(const Big& ,const Big&, const Big&, Big *b4=NULL);
++ friend Big luc(const Big& ,const Big&, const Big&, Big *b4);
+ friend Big moddiv(const Big&,const Big&,const Big&);
+ friend Big inverse(const Big&, const Big&);
+ friend void multi_inverse(int,Big*,const Big&,Big *);
+@@ -353,8 +353,8 @@
+ friend void modulo(const Big&);
+ friend BOOL modulo(int,int,int,int,BOOL);
+ friend Big get_modulus(void);
+- friend int window(const Big&,int,int*,int*,int window_size=5);
+- friend int naf_window(const Big&,const Big&,int,int*,int*,int store=11);
++ friend int window(const Big&,int,int*,int*,int window_size);
++ friend int naf_window(const Big&,const Big&,int,int*,int*,int store);
+ friend void jsf(const Big&,const Big&,Big&,Big&,Big&,Big&);
+
+ /* Montgomery stuff */
+@@ -420,7 +420,10 @@
+ extern Big rand(int,int);
+ extern Big strong_rand(csprng *,int,int);
+ extern Big from_binary(int,char *);
+-extern int to_binary(const Big&,int,char *,BOOL);
++extern int to_binary(const Big&,int,char *,BOOL=false);
++extern Big luc(const Big& ,const Big&, const Big&, Big *b4=NULL);
++extern int window(const Big&,int,int*,int*,int window_size=5);
++extern int naf_window(const Big&,const Big&,int,int*,int*,int store=11);
+
+ using namespace std;
+
diff --git a/math/miracl/files/patch-zzn.h b/math/miracl/files/patch-zzn.h
new file mode 100644
index 000000000000..4bf8047dea1c
--- /dev/null
+++ b/math/miracl/files/patch-zzn.h
@@ -0,0 +1,19 @@
+--- ./zzn.h.orig 2014-04-10 22:52:14.562766913 -0500
++++ ./zzn.h 2014-04-10 22:52:17.524768077 -0500
+@@ -183,7 +183,7 @@
+ friend ZZn getB(void); // get B parameter of elliptic curve
+
+ friend ZZn sqrt(const ZZn&); // only works if modulus is prime
+- friend ZZn luc( const ZZn&, const Big&, ZZn* b3=NULL);
++ friend ZZn luc( const ZZn&, const Big&, ZZn* b3);
+
+ big getzzn(void) const;
+
+@@ -206,6 +206,7 @@
+ extern ZZn getA(void);
+ extern ZZn getB(void);
+ extern ZZn one(void);
++extern ZZn luc( const ZZn&, const Big&, ZZn* b3=NULL);
+
+ #endif
+