From eb0fb97e0ba98b6bd5c40781b8dc41042d0c619a Mon Sep 17 00:00:00 2001 From: aunxx Date: Sun, 5 Jun 2016 14:41:31 +0100 Subject: [PATCH] Remove biginteger.js --- frontend/beta/js/Clipperz/Crypto/SRP.js | 28 +++++++++---------- frontend/beta/properties/beta.properties.json | 1 - 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/frontend/beta/js/Clipperz/Crypto/SRP.js b/frontend/beta/js/Clipperz/Crypto/SRP.js index 2a90633..078ad7f 100644 --- a/frontend/beta/js/Clipperz/Crypto/SRP.js +++ b/frontend/beta/js/Clipperz/Crypto/SRP.js @@ -230,21 +230,21 @@ Clipperz.Crypto.SRP.Connection.prototype = MochiKit.Base.update(null, { this._S = bigint.powerModule( bigint.subtract( bigint.multiply(Clipperz.Crypto.SRP.k(),bigint.powerModule(srp.g(), this.x(), srp.n())), this.B()), bigint.add(this.a(), bigint.multiply(this.u(), this.x())),srp.n() ); - var tmp_B = new BigInteger(this.B()); - var tmp_k = new BigInteger(Clipperz.Crypto.SRP.k()); - var tmp_g = new BigInteger(srp.g()); - var tmp_x = new BigInteger(this.x()); - var tmp_a = new BigInteger(this.a()); - var tmp_n = new BigInteger(srp.n()); - var tmp_u = new BigInteger(this.u()); +// var tmp_B = new BigInteger(this.B()); +// var tmp_k = new BigInteger(Clipperz.Crypto.SRP.k()); +// var tmp_g = new BigInteger(srp.g()); +// var tmp_x = new BigInteger(this.x()); +// var tmp_a = new BigInteger(this.a()); +// var tmp_n = new BigInteger(srp.n()); +// var tmp_u = new BigInteger(this.u()); +// +// var tmp_S1 = new BigInteger(tmp_B.subtract(tmp_k.multiply(tmp_g.modPow(tmp_x,tmp_n)))); +// var tmp_S2 = new BigInteger(tmp_a.add(tmp_u.multiply(tmp_x))); +// var tmp_S = new BigInteger(tmp_S1.modPow(tmp_S2,tmp_n)); - var tmp_S1 = new BigInteger(tmp_B.subtract(tmp_k.multiply(tmp_g.modPow(tmp_x,tmp_n)))); - var tmp_S2 = new BigInteger(tmp_a.add(tmp_u.multiply(tmp_x))); - var tmp_S = new BigInteger(tmp_S1.modPow(tmp_S2,tmp_n)); - - if (tmp_S.isNegative() == true ) { - tmp_S = tmp_S.add(srp.n()); - } +// if (tmp_S.isNegative() == true ) { +// tmp_S = tmp_S.add(srp.n()); +// } //console.log("_B", tmp_B.toString()); //console.log("_k", tmp_k.toString()); diff --git a/frontend/beta/properties/beta.properties.json b/frontend/beta/properties/beta.properties.json index c3ece3b..7d34677 100644 --- a/frontend/beta/properties/beta.properties.json +++ b/frontend/beta/properties/beta.properties.json @@ -80,7 +80,6 @@ "Clipperz/Crypto/AES_2.js", "Clipperz/Crypto/PRNG.js", "Clipperz/Crypto/BigInt.js", - "Clipperz/Crypto/biginteger.js", "Clipperz/Crypto/Base.js", "Clipperz/Crypto/SRP.js", "Clipperz/Crypto/RSA.js",