[libmath-prime-util-perl] 18/18: Fixes for final release
Partha P. Mukherjee
ppm-guest at moszumanska.debian.org
Thu May 21 18:48:04 UTC 2015
This is an automated email from the git hooks/post-receive script.
ppm-guest pushed a commit to annotated tag v0.26
in repository libmath-prime-util-perl.
commit 80cb008d0b719746dd390c98f8620aa756a10aee
Author: Dana Jacobsen <dana at acm.org>
Date: Sun Apr 21 16:48:11 2013 -0700
Fixes for final release
---
Changes | 4 ++--
examples/verify-gmp-eccp-cert.pl | 0
lib/Math/Prime/Util.pm | 10 ++++++----
t/81-bignum.t | 18 +++++++++++-------
4 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/Changes b/Changes
index 7176213..c2d3246 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,6 @@
Revision history for Perl extension Math::Prime::Util.
-0.26 xx April 2013
+0.26 21 April 2013
- Pure Perl factoring:
- real p-1 -- much faster and more effective
@@ -14,7 +14,7 @@ Revision history for Perl extension Math::Prime::Util.
verify_prime checks a primality certificate.
- Pure perl primality proof now uses BLS75 instead of Lucas, so some
- numbers will be much faster. n-1 only needs factoring to (n/2)^1/3.
+ numbers will be much faster [n-1 only needs factoring to (n/2)^1/3].
- Math::Prime::Util::ECAffinePoint and ECProjectivePoint modules for
dealing with elliptic curves.
diff --git a/examples/verify-gmp-eccp-cert.pl b/examples/verify-gmp-eccp-cert.pl
old mode 100644
new mode 100755
diff --git a/lib/Math/Prime/Util.pm b/lib/Math/Prime/Util.pm
index 44c9464..1fc59b2 100644
--- a/lib/Math/Prime/Util.pm
+++ b/lib/Math/Prime/Util.pm
@@ -2895,16 +2895,18 @@ A certificate is an array holding an C<n-cert>. An C<n-cert> is one of:
n,"AGKM",[ec-block],[ec-block],...
An Elliptic Curve certificate. We are given n, the method "AGKM"
- or "ECPP", and a one or more 6-element blocks representing a
+ or "ECPP", and one or more 6-element blocks representing a
standard ECPP or Atkin-Goldwasser-Kilian-Morain certificate.
- The format of this n-cert is non-recursive so it can be easily
- used for similar programs such as Sage and GMP-ECPP.
+ In its traditional form, it is non-recursive, with each q value
+ being proved by successive blocks (this makes it easy to use for
+ programs like Sage and GMP-ECPP). A q value is also allowed to
+ be an n-cert, which allows an alternative proof for the last q.
Every ec-block has 6 elements:
N the N value this block proves prime if q is prime
a value describing the elliptic curve to be used
b value describing the elliptic curve to be used
m order of the curve
- q a probable prime > (N^1/4+1)^2
+ q a probable prime > (N^1/4+1)^2 (may be an n-cert)
P a point [x,y] on the curve (affine coordinates)
The certificate passes if:
- the final q can be proved with BPSW.
diff --git a/t/81-bignum.t b/t/81-bignum.t
index dc02569..dc41837 100644
--- a/t/81-bignum.t
+++ b/t/81-bignum.t
@@ -76,7 +76,8 @@ plan tests => 0
+ scalar(keys %allfactors)
+ 5 # moebius, euler_phi, jordan totient
+ 15 # random primes
- + 5 # verify_prime
+ + 3 # verify_prime
+ + 2*$extra # "big" prime verification
+ 0;
# Using GMP makes these tests run about 2x faster on some machines
@@ -292,7 +293,7 @@ sub check_pcbounds {
###############################################################################
# Provable primes
-SKIP: {
+{
my @proof;
@proof = (20907001, "Pratt", [ 2,
@@ -315,8 +316,14 @@ SKIP: {
[ 2, 2, 2, 2, 2 ]);
ok( verify_prime(@proof), "simple n-1 proof verified" );
- skip "Skipping bigger proofs without fast BigInt library", 3
- if $bigintlib !~ /^(GMP|Pari)/;
+ @proof = ('677826928624294778921',"AGKM", ['677826928624294778921', '404277700094248015180', '599134911995823048257', '677826928656744857936', '104088901820753203', ['2293544533', '356794037129589115041']], ['104088901820753203', '0', '73704321689372825', '104088902465395836', '1112795797', ['3380482019', '53320146243107032']], ['1112795797', '0', '638297481', '1112860899', '39019', ['166385704', '356512285']]);
+ ok( verify_prime(@proof), "ECPP primality proof of 677826928624294778921 verified" );
+}
+
+if ($extra) {
+ my @proof;
+ #skip "Skipping bigger proofs without fast BigInt library", 2
+ # if $bigintlib !~ /^(GMP|Pari)/;
@proof = ('6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057151', 'n-1',
[ 2,3,5,11,17,31,41,53,131,157,521,1613,61681,8191,42641,858001,51481, '7623851', '308761441' ],
@@ -331,7 +338,4 @@ SKIP: {
] ],
[ 3,5,3,2,3,3,3,3 ] );
ok( verify_prime(@proof), "2**607-1 primality proof verified" );
-
- @proof = ('677826928624294778921',"AGKM", ['677826928624294778921', '404277700094248015180', '599134911995823048257', '677826928656744857936', '104088901820753203', ['2293544533', '356794037129589115041']], ['104088901820753203', '0', '73704321689372825', '104088902465395836', '1112795797', ['3380482019', '53320146243107032']], ['1112795797', '0', '638297481', '1112860899', '39019', ['166385704', '356512285']]);
- ok( verify_prime(@proof), "ECPP primality proof of 677826928624294778921 verified" );
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmath-prime-util-perl.git
More information about the Pkg-perl-cvs-commits
mailing list