diff options
author | ausiv4 <ausiv4@eb105b4a-77de-11de-a249-6bf219df57d5> | 2009-08-04 03:37:00 +0000 |
---|---|---|
committer | ausiv4 <ausiv4@eb105b4a-77de-11de-a249-6bf219df57d5> | 2009-08-04 03:37:00 +0000 |
commit | 0f02618168da426ffe47161e72b7f8e3541ce892 (patch) | |
tree | bddd632f9178f1e61750bb967ed6f18b32bb2f69 | |
parent | dc8c2fc707819fd6d4cacb0ce256d30972861545 (diff) |
I've started working on the feature that will allow existing servers to upgrade to SRP.
Currently, I've added functionality that will allow the importation of hash.min.js. This is made possible by some code that executes when the
script is loaded. This particular code doesn't pack properly, so currently I'm having the pack script append it to the end (unpacked).
This requires that clients use the packed version for two reasons. First, the unpacked code lacks the function that gets the source path. Second,
it loads hash.min.js. The first problem can be fixed if I can figure out how to get the code to pack properly. The second problem can be solved
by checking whether the current script is "srp.js" or "srp.min.js", and loading either (MD5.js & SHA1.js) or hash.min.js respectively.
Next we will need to write code where the server detects users who exist in the auth.models.User table, but not the srp.models.User table.
-rw-r--r-- | javascript/MD5.js | 207 | ||||
-rw-r--r-- | javascript/SHA1.js | 174 | ||||
-rw-r--r-- | javascript/jsPacker/build-pack-hash.sh | 4 | ||||
-rw-r--r-- | javascript/jsPacker/build-pack.sh | 2 | ||||
-rw-r--r-- | javascript/jsPacker/hash.min.js | 1 | ||||
-rw-r--r-- | javascript/jsPacker/srp.min.js | 6 | ||||
-rw-r--r-- | javascript/srp.js | 14 |
7 files changed, 407 insertions, 1 deletions
diff --git a/javascript/MD5.js b/javascript/MD5.js new file mode 100644 index 0000000..55cb8cc --- /dev/null +++ b/javascript/MD5.js @@ -0,0 +1,207 @@ +/** +* +* MD5 (Message-Digest Algorithm) +* http://www.webtoolkit.info/ +* +**/ + +var MD5 = function (string) { + + function RotateLeft(lValue, iShiftBits) { + return (lValue<<iShiftBits) | (lValue>>>(32-iShiftBits)); + } + + function AddUnsigned(lX,lY) { + var lX4,lY4,lX8,lY8,lResult; + lX8 = (lX & 0x80000000); + lY8 = (lY & 0x80000000); + lX4 = (lX & 0x40000000); + lY4 = (lY & 0x40000000); + lResult = (lX & 0x3FFFFFFF)+(lY & 0x3FFFFFFF); + if (lX4 & lY4) { + return (lResult ^ 0x80000000 ^ lX8 ^ lY8); + } + if (lX4 | lY4) { + if (lResult & 0x40000000) { + return (lResult ^ 0xC0000000 ^ lX8 ^ lY8); + } else { + return (lResult ^ 0x40000000 ^ lX8 ^ lY8); + } + } else { + return (lResult ^ lX8 ^ lY8); + } + } + + function F(x,y,z) { return (x & y) | ((~x) & z); } + function G(x,y,z) { return (x & z) | (y & (~z)); } + function H(x,y,z) { return (x ^ y ^ z); } + function I(x,y,z) { return (y ^ (x | (~z))); } + + function FF(a,b,c,d,x,s,ac) { + a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac)); + return AddUnsigned(RotateLeft(a, s), b); + }; + + function GG(a,b,c,d,x,s,ac) { + a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac)); + return AddUnsigned(RotateLeft(a, s), b); + }; + + function HH(a,b,c,d,x,s,ac) { + a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac)); + return AddUnsigned(RotateLeft(a, s), b); + }; + + function II(a,b,c,d,x,s,ac) { + a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac)); + return AddUnsigned(RotateLeft(a, s), b); + }; + + function ConvertToWordArray(string) { + var lWordCount; + var lMessageLength = string.length; + var lNumberOfWords_temp1=lMessageLength + 8; + var lNumberOfWords_temp2=(lNumberOfWords_temp1-(lNumberOfWords_temp1 % 64))/64; + var lNumberOfWords = (lNumberOfWords_temp2+1)*16; + var lWordArray=Array(lNumberOfWords-1); + var lBytePosition = 0; + var lByteCount = 0; + while ( lByteCount < lMessageLength ) { + lWordCount = (lByteCount-(lByteCount % 4))/4; + lBytePosition = (lByteCount % 4)*8; + lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount)<<lBytePosition)); + lByteCount++; + } + lWordCount = (lByteCount-(lByteCount % 4))/4; + lBytePosition = (lByteCount % 4)*8; + lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80<<lBytePosition); + lWordArray[lNumberOfWords-2] = lMessageLength<<3; + lWordArray[lNumberOfWords-1] = lMessageLength>>>29; + return lWordArray; + }; + + function WordToHex(lValue) { + var WordToHexValue="",WordToHexValue_temp="",lByte,lCount; + for (lCount = 0;lCount<=3;lCount++) { + lByte = (lValue>>>(lCount*8)) & 255; + WordToHexValue_temp = "0" + lByte.toString(16); + WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length-2,2); + } + return WordToHexValue; + }; + + function Utf8Encode(string) { + string = string.replace(/\r\n/g,"\n"); + var utftext = ""; + + for (var n = 0; n < string.length; n++) { + + var c = string.charCodeAt(n); + + if (c < 128) { + utftext += String.fromCharCode(c); + } + else if((c > 127) && (c < 2048)) { + utftext += String.fromCharCode((c >> 6) | 192); + utftext += String.fromCharCode((c & 63) | 128); + } + else { + utftext += String.fromCharCode((c >> 12) | 224); + utftext += String.fromCharCode(((c >> 6) & 63) | 128); + utftext += String.fromCharCode((c & 63) | 128); + } + + } + + return utftext; + }; + + var x=Array(); + var k,AA,BB,CC,DD,a,b,c,d; + var S11=7, S12=12, S13=17, S14=22; + var S21=5, S22=9 , S23=14, S24=20; + var S31=4, S32=11, S33=16, S34=23; + var S41=6, S42=10, S43=15, S44=21; + + string = Utf8Encode(string); + + x = ConvertToWordArray(string); + + a = 0x67452301; b = 0xEFCDAB89; c = 0x98BADCFE; d = 0x10325476; + + for (k=0;k<x.length;k+=16) { + AA=a; BB=b; CC=c; DD=d; + a=FF(a,b,c,d,x[k+0], S11,0xD76AA478); + d=FF(d,a,b,c,x[k+1], S12,0xE8C7B756); + c=FF(c,d,a,b,x[k+2], S13,0x242070DB); + b=FF(b,c,d,a,x[k+3], S14,0xC1BDCEEE); + a=FF(a,b,c,d,x[k+4], S11,0xF57C0FAF); + d=FF(d,a,b,c,x[k+5], S12,0x4787C62A); + c=FF(c,d,a,b,x[k+6], S13,0xA8304613); + b=FF(b,c,d,a,x[k+7], S14,0xFD469501); + a=FF(a,b,c,d,x[k+8], S11,0x698098D8); + d=FF(d,a,b,c,x[k+9], S12,0x8B44F7AF); + c=FF(c,d,a,b,x[k+10],S13,0xFFFF5BB1); + b=FF(b,c,d,a,x[k+11],S14,0x895CD7BE); + a=FF(a,b,c,d,x[k+12],S11,0x6B901122); + d=FF(d,a,b,c,x[k+13],S12,0xFD987193); + c=FF(c,d,a,b,x[k+14],S13,0xA679438E); + b=FF(b,c,d,a,x[k+15],S14,0x49B40821); + a=GG(a,b,c,d,x[k+1], S21,0xF61E2562); + d=GG(d,a,b,c,x[k+6], S22,0xC040B340); + c=GG(c,d,a,b,x[k+11],S23,0x265E5A51); + b=GG(b,c,d,a,x[k+0], S24,0xE9B6C7AA); + a=GG(a,b,c,d,x[k+5], S21,0xD62F105D); + d=GG(d,a,b,c,x[k+10],S22,0x2441453); + c=GG(c,d,a,b,x[k+15],S23,0xD8A1E681); + b=GG(b,c,d,a,x[k+4], S24,0xE7D3FBC8); + a=GG(a,b,c,d,x[k+9], S21,0x21E1CDE6); + d=GG(d,a,b,c,x[k+14],S22,0xC33707D6); + c=GG(c,d,a,b,x[k+3], S23,0xF4D50D87); + b=GG(b,c,d,a,x[k+8], S24,0x455A14ED); + a=GG(a,b,c,d,x[k+13],S21,0xA9E3E905); + d=GG(d,a,b,c,x[k+2], S22,0xFCEFA3F8); + c=GG(c,d,a,b,x[k+7], S23,0x676F02D9); + b=GG(b,c,d,a,x[k+12],S24,0x8D2A4C8A); + a=HH(a,b,c,d,x[k+5], S31,0xFFFA3942); + d=HH(d,a,b,c,x[k+8], S32,0x8771F681); + c=HH(c,d,a,b,x[k+11],S33,0x6D9D6122); + b=HH(b,c,d,a,x[k+14],S34,0xFDE5380C); + a=HH(a,b,c,d,x[k+1], S31,0xA4BEEA44); + d=HH(d,a,b,c,x[k+4], S32,0x4BDECFA9); + c=HH(c,d,a,b,x[k+7], S33,0xF6BB4B60); + b=HH(b,c,d,a,x[k+10],S34,0xBEBFBC70); + a=HH(a,b,c,d,x[k+13],S31,0x289B7EC6); + d=HH(d,a,b,c,x[k+0], S32,0xEAA127FA); + c=HH(c,d,a,b,x[k+3], S33,0xD4EF3085); + b=HH(b,c,d,a,x[k+6], S34,0x4881D05); + a=HH(a,b,c,d,x[k+9], S31,0xD9D4D039); + d=HH(d,a,b,c,x[k+12],S32,0xE6DB99E5); + c=HH(c,d,a,b,x[k+15],S33,0x1FA27CF8); + b=HH(b,c,d,a,x[k+2], S34,0xC4AC5665); + a=II(a,b,c,d,x[k+0], S41,0xF4292244); + d=II(d,a,b,c,x[k+7], S42,0x432AFF97); + c=II(c,d,a,b,x[k+14],S43,0xAB9423A7); + b=II(b,c,d,a,x[k+5], S44,0xFC93A039); + a=II(a,b,c,d,x[k+12],S41,0x655B59C3); + d=II(d,a,b,c,x[k+3], S42,0x8F0CCC92); + c=II(c,d,a,b,x[k+10],S43,0xFFEFF47D); + b=II(b,c,d,a,x[k+1], S44,0x85845DD1); + a=II(a,b,c,d,x[k+8], S41,0x6FA87E4F); + d=II(d,a,b,c,x[k+15],S42,0xFE2CE6E0); + c=II(c,d,a,b,x[k+6], S43,0xA3014314); + b=II(b,c,d,a,x[k+13],S44,0x4E0811A1); + a=II(a,b,c,d,x[k+4], S41,0xF7537E82); + d=II(d,a,b,c,x[k+11],S42,0xBD3AF235); + c=II(c,d,a,b,x[k+2], S43,0x2AD7D2BB); + b=II(b,c,d,a,x[k+9], S44,0xEB86D391); + a=AddUnsigned(a,AA); + b=AddUnsigned(b,BB); + c=AddUnsigned(c,CC); + d=AddUnsigned(d,DD); + } + + var temp = WordToHex(a)+WordToHex(b)+WordToHex(c)+WordToHex(d); + + return temp.toLowerCase(); +} diff --git a/javascript/SHA1.js b/javascript/SHA1.js new file mode 100644 index 0000000..e772cbe --- /dev/null +++ b/javascript/SHA1.js @@ -0,0 +1,174 @@ +/** +* +* Secure Hash Algorithm (SHA1) +* http://www.webtoolkit.info/ +* +**/ + +function SHA1 (msg) { + + function rotate_left(n,s) { + var t4 = ( n<<s ) | (n>>>(32-s)); + return t4; + }; + + function lsb_hex(val) { + var str=""; + var i; + var vh; + var vl; + + for( i=0; i<=6; i+=2 ) { + vh = (val>>>(i*4+4))&0x0f; + vl = (val>>>(i*4))&0x0f; + str += vh.toString(16) + vl.toString(16); + } + return str; + }; + + function cvt_hex(val) { + var str=""; + var i; + var v; + + for( i=7; i>=0; i-- ) { + v = (val>>>(i*4))&0x0f; + str += v.toString(16); + } + return str; + }; + + + function Utf8Encode(string) { + string = string.replace(/\r\n/g,"\n"); + var utftext = ""; + + for (var n = 0; n < string.length; n++) { + + var c = string.charCodeAt(n); + + if (c < 128) { + utftext += String.fromCharCode(c); + } + else if((c > 127) && (c < 2048)) { + utftext += String.fromCharCode((c >> 6) | 192); + utftext += String.fromCharCode((c & 63) | 128); + } + else { + utftext += String.fromCharCode((c >> 12) | 224); + utftext += String.fromCharCode(((c >> 6) & 63) | 128); + utftext += String.fromCharCode((c & 63) | 128); + } + + } + + return utftext; + }; + + var blockstart; + var i, j; + var W = new Array(80); + var H0 = 0x67452301; + var H1 = 0xEFCDAB89; + var H2 = 0x98BADCFE; + var H3 = 0x10325476; + var H4 = 0xC3D2E1F0; + var A, B, C, D, E; + var temp; + + msg = Utf8Encode(msg); + + var msg_len = msg.length; + + var word_array = new Array(); + for( i=0; i<msg_len-3; i+=4 ) { + j = msg.charCodeAt(i)<<24 | msg.charCodeAt(i+1)<<16 | + msg.charCodeAt(i+2)<<8 | msg.charCodeAt(i+3); + word_array.push( j ); + } + + switch( msg_len % 4 ) { + case 0: + i = 0x080000000; + break; + case 1: + i = msg.charCodeAt(msg_len-1)<<24 | 0x0800000; + break; + + case 2: + i = msg.charCodeAt(msg_len-2)<<24 | msg.charCodeAt(msg_len-1)<<16 | 0x08000; + break; + + case 3: + i = msg.charCodeAt(msg_len-3)<<24 | msg.charCodeAt(msg_len-2)<<16 | msg.charCodeAt(msg_len-1)<<8 | 0x80; + break; + } + + word_array.push( i ); + + while( (word_array.length % 16) != 14 ) word_array.push( 0 ); + + word_array.push( msg_len>>>29 ); + word_array.push( (msg_len<<3)&0x0ffffffff ); + + + for ( blockstart=0; blockstart<word_array.length; blockstart+=16 ) { + + for( i=0; i<16; i++ ) W[i] = word_array[blockstart+i]; + for( i=16; i<=79; i++ ) W[i] = rotate_left(W[i-3] ^ W[i-8] ^ W[i-14] ^ W[i-16], 1); + + A = H0; + B = H1; + C = H2; + D = H3; + E = H4; + + for( i= 0; i<=19; i++ ) { + temp = (rotate_left(A,5) + ((B&C) | (~B&D)) + E + W[i] + 0x5A827999) & 0x0ffffffff; + E = D; + D = C; + C = rotate_left(B,30); + B = A; + A = temp; + } + + for( i=20; i<=39; i++ ) { + temp = (rotate_left(A,5) + (B ^ C ^ D) + E + W[i] + 0x6ED9EBA1) & 0x0ffffffff; + E = D; + D = C; + C = rotate_left(B,30); + B = A; + A = temp; + } + + for( i=40; i<=59; i++ ) { + temp = (rotate_left(A,5) + ((B&C) | (B&D) | (C&D)) + E + W[i] + 0x8F1BBCDC) & 0x0ffffffff; + E = D; + D = C; + C = rotate_left(B,30); + B = A; + A = temp; + } + + for( i=60; i<=79; i++ ) { + temp = (rotate_left(A,5) + (B ^ C ^ D) + E + W[i] + 0xCA62C1D6) & 0x0ffffffff; + E = D; + D = C; + C = rotate_left(B,30); + B = A; + A = temp; + } + + H0 = (H0 + A) & 0x0ffffffff; + H1 = (H1 + B) & 0x0ffffffff; + H2 = (H2 + C) & 0x0ffffffff; + H3 = (H3 + D) & 0x0ffffffff; + H4 = (H4 + E) & 0x0ffffffff; + + } + + var temp = cvt_hex(H0) + cvt_hex(H1) + cvt_hex(H2) + cvt_hex(H3) + cvt_hex(H4); + + return temp.toLowerCase(); + +} diff --git a/javascript/jsPacker/build-pack-hash.sh b/javascript/jsPacker/build-pack-hash.sh new file mode 100644 index 0000000..45e841a --- /dev/null +++ b/javascript/jsPacker/build-pack-hash.sh @@ -0,0 +1,4 @@ +#!/bin/bash +cat ../SHA1.js ../MD5.js > hash.js +perl jsPacker.pl -fsq -e62 -i hash.js -o hash.min.js +rm hash.js diff --git a/javascript/jsPacker/build-pack.sh b/javascript/jsPacker/build-pack.sh index 904b2ee..29ffa92 100644 --- a/javascript/jsPacker/build-pack.sh +++ b/javascript/jsPacker/build-pack.sh @@ -2,3 +2,5 @@ cat ../SHA256.js ../prng4.js ../rng.js ../jsbn.js ../jsbn2.js ../srp.js > utils.js perl jsPacker.pl -fsq -e62 -i utils.js -o srp.min.js rm utils.js + +echo "var srpPath = (function(){\nvar scr=document.getElementsByTagName('script');\nreturn scr[scr.length-1].getAttribute(\"src\");\n})();" >> srp.min.js diff --git a/javascript/jsPacker/hash.min.js b/javascript/jsPacker/hash.min.js new file mode 100644 index 0000000..badbcca --- /dev/null +++ b/javascript/jsPacker/hash.min.js @@ -0,0 +1 @@ +eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('l 3U(J){l R(n,s){e 2w=(n<<s)|(n>>>(32-s));f 2w};l 3T(1J){e 1f="";e i;e 2d;e 2c;w(i=0;i<=6;i+=2){2d=(1J>>>(i*4+4))&2b;2c=(1J>>>(i*4))&2b;1f+=2d.1O(16)+2c.1O(16)}f 1f};l 1e(1J){e 1f="";e i;e v;w(i=7;i>=0;i--){v=(1J>>>(i*4))&2b;1f+=v.1O(16)}f 1f};l 1K(t){t=t.2o(/\\r\\n/g,"\\n");e u="";w(e n=0;n<t.T;n++){e c=t.L(n);Y(c<U){u+=N.M(c)}1b Y((c>2n)&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h(1U,1T){e 1S,1R,1d,1c,18;1d=(1U&28);1c=(1T&28);1S=(1U&1Q);1R=(1T&1Q);18=(1U&2t)+(1T&2t);Y(1S&1R){f(18^28^1d^1c)}Y(1S|1R){Y(18&1Q){f(18^3E^1d^1c)}1b{f(18^1Q^1d^1c)}}1b{f(18^1d^1c)}}l F(x,y,z){f(x&y)|((~x)&z)}l G(x,y,z){f(x&z)|(y&(~z))}l H(x,y,z){f(x^y^z)}l I(x,y,z){f(y^(x|(~z)))}l q(a,b,c,d,x,s,X){a=h(a,h(h(F(b,c,d),x),X));f h(1B(a,s),b)};l p(a,b,c,d,x,s,X){a=h(a,h(h(G(b,c,d),x),X));f h(1B(a,s),b)};l o(a,b,c,d,x,s,X){a=h(a,h(h(H(b,c,d),x),X));f h(1B(a,s),b)};l m(a,b,c,d,x,s,X){a=h(a,h(h(I(b,c,d),x),X));f h(1B(a,s),b)};l 2j(t){e Z;e 1z=t.T;e 27=1z+8;e 2r=(27-(27%2s))/2s;e 1P=(2r+1)*16;e V=1L(1P-1);e 1A=0;e P=0;2q(P<1z){Z=(P-(P%4))/4;1A=(P%4)*8;V[Z]=(V[Z]|(t.L(P)<<1A));P++}Z=(P-(P%4))/4;1A=(P%4)*8;V[Z]=V[Z]|(2p<<1A);V[1P-2]=1z<<3;V[1P-1]=1z>>>29;f V};l 1g(1y){e 1M="",1N="",26,1x;w(1x=0;1x<=3;1x++){26=(1y>>>(1x*8))&3D;1N="0"+26.1O(16);1M=1M+1N.3C(1N.T-2,2)}f 1M};l 1K(t){t=t.2o(/\\r\\n/g,"\\n");e u="";w(e n=0;n<t.T;n++){e c=t.L(n);Y(c<U){u+=N.M(c)}1b Y((c>2n)&&(c<2m)){u+=N.M((c>>6)|2l);u+=N.M((c&1a)|U)}1b{u+=N.M((c>>12)|2k);u+=N.M(((c>>6)&1a)|U);u+=N.M((c&1a)|U)}}f u};e x=1L();e k,25,1Z,1Y,1X,a,b,c,d;e 1w=7,1v=12,1u=17,1t=22;e 1s=5,1r=9,1q=14,1p=20;e 1o=4,1n=11,1m=16,1l=23;e 1k=6,1j=10,1i=15,1h=21;t=1K(t);x=2j(t);a=2i;b=2h;c=2g;d=2f;w(k=0;k<x.T;k+=16){25=a;1Z=b;1Y=c;1X=d;a=q(a,b,c,d,x[k+0],1w,3B);d=q(d,a,b,c,x[k+1],1v,3A);c=q(c,d,a,b,x[k+2],1u,3z);b=q(b,c,d,a,x[k+3],1t,3y);a=q(a,b,c,d,x[k+4],1w,3x);d=q(d,a,b,c,x[k+5],1v,3w);c=q(c,d,a,b,x[k+6],1u,3v);b=q(b,c,d,a,x[k+7],1t,3u);a=q(a,b,c,d,x[k+8],1w,3t);d=q(d,a,b,c,x[k+9],1v,3s);c=q(c,d,a,b,x[k+10],1u,3r);b=q(b,c,d,a,x[k+11],1t,3q);a=q(a,b,c,d,x[k+12],1w,3p);d=q(d,a,b,c,x[k+13],1v,3o);c=q(c,d,a,b,x[k+14],1u,3n);b=q(b,c,d,a,x[k+15],1t,3m);a=p(a,b,c,d,x[k+1],1s,3l);d=p(d,a,b,c,x[k+6],1r,3k);c=p(c,d,a,b,x[k+11],1q,3j);b=p(b,c,d,a,x[k+0],1p,3i);a=p(a,b,c,d,x[k+5],1s,3h);d=p(d,a,b,c,x[k+10],1r,3g);c=p(c,d,a,b,x[k+15],1q,3f);b=p(b,c,d,a,x[k+4],1p,3e);a=p(a,b,c,d,x[k+9],1s,3d);d=p(d,a,b,c,x[k+14],1r,3c);c=p(c,d,a,b,x[k+3],1q,3b);b=p(b,c,d,a,x[k+8],1p,3a);a=p(a,b,c,d,x[k+13],1s,38);d=p(d,a,b,c,x[k+2],1r,37);c=p(c,d,a,b,x[k+7],1q,36);b=p(b,c,d,a,x[k+12],1p,35);a=o(a,b,c,d,x[k+5],1o,34);d=o(d,a,b,c,x[k+8],1n,33);c=o(c,d,a,b,x[k+11],1m,31);b=o(b,c,d,a,x[k+14],1l,2Z);a=o(a,b,c,d,x[k+1],1o,2Y);d=o(d,a,b,c,x[k+4],1n,2X);c=o(c,d,a,b,x[k+7],1m,2W);b=o(b,c,d,a,x[k+10],1l,2V);a=o(a,b,c,d,x[k+13],1o,2U);d=o(d,a,b,c,x[k+0],1n,2T);c=o(c,d,a,b,x[k+3],1m,2S);b=o(b,c,d,a,x[k+6],1l,2R);a=o(a,b,c,d,x[k+9],1o,2Q);d=o(d,a,b,c,x[k+12],1n,2P);c=o(c,d,a,b,x[k+15],1m,2O);b=o(b,c,d,a,x[k+2],1l,2N);a=m(a,b,c,d,x[k+0],1k,2M);d=m(d,a,b,c,x[k+7],1j,2L);c=m(c,d,a,b,x[k+14],1i,2K);b=m(b,c,d,a,x[k+5],1h,2J);a=m(a,b,c,d,x[k+12],1k,2I);d=m(d,a,b,c,x[k+3],1j,2H);c=m(c,d,a,b,x[k+10],1i,2G);b=m(b,c,d,a,x[k+1],1h,2F);a=m(a,b,c,d,x[k+8],1k,2E);d=m(d,a,b,c,x[k+15],1j,2D);c=m(c,d,a,b,x[k+6],1i,2C);b=m(b,c,d,a,x[k+13],1h,2B);a=m(a,b,c,d,x[k+4],1k,2A);d=m(d,a,b,c,x[k+11],1j,2z);c=m(c,d,a,b,x[k+2],1i,2y);b=m(b,c,d,a,x[k+9],1h,2x);a=h(a,25);b=h(b,1Z);c=h(c,1Y);d=h(d,1X)}e K=1g(a)+1g(b)+1g(c)+1g(d);f K.2e()}',62,243,'||||||||||||||var|return||AddUnsigned||||function|II||HH|GG|FF|||string|utftext||for|||||||||||||msg|temp|charCodeAt|fromCharCode|String|msg_len|lByteCount|0x0ffffffff|rotate_left|word_array|length|128|lWordArray||ac|if|lWordCount|||||||||lResult||63|else|lY8|lX8|cvt_hex|str|WordToHex|S44|S43|S42|S41|S34|S33|S32|S31|S24|S23|S22|S21|S14|S13|S12|S11|lCount|lValue|lMessageLength|lBytePosition|RotateLeft|H4|H3|H2|H1|H0|blockstart|push|val|Utf8Encode|Array|WordToHexValue|WordToHexValue_temp|toString|lNumberOfWords|0x40000000|lY4|lX4|lY|lX|break|case|DD|CC|BB||||||AA|lByte|lNumberOfWords_temp1|0x80000000||iShiftBits|0x0f|vl|vh|toLowerCase|0x10325476|0x98BADCFE|0xEFCDAB89|0x67452301|ConvertToWordArray|224|192|2048|127|replace|0x80|while|lNumberOfWords_temp2|64|0x3FFFFFFF|79|new|t4|0xEB86D391|0x2AD7D2BB|0xBD3AF235|0xF7537E82|0x4E0811A1|0xA3014314|0xFE2CE6E0|0x6FA87E4F|0x85845DD1|0xFFEFF47D|0x8F0CCC92|0x655B59C3|0xFC93A039|0xAB9423A7|0x432AFF97|0xF4292244|0xC4AC5665|0x1FA27CF8|0xE6DB99E5|0xD9D4D039|0x4881D05|0xD4EF3085|0xEAA127FA|0x289B7EC6|0xBEBFBC70|0xF6BB4B60|0x4BDECFA9|0xA4BEEA44|0xFDE5380C||0x6D9D6122||0x8771F681|0xFFFA3942|0x8D2A4C8A|0x676F02D9|0xFCEFA3F8|0xA9E3E905||0x455A14ED|0xF4D50D87|0xC33707D6|0x21E1CDE6|0xE7D3FBC8|0xD8A1E681|0x2441453|0xD62F105D|0xE9B6C7AA|0x265E5A51|0xC040B340|0xF61E2562|0x49B40821|0xA679438E|0xFD987193|0x6B901122|0x895CD7BE|0xFFFF5BB1|0x8B44F7AF|0x698098D8|0xFD469501|0xA8304613|0x4787C62A|0xF57C0FAF|0xC1BDCEEE|0x242070DB|0xE8C7B756|0xD76AA478|substr|255|0xC0000000|MD5|0xCA62C1D6|60|0x8F1BBCDC|59|40|0x6ED9EBA1|0x5A827999|0x08000|0x0800000|0x080000000|switch|0xC3D2E1F0|80|lsb_hex|SHA1'.split('|'),0,{})) diff --git a/javascript/jsPacker/srp.min.js b/javascript/jsPacker/srp.min.js index f3e9d67..8ee3cfa 100644 --- a/javascript/jsPacker/srp.min.js +++ b/javascript/jsPacker/srp.min.js @@ -1 +1,5 @@ -eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('E 1E(s){C 2p=8;C 6R=0;E 1e(x,y){C 42=(x&40)+(y&40);C 6Z=(x>>16)+(y>>16)+(42>>16);F(6Z<<16)|(42&40)}E S(X,n){F(X>>>n)|(X<<(32-n))}E R(X,n){F(X>>>n)}E 6V(x,y,z){F((x&y)^((~x)&z))}E 6T(x,y,z){F((x&y)^(x&z)^(y&z))}E 6U(x){F(S(x,2)^S(x,13)^S(x,22))}E 6W(x){F(S(x,6)^S(x,11)^S(x,25))}E 6X(x){F(S(x,7)^S(x,18)^R(x,3))}E 6Y(x){F(S(x,17)^S(x,19)^R(x,10))}E 6N(m,l){C K=U 1x(aD,aC,aB,aA,az,ay,ax,aw,av,au,at,as,ar,aq,ap,ao,an,al,ak,aj,ai,ah,ag,af,ae,ad,ab,aa,a9,a8,a7,a6,a5,a4,a3,a2,a1,a0,9Z,9Y,9X,9W,9V,9U,9T,9S,9R,9Q,9P,9O,9N,9M,9L,9K,9J,9I,9H,9G,9F,9E,9D,9C,9B,9A);C 1a=U 1x(9z,9y,9x,9w,9v,9u,9t,9s);C W=U 1x(64);C a,b,c,d,e,f,g,h,i,j;C 3h,3Z;m[l>>5]|=2I<<(24-l%32);m[((l+64>>9)<<4)+15]=l;P(C i=0;i<m.Z;i+=16){a=1a[0];b=1a[1];c=1a[2];d=1a[3];e=1a[4];f=1a[5];g=1a[6];h=1a[7];P(C j=0;j<64;j++){D(j<16)W[j]=m[j+i];J W[j]=1e(1e(1e(6Y(W[j-2]),W[j-7]),6X(W[j-15])),W[j-16]);3h=1e(1e(1e(1e(h,6W(e)),6V(e,f,g)),K[j]),W[j]);3Z=1e(6U(a),6T(a,b,c));h=g;g=f;f=e;e=1e(d,3h);d=c;c=b;b=a;a=1e(3h,3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=3d}E 3W(){6J(U 9l().9k())}D(1p==Y){1p=U 1x();1f=0;C t;D(3c.3S=="6y"&&3c.9j<"5"&&2X.6I){C z=2X.6I.6H(32);P(t=0;t<z.Z;++t)1p[1f++]=z.1Z(t)&1D}L(1f<3d){t=1d.1W(9i*1d.6H());1p[1f++]=t>>>8;1p[1f++]=t&1D}1f=0;3W();}E 6D(){D(2O==Y){3W();2O=6G();2O.6F(1p);P(1f=0;1f<1p.Z;++1f)1p[1f]=0;1f=0;}F 2O.6E()}E 6C(3V){C i;P(i=0;i<3V.Z;++i)3V[i]=6D()}E 3t(){}3t.H.5J=6C;C 1L;C 6B=9h;C 3T=((6B&9g)==9f);E G(a,b,c){D(a!=Y)D("5K"==3J a)o.3x(a,b,c);J D(b==Y&&"2o"!=3J a)o.35(a,1P);J o.35(a,b)}E Q(){F U G(Y)}E 6x(i,x,w,j,c,n){L(--n>=0){C v=x*o[i++]+w[j]+c;c=1d.1W(v/9e);w[j++]=v&9d}F c}E 6z(i,x,w,j,c,n){C 2n=x&2L,2m=x>>15;L(--n>=0){C l=o[i]&2L;C h=o[i++]>>15;C m=2m*l+h*2n;l=2n*l+((m&2L)<<15)+w[j]+(c&6A);c=(l>>>30)+(m>>>15)+2m*h+(c>>>30);w[j++]=l&6A}F c}E 6w(i,x,w,j,c,n){C 2n=x&3U,2m=x>>14;L(--n>=0){C l=o[i]&3U;C h=o[i++]>>14;C m=2m*l+h*2n;l=2n*l+((m&3U)<<14)+w[j]+c;c=(l>>28)+(m>>14)+2m*h;w[j++]=l&9c}F c}D(3T&&(3c.3S=="4o 9b 9a")){G.H.am=6z;1L=30}J D(3T&&(3c.3S!="6y")){G.H.am=6x;1L=26}J{G.H.am=6w;1L=28}G.H.O=1L;G.H.1g=((1<<1L)-1);G.H.1k=(1<<1L);C 3b=52;G.H.6u=1d.2y(2,3b);G.H.3Q=3b-1L;G.H.3O=2*1L-3b;C 6v="99";C 2N=U 1x();C 20,1o;20="0".1Z(0);P(1o=0;1o<=9;++1o)2N[20++]=1o;20="a".1Z(0);P(1o=10;1o<36;++1o)2N[20++]=1o;20="A".1Z(0);P(1o=10;1o<36;++1o)2N[20++]=1o;E 3R(n){F 6v.2K(n)}E 3K(s,i){C c=2N[s.1Z(i)];F(c==Y)?-1:c}E 6c(r){P(C i=o.t-1;i>=0;--i)r[i]=o[i];r.t=o.t;r.s=o.s}E 6b(x){o.t=1;o.s=(x<0)?-1:0;D(x>0)o[0]=x;J D(x<-1)o[0]=x+1k;J o.t=0}E 1I(i){C r=Q();r.2d(i);F r}E 6a(s,b){C k;D(b==16)k=4;J D(b==8)k=3;J D(b==1P)k=8;J D(b==2)k=1;J D(b==32)k=5;J D(b==4)k=2;J{o.5r(s,b);F}o.t=0;o.s=0;C i=s.Z,1X=1s,1n=0;L(--i>=0){C x=(k==8)?s[i]&2H:3K(s,i);D(x<0){D(s.2K(i)=="-")1X=1F;5L}1X=1s;D(1n==0)o[o.t++]=x;J D(1n+k>o.O){o[o.t-1]|=(x&((1<<(o.O-1n))-1))<<1n;o[o.t++]=(x>>(o.O-1n))}J o[o.t-1]|=x<<1n;1n+=k;D(1n>=o.O)1n-=o.O}D(k==8&&(s[0]&2I)!=0){o.s=-1;D(1n>0)o[o.t-1]|=((1<<(o.O-1n))-1)<<1n}o.1l();D(1X)G.1w.V(o,o)}E 69(){C c=o.s&o.1g;L(o.t>0&&o[o.t-1]==c)--o.t}E 5S(b){D(o.s<0)F"-"+o.2B().1u(b);C k;D(b==16)k=4;J D(b==8)k=3;J D(b==2)k=1;J D(b==32)k=5;J D(b==4)k=2;J F o.5t(b);C 2D=(1<<k)-1,d,m=1s,r="",i=o.t;C p=o.O-(i*o.O)%k;D(i-->0){D(p<o.O&&(d=o[i]>>p)>0){m=1F;r=3R(d)}L(i>=0){D(p<k){d=(o[i]&((1<<p)-1))<<(k-p);d|=o[--i]>>(p+=o.O-k)}J{d=(o[i]>>(p-=k))&2D;D(p<=0){p+=o.O;--i}}D(d>0)m=1F;D(m)r+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z){D(e>98||e<1)F G.1v;C r=Q(),1b=Q(),g=z.2g(o),i=2E(e)-1;g.1J(r);L(--i>=0){z.1A(r,1b);D((e&(1<<i))>0)z.1T(1b,g,r);J{C t=r;r=1b;1b=t}}F z.2f(r)}E 5M(e,m){C z;D(e<1P||m.1j())z=U 1O(m);J z=U 1N(m);F o.3E(e,z)}G.H.1J=6c;G.H.2d=6b;G.H.35=6a;G.H.1l=69;G.H.2i=68;G.H.2G=66;G.H.2e=65;G.H.1h=62;G.H.V=60;G.H.2h=5Z;G.H.2F=5Y;G.H.1K=5X;G.H.5W=5V;G.H.1j=5U;G.H.3E=5T;G.H.1u=5S;G.H.2B=5R;G.H.1H=5Q;G.H.1c=5P;G.H.3B=5O;G.H.3D=5N;G.H.5v=5M;G.1w=1I(0);G.1v=1I(1);E 5b(){C r=Q();o.1J(r);F r}E 5a(){D(o.s<0){D(o.t==1)F o[0]-o.1k;J D(o.t==0)F-1}J D(o.t==1)F o[0];J D(o.t==0)F 0;F((o[1]&((1<<(32-o.O))-1))<<o.O)|o[0]}E 58(){F(o.t==0)?o.s:(o[0]<<24)>>24}E 57(){F(o.t==0)?o.s:(o[0]<<16)>>16}E 5u(r){F 1d.1W(1d.96*o.O/1d.95(r))}E 56(){D(o.s<0)F-1;J D(o.t<=0||(o.t==1&&o[0]<=0))F 0;J F 1}E 5s(b){D(b==Y)b=10;D(o.1G()==0||b<2||b>36)F"0";C 2J=o.3y(b);C a=1d.2y(b,2J);C d=1I(a),y=Q(),z=Q(),r="";o.1K(d,y,z);L(y.1G()>0){r=(a+z.3v()).1u(b).94(1)+r;y.1K(d,y,z)}F z.3v().1u(b)+r}E 5q(s,b){o.2d(0);D(b==Y)b=10;C 2J=o.3y(b);C d=1d.2y(b,2J),1X=1s,j=0,w=0;P(C i=0;i<s.Z;++i){C x=3K(s,i);D(x<0){D(s.2K(i)=="-"&&o.1G()==0)1X=1F;5L}w=b*w+x;D(++j>=2J){o.3w(d);o.2b(w,0);j=0;w=0}}D(j>0){o.3w(1d.2y(b,j));o.2b(w,0)}D(1X)G.1w.V(o,o)}E 5p(a,b,c){D("5K"==3J b){D(a<2)o.2d(1);J{o.3x(a,c);D(!o.4P(a-1))o.1S(G.1v.2Y(a-1),33,o);D(o.1j())o.2b(1,0);L(!o.4z(b)){o.2b(2,0);D(o.3B()>a)o.V(G.1v.2Y(a-1),o)}}}J{C x=U 1x(),t=a&7;x.Z=(a>>3)+1;b.5J(x);D(t>0)x[0]&=((1<<t)-1);J x[0]=0;o.35(x,1P)}}E 55(){C i=o.t,r=U 1x();r[0]=o.s;C p=o.O-(i*o.O)%8,d,k=0;D(i-->0){D(p<o.O&&(d=o[i]>>p)!=(o.s&o.1g)>>p)r[k++]=d|(o.s<<(o.O-p));L(i>=0){D(p<8){d=(o[i]&((1<<p)-1))<<(8-p);d|=o[--i]>>(p+=o.O-8)}J{d=(o[i]>>(p-=8))&2H;D(p<=0){p+=o.O;--i}}D((d&2I)!=0)d|=-1P;D(k==0&&(o.s&2I)!=(d&2I))++k;D(k>0||d!=o.s)r[k++]=d}}F r}E 54(a){F(o.1c(a)==0)}E 51(a){F(o.1c(a)<0)?o:a}E 50(a){F(o.1c(a)>0)?o:a}E 5o(a,1V,r){C i,f,m=1d.2a(a.t,o.t);P(i=0;i<m;++i)r[i]=1V(o[i],a[i]);D(a.t<o.t){f=a.s&o.1g;P(i=m;i<o.t;++i)r[i]=1V(o[i],f);r.t=o.t}J{f=o.s&o.1g;P(i=m;i<a.t;++i)r[i]=1V(f,a[i]);r.t=a.t}r.s=1V(o.s,a.s);r.1l()}E 5I(x,y){F x&y}E 4Z(a){C r=Q();o.1S(a,5I,r);F r}E 33(x,y){F x|y}E 4Y(a){C r=Q();o.1S(a,33,r);F r}E 3G(x,y){F x^y}E 4X(a){C r=Q();o.1S(a,3G,r);F r}E 3H(x,y){F x&~y}E 4W(a){C r=Q();o.1S(a,3H,r);F r}E 4V(){C r=Q();P(C i=0;i<o.t;++i)r[i]=o.1g&~o[i];r.t=o.t;r.s=~o.s;F r}E 4U(n){C r=Q();D(n<0)o.1h(-n,r);J o.2e(n,r);F r}E 4S(n){C r=Q();D(n<0)o.2e(-n,r);J o.1h(n,r);F r}E 5H(x){D(x==0)F-1;C r=0;D((x&34)==0){x>>=16;r+=16}D((x&2H)==0){x>>=8;r+=8}D((x&3I)==0){x>>=4;r+=4}D((x&3)==0){x>>=2;r+=2}D((x&1)==0)++r;F r}E 4R(){P(C i=0;i<o.t;++i)D(o[i]!=0)F i*o.O+5H(o[i]);D(o.s<0)F o.t*o.O;F-1}E 5G(x){C r=0;L(x!=0){x&=x-1;++r}F r}E 4Q(){C r=0,x=o.s&o.1g;P(C i=0;i<o.t;++i)r+=5G(o[i]^x);F r}E 4O(n){C j=1d.1W(n/o.O);D(j>=o.t)F(o.s!=0);F((o[j]&(1<<(n%o.O)))!=0)}E 5n(n,1V){C r=G.1v.2Y(n);o.1S(r,1V,r);F r}E 4N(n){F o.2Z(n,33)}E 4M(n){F o.2Z(n,3H)}E 4L(n){F o.2Z(n,3G)}E 5m(a,r){C i=0,c=0,m=1d.2a(a.t,o.t);L(i<m){c+=o[i]+a[i];r[i++]=c&o.1g;c>>=o.O}D(a.t<o.t){c+=a.s;L(i<o.t){c+=o[i];r[i++]=c&o.1g;c>>=o.O}c+=o.s}J{c+=o.s;L(i<a.t){c+=a[i];r[i++]=c&o.1g;c>>=o.O}c+=a.s}r.s=(c<0)?-1:0;D(c>0)r[i++]=c;J D(c<-1)r[i++]=o.1k+c;r.t=i;r.1l()}E 4K(a){C r=Q();o.2A(a,r);F r}E 4J(a){C r=Q();o.V(a,r);F r}E 4I(a){C r=Q();o.2h(a,r);F r}E 4G(a){C r=Q();o.1K(a,r,Y);F r}E 4F(a){C r=Q();o.1K(a,Y,r);F r}E 4E(a){C q=Q(),r=Q();o.1K(a,q,r);F U 1x(q,r)}E 5l(n){o[o.t]=o.am(0,n-1,o,0,0,o.t);++o.t;o.1l()}E 5k(n,w){L(o.t<=w)o[o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1U(m);J z=U 1N(m);C g=U 1x(),n=3,2C=k-1,2D=(1<<k)-1;g[1]=z.2g(o);D(k>1){C 3A=Q();z.1A(g[1],3A);L(n<=2D){g[n]=Q();z.1T(3A,g[n-2],g[n]);n+=2}}C j=e.t-1,w,3z=1F,1b=Q(),t;i=2E(e[j])-1;L(j>=0){D(i>=2C)w=(e[j]>>(i-2C))&2D;J{w=(e[j]&((1<<(i+1))-1))<<(2C-i);D(j>0)w|=e[j-1]>>(o.O+i-2C)}n=k;L((w&1)==0){w>>=1;--n}D((i-=n)<0){i+=o.O;--j}D(3z){g[w].1J(r);3z=1s}J{L(n>1){z.1A(r,1b);z.1A(1b,r);n-=2}D(n>0)z.1A(r,1b);J{t=r;r=1b;1b=t}z.1T(1b,g[w],r)}L(j>=0&&(e[j]&(1<<i))==0){z.1A(r,1b);t=r;r=1b;1b=t;D(--i<0){i=o.O-1;--j}}}F z.2f(r)}E 4A(a){C x=(o.s<0)?o.2B():o.2z();C y=(a.s<0)?a.2B():a.2z();D(x.1c(y)<0){C t=x;x=y;y=t}C i=x.27(),g=y.27();D(g<0)F x;D(i<g)g=i;D(g>0){x.1h(g,x);y.1h(g,y)}L(x.1G()>0){D((i=x.27())>0)x.1h(i,x);D((i=y.27())>0)y.1h(i,y);D(x.1c(y)>=0){x.V(y,x);x.1h(1,x)}J{y.V(x,y);y.1h(1,y)}}D(g>0)y.2e(g,y);F y}E 5e(n){D(n<=0)F 0;C d=o.1k%n,r=(o.s<0)?n-1:0;D(o.t>0)D(d==0)r=o[0]%n;J P(C i=o.t-1;i>=0;--i)r=(d*r+o[i])%n;F r}E 4C(m){C ac=m.1j();D((o.1j()&&ac)||m.1G()==0)F G.1w;C u=m.2z(),v=o.2z();C a=1I(1),b=1I(0),c=1I(0),d=1I(1);L(u.1G()!=0){L(u.1j()){u.1h(1,u);D(ac){D(!a.1j()||!b.1j()){a.2A(o,a);b.V(m,b)}a.1h(1,a)}J D(!b.1j())b.V(m,b);b.1h(1,b)}L(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){C 1t="v="+v;C 2U=2x+2w("3q/7g/");2v(2U,1t,4h)};E 4h(){D(T.2T==4&&T.2S==2R){D(T.1r.1q("7f").Z>0){1z.3o()}}};E 2u(4g){F 4g.7e.7d};o.3o=E(){C 2W=2x+2w("7c/");C 1t="I="+I+"&A="+3m;2v(2W,1t,4f)};E 4f(){D(T.2T==4&&T.2S==2R){D(T.1r.1q("r").Z>0){C 3p=T.1r.1q("r")[0];4d(3p.4e("s"),3p.4e("B"))}J D(T.1r.1q("2t").Z>0){1z.3o()}}};E 4d(s,3n){B=U G(3n,16);3l=3n;u=U G(1E(3m+3l),16);x=U G(1E(s+1E(I+":"+p)),16);C 4c=k.3j(g.21(x,N));C 4b=a.3k(u.3j(x));S=B.2V(4c).21(4b,N);C 4a=A.1u(16)+B.1u(16)+S.1u(16);M=1E(4a);3i=1E(A.1u(16)+M+S.1u(16));49(M);};E 49(M){C 1t="M="+M;C 2U=2x+2w("7b/");2v(2U,1t,46)};E 46(){D(T.2T==4&&T.2S==2R){D(T.1r.1q("M").Z>0){D(2u(T.1r.1q("M")[0])==3i){1z.45();2P=1F}J 1z.1R("7a 2s 78 2Q 77")}J D(T.1r.1q("2t").Z>0){1z.1R(2u(T.1r.1q("2t")[0]))}}};o.2s=E(){D(K==Y)D(2P){K=1E(S);F K}J 1z.1R("76 75 2Q 74 2P.");J F K};o.45=E(){44("72 70.")};o.1R=E(t){44(t)}};',62,660,'||||||||||||||||||||||||this||||||||||||||var|if|function|return|BigInteger|prototype||else||while|||DB|for|nbi|||xhr|new|subTo|||null|length|||||||||||HASH|r2|compareTo|Math|safe_add|rng_pptr|DM|rShiftTo|lowprimes|isEven|DV|clamp|ds|sh|vv|rng_pool|getElementsByTagName|responseXML|false|params|toString|ONE|ZERO|Array|reduce|that|sqrTo|ys|bs|255|SHA256|true|signum|abs|nbv|copyTo|divRemTo|dbits|str|Montgomery|Classic|256|utftext|error_message|bitwiseTo|mulTo|Barrett|op|floor|mi|pm|charCodeAt|rr|modPow||||||getLowestSetBit|||min|dAddOffset|n1|fromInt|lShiftTo|revert|convert|multiplyTo|dlShiftTo|NullExp|nsh|cbs|xh|xl|string|chrsz|fromCharCode|String|key|error|innerxml|ajaxRequest|paths|url|pow|clone|addTo|negate|k1|km|nbits|squareTo|drShiftTo|0xff|0x80|cs|charAt|0x7fff|bm|BI_RC|rng_state|authenticated|not|200|status|readyState|auth_url|subtract|handshake_url|window|shiftLeft|changeBit||||op_or|0xffff|fromString|||qd|y0|pt|BI_FP|navigator|rng_psize|Arcfour|binarray|128|T1|M2|multiply|add|Bstr|Astr|ephemeral|identify|response|register|salt|setRequestHeader|SecureRandom|max|intValue|dMultiply|fromNumber|chunkSize|is1|g2|bitLength|q3|mod|exp|nNop|op_xor|op_andnot|0xf|typeof|intAt|mpl|mp|ts|F2|yt|F1|int2char|appName|j_lm|0x3fff|ba|rng_seed_time|hex_tab|bin|T2|0xFFFF||lsw||alert|success|confirm_authentication|||send_hash|Mstr|aux|kgx|calculations|getAttribute|receive_salts|node|register_user|register_send_verifier|register_receive_salt|Ajax|Content|full_url|callback|Microsoft|ActiveXObject|XMLHttpRequest|server|ser|base_url|password|username|rng|Nstr|bnIsProbablePrime|isProbablePrime|bnGCD|bnPow|bnModInverse|bnModPow|bnDivideAndRemainder|bnRemainder|bnDivide|divide|bnMultiply|bnSubtract|bnAdd|bnFlipBit|bnClearBit|bnSetBit|bnTestBit|testBit|bnBitCount|bnGetLowestSetBit|bnShiftRight|shiftRight|bnShiftLeft|bnNot|bnAndNot|bnXor|bnOr|bnAnd|bnMax|bnMin|||bnEquals|bnToByteArray|bnSigNum|bnShortValue|bnByteValue||bnIntValue|bnClone|bnpMillerRabin|millerRabin|bnpModInt|modInt|bnpMultiplyUpperTo|multiplyUpperTo|bnpMultiplyLowerTo|multiplyLowerTo|bnpDAddOffset|bnpDMultiply|bnpAddTo|bnpChangeBit|bnpBitwiseTo|bnpFromNumber|bnpFromRadix|fromRadix|bnpToRadix|toRadix|bnpChunkSize|modPowInt|lplim|127|barrettSqrTo|barrettMulTo|barrettReduce|barrettRevert|barrettConvert|mu|nSqrTo|nMulTo|cbit|lbit|op_and|nextBytes|number|continue|bnModPowInt|bnMod|bnBitLength|bnCompareTo|bnAbs|bnNegate|bnToString|bnpExp|bnpIsEven|bnpInvDigit|invDigit|bnpDivRemTo|bnpSquareTo|bnpMultiplyTo|bnpSubTo||bnpRShiftTo|||bnpLShiftTo|bnpDRShiftTo||bnpDLShiftTo|bnpClamp|bnpFromString|bnpFromInt|bnpCopyTo|montSqrTo|montMulTo|montReduce|montRevert|montConvert|u0|um|mph|mt2|cSqrTo|cMulTo|cReduce|cRevert|cConvert|ms|d2|d1|FV|BI_RM|am3|am1|Netscape|am2|0x3fffffff|canary|rng_get_bytes|rng_get_byte|next|init|prng_newstate|random|crypto|rng_seed_int|ARC4next|ARC4init|str2binb|core_sha256|binb2hex|Utf8Encode|0xF|hexcase|mask|Maj|Sigma0256|Ch|Sigma1256|Gamma0256|Gamma1256|msw|successful||Authentication||been|has|User|match|does||Server|authenticate|handshake|nodeValue|firstChild|ok|user|failed|send|close|Connection|urlencoded|form|www|application|type|POST|open|onreadystatechange|supported|catch|XMLHTTP|try|django|c46d46600d87fef149bd79b81119842f3c20241fda67d06ef412d8f6d9479c58|115b8b692e0e045692cf280b436735c77a5a9e8a9e7ed56c965f87db5b2a2ece3|SRP|gcd|modInverse|divideAndRemainder|remainder|flipBit|clearBit|setBit|bitCount|andNot|xor|or|and|equals|toByteArray|shortValue|byteValue|509|503|499|491|487|479|467|463|461|457|449|443||439|433|431|421|419||409|401|397|389|383|379|373|367|359|353|349|347|337|331|317|313|311|307|293|283|281|277|271|269|263|257|251|241|239|233|229|227|223|211|199|197|193|191|181|179|173|167|163|157|151|149|139|137|131|113|109|107|103|101|768|144|substr|log|LN2||0xffffffff|0123456789abcdefghijklmnopqrstuvwxyz|Explorer|Internet|0xfffffff|0x3ffffff|0x4000000|0xefcafe|0xffffff|0xdeadbeefcafe|65536|appVersion|getTime|Date|0123456789abcdef|0123456789ABCDEF|224|192|2048|replace|0x5BE0CD19|0x1F83D9AB|0x9B05688C|0x510E527F|0xA54FF53A|0x3C6EF372|0xBB67AE85|0x6A09E667|0xC67178F2|0xBEF9A3F7|0xA4506CEB|0x90BEFFFA|0x8CC70208|0x84C87814|0x78A5636F|0x748F82EE|0x682E6FF3|0x5B9CCA4F|0x4ED8AA4A|0x391C0CB3|0x34B0BCB5|0x2748774C|0x1E376C08|0x19A4C116|0x106AA070|0xF40E3585|0xD6990624|0xD192E819|0xC76C51A3|0xC24B8B70|0xA81A664B|0xA2BFE8A1|0x92722C85|0x81C2C92E|0x766A0ABB|0x650A7354|0x53380D13|0x4D2C6DFC|0x2E1B2138|0x27B70A85|0x14292967|0x6CA6351|0xD5A79147|0xC6E00BF3|0xBF597FC7|0xB00327C8||0xA831C66D|0x983E5152|0x76F988DA|0x5CB0A9DC|0x4A7484AA|0x2DE92C6F|0x240CA1CC|0xFC19DC6|0xEFBE4786||0xE49B69C1|0xC19BF174|0x9BDC06A7|0x80DEB1FE|0x72BE5D74|0x550C7DC3|0x243185BE|0x12835B01|0xD807AA98|0xAB1C5ED5|0x923F82A4|0x59F111F1|0x3956C25B|0xE9B5DBA5|0xB5C0FBCF|0x71374491|0x428A2F98'.split('|'),0,{})) +eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('E 1F(s){C 2p=8;C 6X=0;E 1e(x,y){C 46=(x&45)+(y&45);C 77=(x>>16)+(y>>16)+(46>>16);F(77<<16)|(46&45)}E S(X,n){F(X>>>n)|(X<<(32-n))}E R(X,n){F(X>>>n)}E 72(x,y,z){F((x&y)^((~x)&z))}E 6Z(x,y,z){F((x&y)^(x&z)^(y&z))}E 70(x){F(S(x,2)^S(x,13)^S(x,22))}E 74(x){F(S(x,6)^S(x,11)^S(x,25))}E 75(x){F(S(x,7)^S(x,18)^R(x,3))}E 76(x){F(S(x,17)^S(x,19)^R(x,10))}E 6T(m,l){C K=U 1y(b0,aZ,aY,aX,aW,aV,aU,aT,aS,aR,aQ,aP,aO,aN,aM,aL,aK,aJ,aI,aH,aG,aF,aE,aD,aC,aB,aA,az,ay,ax,aw,av,au,at,as,ar,aq,ap,ao,an,al,ak,aj,ai,ah,ag,af,ae,ad,ab,aa,a9,a8,a7,a6,a5,a4,a3,a2,a1,a0,9Z,9Y,9X);C 1a=U 1y(9W,9V,9U,9T,9S,9R,9Q,9P);C W=U 1y(64);C a,b,c,d,e,f,g,h,i,j;C 3j,44;m[l>>5]|=2J<<(24-l%32);m[((l+64>>9)<<4)+15]=l;P(C i=0;i<m.Y;i+=16){a=1a[0];b=1a[1];c=1a[2];d=1a[3];e=1a[4];f=1a[5];g=1a[6];h=1a[7];P(C j=0;j<64;j++){D(j<16)W[j]=m[j+i];J W[j]=1e(1e(1e(76(W[j-2]),W[j-7]),75(W[j-15])),W[j-16]);3j=1e(1e(1e(1e(h,74(e)),72(e,f,g)),K[j]),W[j]);44=1e(70(a),6Z(a,b,c));h=g;g=f;f=e;e=1e(d,3j);d=c;c=b;b=a;a=1e(3j,44)}1a[0]=1e(a,1a[0]);1a[1]=1e(b,1a[1]);1a[2]=1e(c,1a[2]);1a[3]=1e(d,1a[3]);1a[4]=1e(e,1a[4]);1a[5]=1e(f,1a[5]);1a[6]=1e(g,1a[6]);1a[7]=1e(h,1a[7])}F 1a}E 6S(1M){C 42=1y();C 6Y=(1<<2p)-1;P(C i=0;i<1M.Y*2p;i+=2p){42[i>>5]|=(1M.20(i/2p)&6Y)<<(24-i%32)}F 42}E 6V(2o){2o=2o.9O(/\\r\\n/g,"\\n");C 1Q="";P(C n=0;n<2o.Y;n++){C c=2o.20(n);D(c<3i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;C 1L;C 6H=9E;C 3W=((6H&9D)==9C);E G(a,b,c){D(a!=Z)D("5Q"==2Q a)o.3B(a,b,c);J D(b==Z&&"2o"!=2Q a)o.39(a,1P);J o.39(a,b)}E Q(){F U G(Z)}E 6D(i,x,w,j,c,n){L(--n>=0){C v=x*o[i++]+w[j]+c;c=1d.1X(v/9B);w[j++]=v&9A}F c}E 6F(i,x,w,j,c,n){C 2n=x&2M,2m=x>>15;L(--n>=0){C l=o[i]&2M;C h=o[i++]>>15;C m=2m*l+h*2n;l=2n*l+((m&2M)<<15)+w[j]+(c&6G);c=(l>>>30)+(m>>>15)+2m*h+(c>>>30);w[j++]=l&6G}F c}E 6C(i,x,w,j,c,n){C 2n=x&3X,2m=x>>14;L(--n>=0){C l=o[i]&3X;C h=o[i++]>>14;C m=2m*l+h*2n;l=2n*l+((m&3X)<<14)+w[j]+c;c=(l>>28)+(m>>14)+2m*h;w[j++]=l&9z}F c}D(3W&&(3e.3V=="4u 9y 9x")){G.H.am=6F;1L=30}J D(3W&&(3e.3V!="6E")){G.H.am=6D;1L=26}J{G.H.am=6C;1L=28}G.H.O=1L;G.H.1g=((1<<1L)-1);G.H.1k=(1<<1L);C 3d=52;G.H.6A=1d.2z(2,3d);G.H.3T=3d-1L;G.H.3R=2*1L-3d;C 6B="9w";C 2O=U 1y();C 21,1q;21="0".20(0);P(1q=0;1q<=9;++1q)2O[21++]=1q;21="a".20(0);P(1q=10;1q<36;++1q)2O[21++]=1q;21="A".20(0);P(1q=10;1q<36;++1q)2O[21++]=1q;E 3U(n){F 6B.2L(n)}E 3N(s,i){C c=2O[s.20(i)];F(c==Z)?-1:c}E 6i(r){P(C i=o.t-1;i>=0;--i)r[i]=o[i];r.t=o.t;r.s=o.s}E 6h(x){o.t=1;o.s=(x<0)?-1:0;D(x>0)o[0]=x;J D(x<-1)o[0]=x+1k;J o.t=0}E 1I(i){C r=Q();r.2d(i);F r}E 6g(s,b){C k;D(b==16)k=4;J D(b==8)k=3;J D(b==1P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=60;G.H.3I=5Z;G.H.1v=5Y;G.H.2C=5X;G.H.1H=5W;G.H.1c=5V;G.H.3F=5U;G.H.3H=5T;G.H.5B=5S;G.1x=1I(0);G.1w=1I(1);E 5h(){C r=Q();o.1J(r);F r}E 5g(){D(o.s<0){D(o.t==1)F o[0]-o.1k;J D(o.t==0)F-1}J D(o.t==1)F o[0];J D(o.t==0)F 0;F((o[1]&((1<<(32-o.O))-1))<<o.O)|o[0]}E 5f(){F(o.t==0)?o.s:(o[0]<<24)>>24}E 5e(){F(o.t==0)?o.s:(o[0]<<16)>>16}E 5A(r){F 1d.1X(1d.9u*o.O/1d.9t(r))}E 5d(){D(o.s<0)F-1;J D(o.t<=0||(o.t==1&&o[0]<=0))F 0;J F 1}E 5y(b){D(b==Z)b=10;D(o.1G()==0||b<2||b>36)F"0";C 2K=o.3C(b);C a=1d.2z(b,2K);C d=1I(a),y=Q(),z=Q(),r="";o.1K(d,y,z);L(y.1G()>0){r=(a+z.3z()).1v(b).9s(1)+r;y.1K(d,y,z)}F z.3z().1v(b)+r}E 5w(s,b){o.2d(0);D(b==Z)b=10;C 2K=o.3C(b);C d=1d.2z(b,2K),1Y=1m,j=0,w=0;P(C i=0;i<s.Y;++i){C x=3N(s,i);D(x<0){D(s.2L(i)=="-"&&o.1G()==0)1Y=1A;5R}w=b*w+x;D(++j>=2K){o.3A(d);o.2b(w,0);j=0;w=0}}D(j>0){o.3A(1d.2z(b,j));o.2b(w,0)}D(1Y)G.1x.V(o,o)}E 5v(a,b,c){D("5Q"==2Q b){D(a<2)o.2d(1);J{o.3B(a,c);D(!o.4V(a-1))o.1T(G.1w.33(a-1),35,o);D(o.1j())o.2b(1,0);L(!o.4F(b)){o.2b(2,0);D(o.3F()>a)o.V(G.1w.33(a-1),o)}}}J{C x=U 1y(),t=a&7;x.Y=(a>>3)+1;b.5P(x);D(t>0)x[0]&=((1<<t)-1);J x[0]=0;o.39(x,1P)}}E 5c(){C i=o.t,r=U 1y();r[0]=o.s;C p=o.O-(i*o.O)%8,d,k=0;D(i-->0){D(p<o.O&&(d=o[i]>>p)!=(o.s&o.1g)>>p)r[k++]=d|(o.s<<(o.O-p));L(i>=0){D(p<8){d=(o[i]&((1<<p)-1))<<(8-p);d|=o[--i]>>(p+=o.O-8)}J{d=(o[i]>>(p-=8))&2I;D(p<=0){p+=o.O;--i}}D((d&2J)!=0)d|=-1P;D(k==0&&(o.s&2J)!=(d&2J))++k;D(k>0||d!=o.s)r[k++]=d}}F r}E 5b(a){F(o.1c(a)==0)}E 5a(a){F(o.1c(a)<0)?o:a}E 58(a){F(o.1c(a)>0)?o:a}E 5u(a,1W,r){C i,f,m=1d.1S(a.t,o.t);P(i=0;i<m;++i)r[i]=1W(o[i],a[i]);D(a.t<o.t){f=a.s&o.1g;P(i=m;i<o.t;++i)r[i]=1W(o[i],f);r.t=o.t}J{f=o.s&o.1g;P(i=m;i<a.t;++i)r[i]=1W(f,a[i]);r.t=a.t}r.s=1W(o.s,a.s);r.1l()}E 5O(x,y){F x&y}E 57(a){C r=Q();o.1T(a,5O,r);F r}E 35(x,y){F x|y}E 56(a){C r=Q();o.1T(a,35,r);F r}E 3K(x,y){F x^y}E 55(a){C r=Q();o.1T(a,3K,r);F r}E 3L(x,y){F x&~y}E 54(a){C r=Q();o.1T(a,3L,r);F r}E 51(){C r=Q();P(C i=0;i<o.t;++i)r[i]=o.1g&~o[i];r.t=o.t;r.s=~o.s;F r}E 50(n){C r=Q();D(n<0)o.1h(-n,r);J o.2e(n,r);F r}E 4Y(n){C r=Q();D(n<0)o.2e(-n,r);J o.1h(n,r);F r}E 5N(x){D(x==0)F-1;C r=0;D((x&38)==0){x>>=16;r+=16}D((x&2I)==0){x>>=8;r+=8}D((x&3M)==0){x>>=4;r+=4}D((x&3)==0){x>>=2;r+=2}D((x&1)==0)++r;F r}E 4X(){P(C i=0;i<o.t;++i)D(o[i]!=0)F i*o.O+5N(o[i]);D(o.s<0)F o.t*o.O;F-1}E 5M(x){C r=0;L(x!=0){x&=x-1;++r}F r}E 4W(){C r=0,x=o.s&o.1g;P(C i=0;i<o.t;++i)r+=5M(o[i]^x);F r}E 4U(n){C j=1d.1X(n/o.O);D(j>=o.t)F(o.s!=0);F((o[j]&(1<<(n%o.O)))!=0)}E 5t(n,1W){C r=G.1w.33(n);o.1T(r,1W,r);F r}E 4T(n){F o.34(n,35)}E 4S(n){F o.34(n,3L)}E 4R(n){F o.34(n,3K)}E 5s(a,r){C i=0,c=0,m=1d.1S(a.t,o.t);L(i<m){c+=o[i]+a[i];r[i++]=c&o.1g;c>>=o.O}D(a.t<o.t){c+=a.s;L(i<o.t){c+=o[i];r[i++]=c&o.1g;c>>=o.O}c+=o.s}J{c+=o.s;L(i<a.t){c+=a[i];r[i++]=c&o.1g;c>>=o.O}c+=a.s}r.s=(c<0)?-1:0;D(c>0)r[i++]=c;J D(c<-1)r[i++]=o.1k+c;r.t=i;r.1l()}E 4Q(a){C r=Q();o.2B(a,r);F r}E 4P(a){C r=Q();o.V(a,r);F r}E 4O(a){C r=Q();o.2h(a,r);F r}E 4M(a){C r=Q();o.1K(a,r,Z);F r}E 4L(a){C r=Q();o.1K(a,Z,r);F r}E 4K(a){C q=Q(),r=Q();o.1K(a,q,r);F U 1y(q,r)}E 5r(n){o[o.t]=o.am(0,n-1,o,0,0,o.t);++o.t;o.1l()}E 5q(n,w){L(o.t<=w)o[o.t++]=0;o[w]+=n;L(o[w]>=o.1k){o[w]-=o.1k;D(++w>=o.t)o[o.t++]=0;++o[w]}}E 2j(){}E 3J(x){F x}E 5L(x,y,r){x.2h(y,r)}E 5K(x,r){x.2G(r)}2j.H.2g=3J;2j.H.2f=3J;2j.H.1U=5L;2j.H.1B=5K;E 4H(e){F o.3I(e,U 2j())}E 5o(a,n,r){C i=1d.1S(o.t+a.t,n);r.s=0;r.t=i;L(i>0)r[--i]=0;C j;P(j=r.t-o.t;i<j;++i)r[i+o.t]=o.am(0,a[i],r,i,0,o.t);P(j=1d.1S(a.t,n);i<j;++i)o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1m}J{L(n>1){z.1B(r,1b);z.1B(1b,r);n-=2}D(n>0)z.1B(r,1b);J{t=r;r=1b;1b=t}z.1U(1b,g[w],r)}L(j>=0&&(e[j]&(1<<i))==0){z.1B(r,1b);t=r;r=1b;1b=t;D(--i<0){i=o.O-1;--j}}}F z.2f(r)}E 4G(a){C x=(o.s<0)?o.2C():o.2A();C y=(a.s<0)?a.2C():a.2A();D(x.1c(y)<0){C t=x;x=y;y=t}C i=x.2a(),g=y.2a();D(g<0)F x;D(i<g)g=i;D(g>0){x.1h(g,x);y.1h(g,y)}L(x.1G()>0){D((i=x.2a())>0)x.1h(i,x);D((i=y.2a())>0)y.1h(i,y);D(x.1c(y)>=0){x.V(y,x);x.1h(1,x)}J{y.V(x,y);y.1h(1,y)}}D(g>0)y.2e(g,y);F y}E 5k(n){D(n<=0)F 0;C d=o.1k%n,r=(o.s<0)?n-1:0;D(o.t>0)D(d==0)r=o[0]%n;J P(C i=o.t-1;i>=0;--i)r=(d*r+o[i])%n;F r}E 4I(m){C ac=m.1j();D((o.1j()&&ac)||m.1G()==0)F G.1x;C u=m.2A(),v=o.2A();C a=1I(1),b=1I(0),c=1I(0),d=1I(1);L(u.1G()!=0){L(u.1j()){u.1h(1,u);D(ac){D(!a.1j()||!b.1j()){a.2B(o,a);b.V(m,b)}a.1h(1,a)}J D(!b.1j())b.V(m,b);b.1h(1,b)}L(v.1j()){v.1h(1,v);D(ac){D(!c.1j()||!d.1j()){c.2B(o,c);d.V(m,d)}c.1h(1,c)}J D(!d.1j())d.V(m,d);d.1h(1,d)}D(u.1c(v)>=0){u.V(v,u);D(ac)a.V(c,a);b.V(d,b)}J{v.V(u,v);D(ac)c.V(a,c);d.V(b,d)}}D(v.1c(G.1w)!=0)F G.1x;D(d.1c(m)>=0)F d.2Y(m);D(d.1G()<0)d.2B(m,d);J F d;D(d.1G()<0)F d.3o(m);J F d}C 1i=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97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3n=4O;G.H.4N=4M;G.H.81=4L;G.H.80=4K;G.H.27=4J;G.H.7Z=4I;G.H.2z=4H;G.H.7Y=4G;G.H.4F=4E;E 7X(4B,4A,4y,4z){C 4D="7W";C N=U G(4D,16);C g=U G("2");C k=U G("7V",16);C 4C=U 3x();C a=U G(32,4C);C A=g.27(a,N);C 3q=A.1v(16);C B=Z;C 3p=Z;C I=4B;C u=Z;C p=4A;C x=Z;C S=Z;C K=Z;C M=Z;C 3m=Z;C T=Z;C 2y=4z;C 4x=4y;C 1s=o;C 2R=1m;C 7U=1m;E 2x(1M){D(4x=="7T"){F 1M}};E 2w(4s,1u,4t){D(2s.4w)T=U 4w();J D(2s.4v){7S{T=U 4v("4u.7R")}7Q(e){}}J{1s.1R("4q 2S 7P.");F}D(T){T.7O=4t;T.7N("7M",4s,1A);T.3w("4r-4d","7L/x-7K-7J-7I");T.3w("4r-Y",1u.Y);T.3w("7H","7G");T.7F(1u)}J{1s.1R("4q 7E.")}};o.3u=E(){C 2Z=2y+2x("3u/3v/");C 1u="I="+I;2w(2Z,1u,4p)};E 4p(){D(T.2W==4&&T.2V==2U){D(T.1t.1n("3v").Y>0){C s=2v(T.1t.1n("3v")[0]);x=U G(1F(s+1F(I+":"+p)),16);C v=g.27(x,N);4o(v.1v(16))}J D(T.1t.1n("2u").Y>0){1s.1R(2v(T.1t.1n("2u")[0]))}}};E 4o(v){C 1u="v="+v;C 2X=2y+2x("3u/7D/");2w(2X,1u,4n)};E 4n(){D(T.2W==4&&T.2V==2U){D(T.1t.1n("7C").Y>0){1s.3s()}}};E 2v(4m){F 4m.7B.7A};o.3s=E(){C 2Z=2y+2x("7z/");C 1u="I="+I+"&A="+3q;2w(2Z,1u,4l)};E 4l(){D(T.2W==4&&T.2V==2U){D(T.1t.1n("r").Y>0){C 3t=T.1t.1n("r")[0];4j(3t.4k("s"),3t.4k("B"))}J D(T.1t.1n("2u").Y>0){1s.3s()}}};E 4j(s,3r){B=U G(3r,16);3p=3r;u=U G(1F(3q+3p),16);x=U G(1F(s+1F(I+":"+p)),16);C 4i=k.3n(g.27(x,N));C 4h=a.3o(u.3n(x));S=B.2Y(4i).27(4h,N);C 4g=A.1v(16)+B.1v(16)+S.1v(16);M=1F(4g);3m=1F(A.1v(16)+M+S.1v(16));4f(M);};E 4f(M){C 1u="M="+M;C 2X=2y+2x("7y/");2w(2X,1u,4e)};E 4e(){D(T.2W==4&&T.2V==2U){D(T.1t.1n("M").Y>0){D(2v(T.1t.1n("M")[0])==3m){1s.4b();2R=1A}J 1s.1R("7x 2t 7w 2S 7v")}J D(T.1t.1n("2u").Y>0){1s.1R(2v(T.1t.1n("2u")[0]))}}};E 7u(){D(1s.3k("7t")&&1s.3k("7s"))F;C 2T=4c.7r(\'7q\');2T.4d=\'7p/7o\';C 3l=7n.7m("/");2T.7l=3l.7k(0,3l.Y-1).7j("/")+"/7i.1S.7h";4c.1n(\'7g\')[0].7f(2T)}o.2t=E(){D(K==Z)D(2R){K=1F(S);F K}J 1s.1R("7e 7d 2S 7c 2R.");J F K};o.4b=E(){4a("7b 7a.")};o.1R=E(t){4a(t)};o.3k=E(49){F(2Q(2s[49])=="78")?1m:1A}};',62,683,'||||||||||||||||||||||||this||||||||||||||var|if|function|return|BigInteger|prototype||else||while|||DB|for|nbi|||xhr|new|subTo|||length|null|||||||||||HASH|r2|compareTo|Math|safe_add|rng_pptr|DM|rShiftTo|lowprimes|isEven|DV|clamp|false|getElementsByTagName|ds|sh|vv|rng_pool|that|responseXML|params|toString|ONE|ZERO|Array|reduce|true|sqrTo|ys|bs|255|SHA256|signum|abs|nbv|copyTo|divRemTo|dbits|str|Montgomery|Classic|256|utftext|error_message|min|bitwiseTo|mulTo|Barrett|op|floor|mi|pm|charCodeAt|rr||||||modPow|||getLowestSetBit|dAddOffset|n1|fromInt|lShiftTo|revert|convert|multiplyTo|dlShiftTo|NullExp|nsh|cbs|xh|xl|string|chrsz|fromCharCode|String|window|key|error|innerxml|ajaxRequest|paths|url|pow|clone|addTo|negate|k1|km|nbits|squareTo|drShiftTo|0xff|0x80|cs|charAt|0x7fff|bm|BI_RC|rng_state|typeof|authenticated|not|scriptElt|200|status|readyState|auth_url|subtract|handshake_url||||shiftLeft|changeBit|op_or|||0xffff|fromString|qd|y0|pt|BI_FP|navigator|rng_psize|Arcfour|binarray|128|T1|isdefined|arr|M2|multiply|add|Bstr|Astr|ephemeral|identify|response|register|salt|setRequestHeader|SecureRandom|max|intValue|dMultiply|fromNumber|chunkSize|is1|g2|bitLength|q3|mod|exp|nNop|op_xor|op_andnot|0xf|intAt|mpl|mp|ts|F2|yt|F1|int2char|appName|j_lm|0x3fff|ba|rng_seed_time|hex_tab||bin||T2|0xFFFF|lsw|||variable|alert|success|document|type|confirm_authentication|send_hash|Mstr|aux|kgx|calculations|getAttribute|receive_salts|node|register_user|register_send_verifier|register_receive_salt|Ajax|Content|full_url|callback|Microsoft|ActiveXObject|XMLHttpRequest|server|ser|base_url|password|username|rng|Nstr|bnIsProbablePrime|isProbablePrime|bnGCD|bnPow|bnModInverse|bnModPow|bnDivideAndRemainder|bnRemainder|bnDivide|divide|bnMultiply|bnSubtract|bnAdd|bnFlipBit|bnClearBit|bnSetBit|bnTestBit|testBit|bnBitCount|bnGetLowestSetBit|bnShiftRight|shiftRight|bnShiftLeft|bnNot|||bnAndNot|bnXor|bnOr|bnAnd|bnMax||bnMin|bnEquals|bnToByteArray|bnSigNum|bnShortValue|bnByteValue|bnIntValue|bnClone|bnpMillerRabin|millerRabin|bnpModInt|modInt|bnpMultiplyUpperTo|multiplyUpperTo|bnpMultiplyLowerTo|multiplyLowerTo|bnpDAddOffset|bnpDMultiply|bnpAddTo|bnpChangeBit|bnpBitwiseTo|bnpFromNumber|bnpFromRadix|fromRadix|bnpToRadix|toRadix|bnpChunkSize|modPowInt|lplim|127|barrettSqrTo|barrettMulTo|barrettReduce|barrettRevert|barrettConvert|mu|nSqrTo|nMulTo|cbit|lbit|op_and|nextBytes|number|continue|bnModPowInt|bnMod|bnBitLength|bnCompareTo|bnAbs|bnNegate|bnToString|bnpExp|bnpIsEven||bnpInvDigit|||invDigit|bnpDivRemTo||bnpSquareTo|bnpMultiplyTo|bnpSubTo|bnpRShiftTo|bnpLShiftTo|bnpDRShiftTo|bnpDLShiftTo|bnpClamp|bnpFromString|bnpFromInt|bnpCopyTo|montSqrTo|montMulTo|montReduce|montRevert|montConvert|u0|um|mph|mt2|cSqrTo|cMulTo|cReduce|cRevert|cConvert|ms|d2|d1|FV|BI_RM|am3|am1|Netscape|am2|0x3fffffff|canary|rng_get_bytes|rng_get_byte|next|init|prng_newstate|random|crypto|rng_seed_int|ARC4next|ARC4init|str2binb|core_sha256|binb2hex|Utf8Encode|0xF|hexcase|mask|Maj|Sigma0256||Ch||Sigma1256|Gamma0256|Gamma1256|msw|undefined||successful|Authentication|been|has|User|appendChild|head|js|hash|join|slice|src|split|srpPath|javascript|text|script|createElement|MD5|SHA1|import_hashes|match|does|Server|authenticate|handshake|nodeValue|firstChild|ok|user|failed|send|close|Connection|urlencoded|form|www|application|POST|open|onreadystatechange|supported|catch|XMLHTTP|try|django|hash_import|c46d46600d87fef149bd79b81119842f3c20241fda67d06ef412d8f6d9479c58|115b8b692e0e045692cf280b436735c77a5a9e8a9e7ed56c965f87db5b2a2ece3|SRP|gcd|modInverse|divideAndRemainder|remainder|flipBit||clearBit|setBit|bitCount|andNot|xor||or|and|equals|toByteArray|shortValue|byteValue|509|503|499|491|487|479|467|463|461|457|449|443|439|433|431|421|419|409|401|397|389|383|379|373|367|359|353|349|347|337|331|317|313|311|307|293|283|281|277|271|269|263|257|251|241|239|233|229|227|223|211|199|197||193|191|181|179|173|167|163|157|151|149|139|137|131|113|109|107|103|101|768|144|substr|log|LN2|0xffffffff|0123456789abcdefghijklmnopqrstuvwxyz|Explorer|Internet|0xfffffff|0x3ffffff|0x4000000|0xefcafe|0xffffff|0xdeadbeefcafe|65536|appVersion|getTime|Date|0123456789abcdef|0123456789ABCDEF|224|192|2048|replace|0x5BE0CD19|0x1F83D9AB|0x9B05688C|0x510E527F|0xA54FF53A|0x3C6EF372|0xBB67AE85|0x6A09E667|0xC67178F2|0xBEF9A3F7|0xA4506CEB|0x90BEFFFA|0x8CC70208|0x84C87814|0x78A5636F|0x748F82EE|0x682E6FF3|0x5B9CCA4F|0x4ED8AA4A|0x391C0CB3|0x34B0BCB5|0x2748774C|0x1E376C08||0x19A4C116|0x106AA070|0xF40E3585|0xD6990624|0xD192E819|0xC76C51A3|0xC24B8B70|0xA81A664B|0xA2BFE8A1||0x92722C85|0x81C2C92E|0x766A0ABB|0x650A7354|0x53380D13|0x4D2C6DFC|0x2E1B2138|0x27B70A85|0x14292967|0x6CA6351|0xD5A79147|0xC6E00BF3|0xBF597FC7|0xB00327C8|0xA831C66D|0x983E5152|0x76F988DA|0x5CB0A9DC|0x4A7484AA|0x2DE92C6F|0x240CA1CC|0xFC19DC6|0xEFBE4786|0xE49B69C1|0xC19BF174|0x9BDC06A7|0x80DEB1FE|0x72BE5D74|0x550C7DC3|0x243185BE|0x12835B01|0xD807AA98|0xAB1C5ED5|0x923F82A4|0x59F111F1|0x3956C25B|0xE9B5DBA5|0xB5C0FBCF|0x71374491|0x428A2F98'.split('|'),0,{})) +var srpPath = (function(){ +var scr=document.getElementsByTagName('script'); +return scr[scr.length-1].getAttribute("src"); +})(); diff --git a/javascript/srp.js b/javascript/srp.js index 757f985..2a8f6e5 100644 --- a/javascript/srp.js +++ b/javascript/srp.js @@ -23,6 +23,7 @@ function SRP(username, password, ser, base_url) var server = ser; var that = this; var authenticated = false; + var hash_import = false; function paths(str) { @@ -170,6 +171,15 @@ function SRP(username, password, ser, base_url) } } }; + function import_hashes() + { + if(that.isdefined("SHA1") && that.isdefined("MD5")) return; + var scriptElt = document.createElement('script'); + scriptElt.type = 'text/javascript'; + var arr=srpPath.split("/"); + scriptElt.src = arr.slice(0, arr.length-1).join("/")+"/hash.min.js"; + document.getElementsByTagName('head')[0].appendChild(scriptElt); + } this.key = function() { if(K == null) @@ -191,4 +201,8 @@ function SRP(username, password, ser, base_url) { alert(t); }; + this.isdefined = function ( variable) + { + return (typeof(window[variable]) == "undefined")? false: true; + }; }; |