[Pkg-javascript-commits] [node-diffie-hellman] 33/88: optimization for gen 5
Bastien Roucariès
rouca at moszumanska.debian.org
Thu May 4 10:19:14 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-diffie-hellman.
commit b0cc17d16ffd767fe8b7a814111432930541eb8f
Author: Calvin Metcalf <calvin.metcalf at state.ma.us>
Date: Sun Nov 16 15:35:30 2014 -0500
optimization for gen 5
---
generatePrime.js | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/generatePrime.js b/generatePrime.js
index 38d047b..8857f43 100644
--- a/generatePrime.js
+++ b/generatePrime.js
@@ -9,7 +9,8 @@ var millerRabin = new MillerRabin();
var ONE = new BN(1);
var TWO = new BN(2);
var FIVE = new BN(5);
-var SIX = new BN(6);
+var SIXTEEN = new BN(16);
+var EIGHT = new BN(8);
var TEN = new BN(10);
var THREE = new BN(3);
var SEVEN = new BN(7);
@@ -77,8 +78,8 @@ function findPrime(bits, gen ,crypto) {
rem = out.mod(TEN);
}
comp = {
- major: [FOUR, SIX],
- minor: [TWO, THREE]
+ major: [FOUR, SIXTEEN],
+ minor: [TWO, EIGHT]
};
} else {
comp = {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-diffie-hellman.git
More information about the Pkg-javascript-commits
mailing list