summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/Clipperz/Crypto
Unidiff
Diffstat (limited to 'frontend/gamma/js/Clipperz/Crypto') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/gamma/js/Clipperz/Crypto/AES.js29
-rw-r--r--frontend/gamma/js/Clipperz/Crypto/Base.js22
-rw-r--r--frontend/gamma/js/Clipperz/Crypto/BigInt.js23
-rw-r--r--frontend/gamma/js/Clipperz/Crypto/BigInt_scoped.js22
-rw-r--r--frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Curve.js83
-rw-r--r--frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js26
-rw-r--r--frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Point.js22
-rw-r--r--frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Value.js24
-rw-r--r--frontend/gamma/js/Clipperz/Crypto/ECC/StandardCurves.js31
-rw-r--r--frontend/gamma/js/Clipperz/Crypto/PRNG.js33
-rw-r--r--frontend/gamma/js/Clipperz/Crypto/RSA.js22
-rw-r--r--frontend/gamma/js/Clipperz/Crypto/SHA.js22
-rw-r--r--frontend/gamma/js/Clipperz/Crypto/SRP.js36
13 files changed, 145 insertions, 250 deletions
diff --git a/frontend/gamma/js/Clipperz/Crypto/AES.js b/frontend/gamma/js/Clipperz/Crypto/AES.js
index c811f1c..cb56f11 100644
--- a/frontend/gamma/js/Clipperz/Crypto/AES.js
+++ b/frontend/gamma/js/Clipperz/Crypto/AES.js
@@ -2,6 +2,5 @@
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
@@ -9,10 +8,10 @@ refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
@@ -20,4 +19,3 @@ refer to http://www.clipperz.com.
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
@@ -122,3 +120,2 @@ Clipperz.Crypto.AES.DeferredExecutionContext.prototype = MochiKit.Base.update(nu
122 'isDone': function () { 120 'isDone': function () {
123//console.log("isDone", this.executionStep(), this.messageLength());
124 return (this._executionStep >= this._messageLength); 121 return (this._executionStep >= this._messageLength);
@@ -146,3 +143,3 @@ Clipperz.Crypto.AES.Key = function(args) {
146 } else { 143 } else {
147 MochiKit.Logging.logError("AES unsupported key size: " + (this.keySize() * 8) + " bits"); 144 Clipperz.logError("AES unsupported key size: " + (this.keySize() * 8) + " bits");
148 throw Clipperz.Crypto.AES.exception.UnsupportedKeySize; 145 throw Clipperz.Crypto.AES.exception.UnsupportedKeySize;
@@ -810,3 +807,2 @@ MochiKit.Base.update(Clipperz.Crypto.AES, {
810 deferredResult = new Clipperz.Async.Deferred("AES.deferredEncrypt"); 807 deferredResult = new Clipperz.Async.Deferred("AES.deferredEncrypt");
811//deferredResult.addCallback(function (aValue) { console.log(">>> deferredEncrypt"); return aValue; });
812 deferredResult.addCallback(Clipperz.Crypto.AES.deferredEncryptBlocks); 808 deferredResult.addCallback(Clipperz.Crypto.AES.deferredEncryptBlocks);
@@ -820,3 +816,2 @@ MochiKit.Base.update(Clipperz.Crypto.AES, {
820 }); 816 });
821//deferredResult.addCallback(function (aValue) { console.log("<<< deferredEncrypt"); return aValue; });
822 deferredResult.callback(executionContext) 817 deferredResult.callback(executionContext)
@@ -840,3 +835,2 @@ MochiKit.Base.update(Clipperz.Crypto.AES, {
840 deferredResult = new Clipperz.Async.Deferred("AES.deferredDecrypt"); 835 deferredResult = new Clipperz.Async.Deferred("AES.deferredDecrypt");
841//deferredResult.addCallback(function (aValue) { console.log(">>> deferredDecrypt"); return aValue; });
842 deferredResult.addCallback(Clipperz.Crypto.AES.deferredEncryptBlocks); 836 deferredResult.addCallback(Clipperz.Crypto.AES.deferredEncryptBlocks);
@@ -845,3 +839,2 @@ MochiKit.Base.update(Clipperz.Crypto.AES, {
845 }); 839 });
846//deferredResult.addCallback(function (aValue) { console.log("<<< deferredDecrypt"); return aValue; });
847 deferredResult.callback(executionContext); 840 deferredResult.callback(executionContext);
diff --git a/frontend/gamma/js/Clipperz/Crypto/Base.js b/frontend/gamma/js/Clipperz/Crypto/Base.js
index d3a8e36..9acfc49 100644
--- a/frontend/gamma/js/Clipperz/Crypto/Base.js
+++ b/frontend/gamma/js/Clipperz/Crypto/Base.js
@@ -2,6 +2,5 @@
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
@@ -9,10 +8,10 @@ refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
@@ -20,4 +19,3 @@ refer to http://www.clipperz.com.
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
diff --git a/frontend/gamma/js/Clipperz/Crypto/BigInt.js b/frontend/gamma/js/Clipperz/Crypto/BigInt.js
index 41483a3..031ed30 100644
--- a/frontend/gamma/js/Clipperz/Crypto/BigInt.js
+++ b/frontend/gamma/js/Clipperz/Crypto/BigInt.js
@@ -2,6 +2,5 @@
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
@@ -9,10 +8,10 @@ refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
@@ -20,4 +19,3 @@ refer to http://www.clipperz.com.
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
@@ -1479,3 +1477,2 @@ MochiKit.Base.update(Clipperz.Crypto.BigInt.prototype, {
1479 var i, c; 1477 var i, c;
1480 //MochiKit.Logging.logDebug(">>> FIXING BigInt.asString length issue")
1481 c = (minimumLength - result.length); 1478 c = (minimumLength - result.length);
diff --git a/frontend/gamma/js/Clipperz/Crypto/BigInt_scoped.js b/frontend/gamma/js/Clipperz/Crypto/BigInt_scoped.js
index f91c7e9..bc60330 100644
--- a/frontend/gamma/js/Clipperz/Crypto/BigInt_scoped.js
+++ b/frontend/gamma/js/Clipperz/Crypto/BigInt_scoped.js
@@ -2,6 +2,5 @@
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
@@ -9,10 +8,10 @@ refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
@@ -20,4 +19,3 @@ refer to http://www.clipperz.com.
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
diff --git a/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Curve.js b/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Curve.js
index 19f19c2..0d76b9c 100644
--- a/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Curve.js
+++ b/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Curve.js
@@ -2,6 +2,5 @@
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
@@ -9,10 +8,10 @@ refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
@@ -20,4 +19,3 @@ refer to http://www.clipperz.com.
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
@@ -104,18 +102,9 @@ Clipperz.Crypto.ECC.BinaryField.Curve.prototype = MochiKit.Base.update(null, {
104 102
105//console.log(">>> ECC.BinaryField.Curve.add");
106 if (aPointA.isZero()) { 103 if (aPointA.isZero()) {
107//console.log("--- pointA == zero");
108 result = aPointB; 104 result = aPointB;
109 } else if (aPointB.isZero()) { 105 } else if (aPointB.isZero()) {
110//console.log("--- pointB == zero");
111 result = aPointA; 106 result = aPointA;
112 } else if ((aPointA.x().compare(aPointB.x()) == 0) && ((aPointA.y().compare(aPointB.y()) != 0) || aPointB.x().isZero())) { 107 } else if ((aPointA.x().compare(aPointB.x()) == 0) && ((aPointA.y().compare(aPointB.y()) != 0) || aPointB.x().isZero())) {
113//console.log("compare A.x - B.x: ", aPointA.x().compare(aPointB.x()));
114//console.log("compare A.y - B.y: ", (aPointA.y().compare(aPointB.y()) != 0));
115//console.log("compare B.x.isZero(): ", aPointB.x().isZero());
116
117//console.log("--- result = zero");
118 result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O}); 108 result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O});
119 } else { 109 } else {
120//console.log("--- result = ELSE");
121 varf2m; 110 varf2m;
@@ -133,3 +122,2 @@ Clipperz.Crypto.ECC.BinaryField.Curve.prototype = MochiKit.Base.update(null, {
133 if (aPointA.x().compare(aPointB.x()) != 0) { 122 if (aPointA.x().compare(aPointB.x()) != 0) {
134//console.log(" a.x != b.x");
135 lambda =f2m._fastMultiply( 123 lambda =f2m._fastMultiply(
@@ -143,9 +131,5 @@ Clipperz.Crypto.ECC.BinaryField.Curve.prototype = MochiKit.Base.update(null, {
143 } else { 131 } else {
144//console.log(" a.x == b.x");
145 lambda = f2m._add(bX, f2m._fastMultiply(bY, f2m._inverse(bX))); 132 lambda = f2m._add(bX, f2m._fastMultiply(bY, f2m._inverse(bX)));
146//console.log(" lambda: " + lambda.asString(16));
147 x = f2m._add(this.a()._value, f2m._square(lambda)); 133 x = f2m._add(this.a()._value, f2m._square(lambda));
148//console.log(" x (step 1): " + x.asString(16));
149 f2m._overwriteAdd(x, lambda); 134 f2m._overwriteAdd(x, lambda);
150//console.log(" x (step 2): " + x.asString(16));
151 } 135 }
@@ -153,7 +137,4 @@ Clipperz.Crypto.ECC.BinaryField.Curve.prototype = MochiKit.Base.update(null, {
153 y = f2m._fastMultiply(f2m._add(bX, x), lambda); 137 y = f2m._fastMultiply(f2m._add(bX, x), lambda);
154//console.log(" y (step 1): " + y.asString(16));
155 f2m._overwriteAdd(y, x); 138 f2m._overwriteAdd(y, x);
156//console.log(" y (step 2): " + y.asString(16));
157 f2m._overwriteAdd(y, bY); 139 f2m._overwriteAdd(y, bY);
158//console.log(" y (step 3): " + y.asString(16));
159 140
@@ -161,3 +142,2 @@ Clipperz.Crypto.ECC.BinaryField.Curve.prototype = MochiKit.Base.update(null, {
161 } 142 }
162//console.log("<<< ECC.BinaryField.Curve.add");
163 143
@@ -199,3 +179,2 @@ Clipperz.Crypto.ECC.BinaryField.Curve.prototype = MochiKit.Base.update(null, {
199 if (aPointA.x().compare(aPointB.x()) != 0) { 179 if (aPointA.x().compare(aPointB.x()) != 0) {
200//console.log(" a.x != b.x");
201 lambda =f2m._fastMultiply( 180 lambda =f2m._fastMultiply(
@@ -209,9 +188,5 @@ Clipperz.Crypto.ECC.BinaryField.Curve.prototype = MochiKit.Base.update(null, {
209 } else { 188 } else {
210//console.log(" a.x == b.x");
211 lambda = f2m._add(bX, f2m._fastMultiply(bY, f2m._inverse(bX))); 189 lambda = f2m._add(bX, f2m._fastMultiply(bY, f2m._inverse(bX)));
212//console.log(" lambda: " + lambda.asString(16));
213 x = f2m._add(this.a()._value, f2m._square(lambda)); 190 x = f2m._add(this.a()._value, f2m._square(lambda));
214//console.log(" x (step 1): " + x.asString(16));
215 f2m._overwriteAdd(x, lambda); 191 f2m._overwriteAdd(x, lambda);
216//console.log(" x (step 2): " + x.asString(16));
217 } 192 }
@@ -219,7 +194,4 @@ Clipperz.Crypto.ECC.BinaryField.Curve.prototype = MochiKit.Base.update(null, {
219 y = f2m._fastMultiply(f2m._add(bX, x), lambda); 194 y = f2m._fastMultiply(f2m._add(bX, x), lambda);
220//console.log(" y (step 1): " + y.asString(16));
221 f2m._overwriteAdd(y, x); 195 f2m._overwriteAdd(y, x);
222//console.log(" y (step 2): " + y.asString(16));
223 f2m._overwriteAdd(y, bY); 196 f2m._overwriteAdd(y, bY);
224//console.log(" y (step 3): " + y.asString(16));
225 197
@@ -230,3 +202,2 @@ Clipperz.Crypto.ECC.BinaryField.Curve.prototype = MochiKit.Base.update(null, {
230 } 202 }
231//console.log("<<< ECC.BinaryField.Curve.add");
232 203
@@ -252,3 +223,3 @@ Clipperz.Crypto.ECC.BinaryField.Curve.prototype = MochiKit.Base.update(null, {
252 } else { 223 } else {
253MochiKit.Logging.logError("The Clipperz.Crypto.ECC.BinaryFields.Value does not work with negative values!!!!"); 224 Clipperz.logError("The Clipperz.Crypto.ECC.BinaryFields.Value does not work with negative values!!!!");
254 k = aValue.negate(); 225 k = aValue.negate();
@@ -257,4 +228,2 @@ MochiKit.Logging.logError("The Clipperz.Crypto.ECC.BinaryFields.Value does not w
257 228
258//console.log("k: " + k.toString(16));
259//console.log("k.bitSize: " + k.bitSize());
260 for (i=k.bitSize()-1; i>=0; i--) { 229 for (i=k.bitSize()-1; i>=0; i--) {
@@ -267,3 +236,3 @@ MochiKit.Logging.logError("The Clipperz.Crypto.ECC.BinaryFields.Value does not w
267 236
268 // if (countIndex==100) {console.log("multiply.break"); break;} else countIndex++; 237 // if (countIndex==100) {Clipperz.log("multiply.break"); break;} else countIndex++;
269 } 238 }
@@ -281,3 +250,3 @@ MochiKit.Logging.logError("The Clipperz.Crypto.ECC.BinaryFields.Value does not w
281 250
282MochiKit.Logging.logDebug(">>> deferredMultiply - value: " + aValue + ", point: " + aPoint); 251Clipperz.log(">>> deferredMultiply - value: " + aValue + ", point: " + aPoint);
283//console.profile("ECC.Curve.multiply"); 252//console.profile("ECC.Curve.multiply");
@@ -285,6 +254,6 @@ MochiKit.Logging.logDebug(">>> deferredMultiply - value: " + aValue + ", point:
285//deferredResult.addCallback(function(res) {console.profile("ECC.Curve.deferredMultiply"); return res;} ); 254//deferredResult.addCallback(function(res) {console.profile("ECC.Curve.deferredMultiply"); return res;} );
286//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("# 1: " + res); return res;}); 255//deferredResult.addBoth(function(res) {Clipperz.logDebug("# 1: " + res); return res;});
287 256
288 result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O}); 257 result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O});
289//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("# 2: " + res); return res;}); 258//deferredResult.addBoth(function(res) {Clipperz.logDebug("# 2: " + res); return res;});
290 259
@@ -299,3 +268,3 @@ MochiKit.Logging.logDebug(">>> deferredMultiply - value: " + aValue + ", point:
299 } else { 268 } else {
300MochiKit.Logging.logError("The Clipperz.Crypto.ECC.BinaryFields.Value does not work with negative values!!!!"); 269 Clipperz.logError("The Clipperz.Crypto.ECC.BinaryFields.Value does not work with negative values!!!!");
301 k = aValue.negate(); 270 k = aValue.negate();
@@ -304,9 +273,4 @@ MochiKit.Logging.logError("The Clipperz.Crypto.ECC.BinaryFields.Value does not w
304 273
305//console.log("k: " + k.toString(16));
306//console.log("k.bitSize: " + k.bitSize());
307 274
308//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("# 3: " + res); return res;});
309 for (i=k.bitSize()-1; i>=0; i--) { 275 for (i=k.bitSize()-1; i>=0; i--) {
310//MochiKit.Logging.logDebug("====> " + i);
311//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("# 4 > i = " + i + ": " + res); return res;});
312 deferredResult.addMethod(this, "addTwice"); 276 deferredResult.addMethod(this, "addTwice");
@@ -320,12 +284,6 @@ MochiKit.Logging.logError("The Clipperz.Crypto.ECC.BinaryFields.Value does not w
320 if (i%20 == 0) {deferredResult.addCallback(MochiKit.Async.wait, 0.1);} 284 if (i%20 == 0) {deferredResult.addCallback(MochiKit.Async.wait, 0.1);}
321
322 // if (countIndex==100) {console.log("multiply.break"); break;} else countIndex++;
323//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("# 4 < i = " + i + ": " + res); return res;});
324 } 285 }
325//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("# 4: " + res); return res;});
326 } 286 }
327//#console.profileEnd(); 287//#console.profileEnd();
328//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("# 5: " + res); return res;});
329//deferredResult.addBoth(function(res) {console.profileEnd(); return res;}); 288//deferredResult.addBoth(function(res) {console.profileEnd(); return res;});
330//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("# 6: " + res); return res;});
331 deferredResult.callback(result); 289 deferredResult.callback(result);
@@ -443,3 +401,3 @@ MochiKit.Base.update(Clipperz.Crypto.ECC.StandardCurves, {
443 if (aValue.bitSize() > 1140) { 401 if (aValue.bitSize() > 1140) {
444 MochiKit.Logging.logWarning("ECC.StandarCurves.B571.finiteField().module: falling back to default implementation"); 402 Clipperz.logWarning("ECC.StandarCurves.B571.finiteField().module: falling back to default implementation");
445 result = Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().slowModule(aValue); 403 result = Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().slowModule(aValue);
@@ -449,4 +407,2 @@ MochiKit.Base.update(Clipperz.Crypto.ECC.StandardCurves, {
449 407
450//console.log(">>> binaryField.finiteField.(improved)module");
451 // C = aValue.value().slice(0);
452 C = aValue._value.slice(0); 408 C = aValue._value.slice(0);
@@ -466,3 +422,2 @@ MochiKit.Base.update(Clipperz.Crypto.ECC.StandardCurves, {
466 result = new Clipperz.Crypto.ECC.BinaryField.Value(C); 422 result = new Clipperz.Crypto.ECC.BinaryField.Value(C);
467//console.log("<<< binaryField.finiteField.(improved)module");
468 } 423 }
@@ -509,3 +464,3 @@ MochiKit.Base.update(Clipperz.Crypto.ECC.StandardCurves, {
509 if (aValue.bitSize() > 564) { 464 if (aValue.bitSize() > 564) {
510 MochiKit.Logging.logWarning("ECC.StandarCurves.B283.finiteField().module: falling back to default implementation"); 465 Clipperz.logWarning("ECC.StandarCurves.B283.finiteField().module: falling back to default implementation");
511 result = Clipperz.Crypto.ECC.StandardCurves._B283.finiteField().slowModule(aValue); 466 result = Clipperz.Crypto.ECC.StandardCurves._B283.finiteField().slowModule(aValue);
@@ -515,3 +470,2 @@ MochiKit.Base.update(Clipperz.Crypto.ECC.StandardCurves, {
515 470
516//console.log(">>> binaryField.finiteField.(improved)module");
517 C = aValue._value.slice(0); 471 C = aValue._value.slice(0);
@@ -531,3 +485,2 @@ MochiKit.Base.update(Clipperz.Crypto.ECC.StandardCurves, {
531 result = new Clipperz.Crypto.ECC.BinaryField.Value(C); 485 result = new Clipperz.Crypto.ECC.BinaryField.Value(C);
532//console.log("<<< binaryField.finiteField.(improved)module");
533 } 486 }
diff --git a/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js b/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js
index 56f257a..7b7c2c6 100644
--- a/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js
+++ b/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js
@@ -2,6 +2,5 @@
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
@@ -9,10 +8,10 @@ refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
@@ -20,4 +19,3 @@ refer to http://www.clipperz.com.
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
@@ -55,3 +53,2 @@ Clipperz.Crypto.ECC.BinaryField.FiniteField.prototype = MochiKit.Base.update(nul
55 var modulusComparison; 53 var modulusComparison;
56//console.log(">>> binaryField.finiteField.(standard)module");
57 54
@@ -76,4 +73,3 @@ Clipperz.Crypto.ECC.BinaryField.FiniteField.prototype = MochiKit.Base.update(nul
76 } 73 }
77//console.log("<<< binaryField.finiteField.(standard)module"); 74
78
79 return result; 75 return result;
diff --git a/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Point.js b/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Point.js
index ffe287b..fef3220 100644
--- a/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Point.js
+++ b/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Point.js
@@ -2,6 +2,5 @@
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
@@ -9,10 +8,10 @@ refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
@@ -20,4 +19,3 @@ refer to http://www.clipperz.com.
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
diff --git a/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Value.js b/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Value.js
index b705a20..634772a 100644
--- a/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Value.js
+++ b/frontend/gamma/js/Clipperz/Crypto/ECC/BinaryField/Value.js
@@ -2,6 +2,5 @@
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
@@ -9,10 +8,10 @@ refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
@@ -20,4 +19,3 @@ refer to http://www.clipperz.com.
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
@@ -370,4 +368,2 @@ Clipperz.Crypto.ECC.BinaryField.Value._compare = function(a,b) {
370 for (i=0; (i<c) && (result==0); i++) { 368 for (i=0; (i<c) && (result==0); i++) {
371//console.log("compare[" + c + " - " + i + " - 1] " + this.value()[c-i-1] + ", " + aValue.value()[c-i-1]);
372 // result = MochiKit.Base.compare(this.value()[c-i-1], aValue.value()[c-i-1]);
373 result = MochiKit.Base.compare(a[c-i-1], b[c-i-1]); 369 result = MochiKit.Base.compare(a[c-i-1], b[c-i-1]);
diff --git a/frontend/gamma/js/Clipperz/Crypto/ECC/StandardCurves.js b/frontend/gamma/js/Clipperz/Crypto/ECC/StandardCurves.js
index be197e3..239e264 100644
--- a/frontend/gamma/js/Clipperz/Crypto/ECC/StandardCurves.js
+++ b/frontend/gamma/js/Clipperz/Crypto/ECC/StandardCurves.js
@@ -2,6 +2,5 @@
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
@@ -9,10 +8,10 @@ refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
@@ -20,4 +19,3 @@ refer to http://www.clipperz.com.
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
@@ -136,3 +134,3 @@ MochiKit.Base.update(Clipperz.Crypto.ECC.StandardCurves, {
136 if (aValue.bitSize() > 1140) { 134 if (aValue.bitSize() > 1140) {
137 MochiKit.Logging.logWarning("ECC.StandarCurves.B571.finiteField().module: falling back to default implementation"); 135 Clipperz.logWarning("ECC.StandarCurves.B571.finiteField().module: falling back to default implementation");
138 result = Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().slowModule(aValue); 136 result = Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().slowModule(aValue);
@@ -142,4 +140,2 @@ MochiKit.Base.update(Clipperz.Crypto.ECC.StandardCurves, {
142 140
143//console.log(">>> binaryField.finiteField.(improved)module");
144 // C = aValue.value().slice(0);
145 C = aValue._value.slice(0); 141 C = aValue._value.slice(0);
@@ -159,3 +155,2 @@ MochiKit.Base.update(Clipperz.Crypto.ECC.StandardCurves, {
159 result = new Clipperz.Crypto.ECC.BinaryField.Value(C); 155 result = new Clipperz.Crypto.ECC.BinaryField.Value(C);
160//console.log("<<< binaryField.finiteField.(improved)module");
161 } 156 }
@@ -198,3 +193,3 @@ MochiKit.Base.update(Clipperz.Crypto.ECC.StandardCurves, {
198 if (aValue.bitSize() > 564) { 193 if (aValue.bitSize() > 564) {
199 MochiKit.Logging.logWarning("ECC.StandarCurves.B283.finiteField().module: falling back to default implementation"); 194 Clipperz.logWarning("ECC.StandarCurves.B283.finiteField().module: falling back to default implementation");
200 result = Clipperz.Crypto.ECC.StandardCurves._B283.finiteField().slowModule(aValue); 195 result = Clipperz.Crypto.ECC.StandardCurves._B283.finiteField().slowModule(aValue);
@@ -204,3 +199,2 @@ MochiKit.Base.update(Clipperz.Crypto.ECC.StandardCurves, {
204 199
205//console.log(">>> binaryField.finiteField.(improved)module");
206 C = aValue._value.slice(0); 200 C = aValue._value.slice(0);
@@ -220,3 +214,2 @@ MochiKit.Base.update(Clipperz.Crypto.ECC.StandardCurves, {
220 result = new Clipperz.Crypto.ECC.BinaryField.Value(C); 214 result = new Clipperz.Crypto.ECC.BinaryField.Value(C);
221//console.log("<<< binaryField.finiteField.(improved)module");
222 } 215 }
diff --git a/frontend/gamma/js/Clipperz/Crypto/PRNG.js b/frontend/gamma/js/Clipperz/Crypto/PRNG.js
index adfdb16..c539f06 100644
--- a/frontend/gamma/js/Clipperz/Crypto/PRNG.js
+++ b/frontend/gamma/js/Clipperz/Crypto/PRNG.js
@@ -2,6 +2,5 @@
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
@@ -9,10 +8,10 @@ refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
@@ -20,4 +19,3 @@ refer to http://www.clipperz.com.
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
@@ -491,3 +489,2 @@ Clipperz.Crypto.PRNG.Fortuna.prototype = MochiKit.Base.update(null, {
491 if (reseedCounter == 1) { 489 if (reseedCounter == 1) {
492//MochiKit.Logging.logDebug("### PRNG.readyToGenerateRandomBytes");
493Clipperz.log("### PRNG.readyToGenerateRandomBytes"); 490Clipperz.log("### PRNG.readyToGenerateRandomBytes");
@@ -562,3 +559,3 @@ Clipperz.log("### PRNG.readyToGenerateRandomBytes");
562 } else { 559 } else {
563MochiKit.Logging.logWarning("Fortuna generator has not enough entropy, yet!"); 560Clipperz.logWarning("Fortuna generator has not enough entropy, yet!");
564 throw Clipperz.Crypto.PRNG.exception.NotEnoughEntropy; 561 throw Clipperz.Crypto.PRNG.exception.NotEnoughEntropy;
@@ -612,17 +609,10 @@ MochiKit.Logging.logWarning("Fortuna generator has not enough entropy, yet!");
612 609
613//MochiKit.Logging.logDebug(">>> PRNG.deferredEntropyCollection");
614 610
615 if (this.isReadyToGenerateRandomValues()) { 611 if (this.isReadyToGenerateRandomValues()) {
616//MochiKit.Logging.logDebug("--- PRNG.deferredEntropyCollection - 1");
617 result = aValue; 612 result = aValue;
618 } else { 613 } else {
619//MochiKit.Logging.logDebug("--- PRNG.deferredEntropyCollection - 2");
620 var deferredResult; 614 var deferredResult;
621 615
622 // Clipperz.NotificationCenter.notify(this, 'updatedProgressState', 'collectingEntropy', true);
623
624 deferredResult = new Clipperz.Async.Deferred("PRNG.deferredEntropyCollection"); 616 deferredResult = new Clipperz.Async.Deferred("PRNG.deferredEntropyCollection");
625 // deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.1 - PRNG.deferredEntropyCollection - 1: " + res); return res;});
626 deferredResult.addCallback(MochiKit.Base.partial(MochiKit.Async.succeed, aValue)); 617 deferredResult.addCallback(MochiKit.Base.partial(MochiKit.Async.succeed, aValue));
627 // deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.2 - PRNG.deferredEntropyCollection - 2: " + res); return res;});
628 MochiKit.Signal.connect(this, 618 MochiKit.Signal.connect(this,
@@ -634,3 +624,2 @@ MochiKit.Logging.logWarning("Fortuna generator has not enough entropy, yet!");
634 } 624 }
635//MochiKit.Logging.logDebug("<<< PRNG.deferredEntropyCollection - result: " + result);
636 625
diff --git a/frontend/gamma/js/Clipperz/Crypto/RSA.js b/frontend/gamma/js/Clipperz/Crypto/RSA.js
index 6844dba..5a480f1 100644
--- a/frontend/gamma/js/Clipperz/Crypto/RSA.js
+++ b/frontend/gamma/js/Clipperz/Crypto/RSA.js
@@ -2,6 +2,5 @@
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
@@ -9,10 +8,10 @@ refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
@@ -20,4 +19,3 @@ refer to http://www.clipperz.com.
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
diff --git a/frontend/gamma/js/Clipperz/Crypto/SHA.js b/frontend/gamma/js/Clipperz/Crypto/SHA.js
index b07fa85..f8bfe6e 100644
--- a/frontend/gamma/js/Clipperz/Crypto/SHA.js
+++ b/frontend/gamma/js/Clipperz/Crypto/SHA.js
@@ -2,6 +2,5 @@
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
@@ -9,10 +8,10 @@ refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
@@ -20,4 +19,3 @@ refer to http://www.clipperz.com.
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
diff --git a/frontend/gamma/js/Clipperz/Crypto/SRP.js b/frontend/gamma/js/Clipperz/Crypto/SRP.js
index 3b25275..597e72d 100644
--- a/frontend/gamma/js/Clipperz/Crypto/SRP.js
+++ b/frontend/gamma/js/Clipperz/Crypto/SRP.js
@@ -2,6 +2,5 @@
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
@@ -9,10 +8,10 @@ refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
@@ -20,4 +19,3 @@ refer to http://www.clipperz.com.
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
@@ -133,3 +131,2 @@ Clipperz.Crypto.SRP.Connection.prototype = MochiKit.Base.update(null, {
133 // this._a = new Clipperz.Crypto.BigInt("37532428169486597638072888476611365392249575518156687476805936694442691012367", 10); 131 // this._a = new Clipperz.Crypto.BigInt("37532428169486597638072888476611365392249575518156687476805936694442691012367", 10);
134//MochiKit.Logging.logDebug("SRP a: " + this._a);
135 } 132 }
@@ -147,6 +144,5 @@ Clipperz.Crypto.SRP.Connection.prototype = MochiKit.Base.update(null, {
147 if (this._A.equals(0)) { 144 if (this._A.equals(0)) {
148MochiKit.Logging.logError("Clipperz.Crypto.SRP.Connection: trying to set 'A' to 0."); 145 Clipperz.logError("Clipperz.Crypto.SRP.Connection: trying to set 'A' to 0.");
149 throw Clipperz.Crypto.SRP.exception.InvalidValue; 146 throw Clipperz.Crypto.SRP.exception.InvalidValue;
150 } 147 }
151//MochiKit.Logging.logDebug("SRP A: " + this._A);
152 } 148 }
@@ -160,3 +156,2 @@ MochiKit.Logging.logError("Clipperz.Crypto.SRP.Connection: trying to set 'A' to
160 return this._s; 156 return this._s;
161//MochiKit.Logging.logDebug("SRP s: " + this._S);
162 }, 157 },
@@ -177,5 +172,4 @@ MochiKit.Logging.logError("Clipperz.Crypto.SRP.Connection: trying to set 'A' to
177 this._B = aValue; 172 this._B = aValue;
178//MochiKit.Logging.logDebug("SRP B: " + this._B);
179 } else { 173 } else {
180MochiKit.Logging.logError("Clipperz.Crypto.SRP.Connection: trying to set 'B' to 0."); 174 Clipperz.logError("Clipperz.Crypto.SRP.Connection: trying to set 'B' to 0.");
181 throw Clipperz.Crypto.SRP.exception.InvalidValue; 175 throw Clipperz.Crypto.SRP.exception.InvalidValue;
@@ -189,3 +183,2 @@ MochiKit.Logging.logError("Clipperz.Crypto.SRP.Connection: trying to set 'B' to
189 this._x = new Clipperz.Crypto.BigInt(this.stringHash(this.s().asString(16, 64) + this.P()), 16); 183 this._x = new Clipperz.Crypto.BigInt(this.stringHash(this.s().asString(16, 64) + this.P()), 16);
190//MochiKit.Logging.logDebug("SRP x: " + this._x);
191 } 184 }
@@ -200,3 +193,2 @@ MochiKit.Logging.logError("Clipperz.Crypto.SRP.Connection: trying to set 'B' to
200 this._u = new Clipperz.Crypto.BigInt(this.stringHash(this.B().asString()), 16); 193 this._u = new Clipperz.Crypto.BigInt(this.stringHash(this.B().asString()), 16);
201//MochiKit.Logging.logDebug("SRP u: " + this._u);
202 } 194 }
@@ -221,3 +213,2 @@ MochiKit.Logging.logError("Clipperz.Crypto.SRP.Connection: trying to set 'B' to
221 ) 213 )
222//MochiKit.Logging.logDebug("SRP S: " + this._S);
223 } 214 }
@@ -232,3 +223,2 @@ MochiKit.Logging.logError("Clipperz.Crypto.SRP.Connection: trying to set 'B' to
232 this._K = this.stringHash(this.S().asString()); 223 this._K = this.stringHash(this.S().asString());
233//MochiKit.Logging.logDebug("SRP K: " + this._K);
234 } 224 }
@@ -243,3 +233,2 @@ MochiKit.Logging.logError("Clipperz.Crypto.SRP.Connection: trying to set 'B' to
243 this._M1 = this.stringHash(this.A().asString(10) + this.B().asString(10) + this.K()); 233 this._M1 = this.stringHash(this.A().asString(10) + this.B().asString(10) + this.K());
244//MochiKit.Logging.logDebug("SRP M1: " + this._M1);
245 } 234 }
@@ -254,3 +243,2 @@ MochiKit.Logging.logError("Clipperz.Crypto.SRP.Connection: trying to set 'B' to
254 this._M2 = this.stringHash(this.A().asString(10) + this.M1() + this.K()); 243 this._M2 = this.stringHash(this.A().asString(10) + this.M1() + this.K());
255//MochiKit.Logging.logDebug("SRP M2: " + this._M2);
256 } 244 }