summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/Clipperz/Crypto/ECC/StandardCurves.js
Side-by-side diff
Diffstat (limited to 'frontend/gamma/js/Clipperz/Crypto/ECC/StandardCurves.js') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/gamma/js/Clipperz/Crypto/ECC/StandardCurves.js31
1 files changed, 12 insertions, 19 deletions
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
@@ -1,26 +1,24 @@
/*
-Copyright 2008-2011 Clipperz Srl
+Copyright 2008-2013 Clipperz Srl
-This file is part of Clipperz Community Edition.
-Clipperz Community Edition is an online password manager.
+This file is part of Clipperz, the online password manager.
For further information about its features and functionalities please
refer to http://www.clipperz.com.
-* Clipperz Community Edition is free software: you can redistribute
- it and/or modify it under the terms of the GNU Affero General Public
- License as published by the Free Software Foundation, either version
- 3 of the License, or (at your option) any later version.
+* Clipperz is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
-* Clipperz Community Edition is distributed in the hope that it will
- be useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+* Clipperz is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public
- License along with Clipperz Community Edition. If not, see
- <http://www.gnu.org/licenses/>.
+ License along with Clipperz. If not, see http://www.gnu.org/licenses/.
*/
//try { if (typeof(Clipperz.Crypto.ECC.BinaryField.Curve) == 'undefined') { throw ""; }} catch (e) {
@@ -133,16 +131,14 @@ MochiKit.Base.update(Clipperz.Crypto.ECC.StandardCurves, {
Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().module = function(aValue) {
var result;
if (aValue.bitSize() > 1140) {
- MochiKit.Logging.logWarning("ECC.StandarCurves.B571.finiteField().module: falling back to default implementation");
+ Clipperz.logWarning("ECC.StandarCurves.B571.finiteField().module: falling back to default implementation");
result = Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().slowModule(aValue);
} else {
var C, T;
var i;
-//console.log(">>> binaryField.finiteField.(improved)module");
-// C = aValue.value().slice(0);
C = aValue._value.slice(0);
for (i=35; i>=18; i--) {
T = C[i];
C[i-18] = (((C[i-18] ^ (T<<5) ^ (T<<7) ^ (T<<10) ^ (T<<15)) & 0xffffffff) >>> 0);
@@ -156,9 +152,8 @@ MochiKit.Base.update(Clipperz.Crypto.ECC.StandardCurves, {
C[i] = 0;
}
result = new Clipperz.Crypto.ECC.BinaryField.Value(C);
-//console.log("<<< binaryField.finiteField.(improved)module");
}
return result;
};
@@ -195,15 +190,14 @@ MochiKit.Base.update(Clipperz.Crypto.ECC.StandardCurves, {
Clipperz.Crypto.ECC.StandardCurves._B283.finiteField().module = function(aValue) {
var result;
if (aValue.bitSize() > 564) {
- MochiKit.Logging.logWarning("ECC.StandarCurves.B283.finiteField().module: falling back to default implementation");
+ Clipperz.logWarning("ECC.StandarCurves.B283.finiteField().module: falling back to default implementation");
result = Clipperz.Crypto.ECC.StandardCurves._B283.finiteField().slowModule(aValue);
} else {
var C, T;
var i;
-//console.log(">>> binaryField.finiteField.(improved)module");
C = aValue._value.slice(0);
for (i=17; i>=9; i--) {
T = C[i];
C[i-9] = (((C[i-9] ^ (T<<5) ^ (T<<10) ^ (T<<12) ^ (T<<17)) & 0xffffffff) >>> 0);
@@ -217,9 +211,8 @@ MochiKit.Base.update(Clipperz.Crypto.ECC.StandardCurves, {
C[i] = 0;
}
result = new Clipperz.Crypto.ECC.BinaryField.Value(C);
-//console.log("<<< binaryField.finiteField.(improved)module");
}
return result;
};