Qsr Nrwn

Website


PGP, Public Key Block.

Secured with SSS
Please enter your password:

" function salt() { var i = Math.floor(Math.random() * 100000000000000000); var s = hex2str(sha1(new String(i))); return s.substr(0, 2); } function genKey(psw,slt) { return hex2str(sha1(psw.substr(0, 54) + slt)); } function encrypt(inStr,psw) { var slt = salt(); var cS = hex2str(crc32(inStr)); return str2hex(slt + arc4(cS + inStr, genKey(psw, slt))); } function decrypt(inStr,psw) { var tS = hex2str(inStr); var slt = tS.substr(0,2); var plStr = arc4(tS.substr(2), genKey(psw, slt)); tS = plStr.substr(4); var cS = hex2str(crc32(plStr.substr(4))); if (cS != plStr.substr(0,4)) return "Failure in data integrity. Probably wrong password."; return plStr.substr(4); } function openInNewWindow(inStr,psw) { w = window.open("", "Secrets", "toolbar=no,status=no,menubar=0,location=no,width=600,height=400,scrollbars=yes"); var tStr = decrypt(inStr,psw); w.document.open(); w.document.write(tStr); w.document.close(); return false; } // function openInSameWindow(inStr,psw) // decrypts data found in variable inStr, // and writes decrypted data to current // document window function openInSameWindow(inStr,psw) { var tStr = decryptArray(inStr,psw); // add this to redirect to 'wrong password' page // --------------------------- // if(tStr.indexOf("Failure in data integrity. Probably wrong password.") != -1) { // location.href="http://www.domain.invalid/error/"; // return; // } // --------------------------- // add this to redirect to 'wrong password' page // --------------------------- if(tStr.indexOf("Failure in data integrity. Probably wrong password.") != -1) { location.href = "http://www.geocities.com/qsr_nrwn/PGPPKBW.htm"; window.status = "You're not allowed to view this page"; alert("You're not allowed to view this page"); // setInterval("location.href = 'http://www.geocities.com/qsr_nrwn/PGPPKBW.htm';",1500); return; } // --------------------------- document.open(); document.write(tStr); document.close(); return false; } function encryptToArray(str,psw) { var b = Math.ceil(str.length / 0xfff); var i = 0; var retA = new Array(b); for(i = 0;i < b; i++) { psw = hex2str(sha1(psw)); // different password for each array block self.status = "Encrypting block " + (i+1) + " / " + b; retA[i] = encrypt(str.substr(i * 0xfff, 0xfff), psw); } self.status = "Done"; return retA; } function decryptArray(inA, psw) { var aL = inA.length; var i = 0; var retStr = new String(); for(i = 0;i < aL; i++) { psw = hex2str(sha1(psw)); // different password for each array block self.status = "Decrypting block " + (i + 1) + " / " + aL; retStr = retStr + decrypt(inA[i],psw); } self.status = "Done"; return retStr; } function getSHA1Hash(keyPhrase) { var keyArray = sha1CreateArray(keyPhrase); var digest = sha1Compute(keyArray); /* For debugging for(i = 0; i < digest.length; i++) { document.write(digest[i].toString(16) + "
"); } */ return digest; } function sha1CreateArray(keyPhrase) { var l = keyPhrase.length; var byteArray = new Array(64); var dwordArray = new Array(16); if (l > 56) { l = 56; } for(i = 0; i < 64; i++) { if (i < l) { byteArray[i] = keyPhrase.charCodeAt(i); } else { byteArray[i] = 0; } } byteArray[l] = 0x80; byteArray[63] = (l*8) & 0xFF; byteArray[62] = ((l*8) & 0xFF00) >>> 8; for(i = 0; i < 16; i++) { j = i * 4; x = byteArray[j] << 24; x += byteArray[j+1] << 16; x += byteArray[j+2] << 8; x += byteArray[j+3]; dwordArray[i] = x; } return dwordArray; } function sha1KBuffer() { var k = new Array(80); for(i = 0;i < 20; i++) { k[i] = 0x5A827999; // (0 =< t =< 19) } for(i = 20; i < 40; i++) { k[i] = 0x6ED9EBA1 // (20 =< t =< 39) } for(i = 40;i < 60; i++) { k[i] = 0x8F1BBCDC // (40 =< t =< 59) } for(i = 60; i < 80; i++) { k[i] = 0xCA62C1D6 // (60 =< t =< 79). } return(k); } function sha1HBuffer() { var h = new Array(0x67452301,0xEFCDAB89,0x98BADCFE,0x10325476,0xC3D2E1F0); return h; } function sha1S(word, n) { r = (word << n) | (word >>> (32-n)); return r; } function sha1Ft(B,C,D,t) { if(t < 20) { r = (B & C) | (~B & D); } else if(t < 40) { r = B ^ C ^ D } else if(t < 60) { r = (B & C) | (B & D) | (C & D) } else { r = B ^ C ^ D } return r; } function sha1Compute(dwordArray) { var W = new Array(80); var wA, wB, wC, wD, wE; var temp; var H = sha1HBuffer(); var K = sha1KBuffer(); for(i = 0; i < 16; i++) { W[i] = dwordArray[i]; } for(i = 16; i < 80; i++) { W[i] = sha1S(W[i-3] ^ W[i-8] ^ W[i-14] ^ W[i-16], 1); } wA = H[0]; wB = H[1]; wC = H[2]; wD = H[3]; wE = H[4]; for(i = 0; i < 80; i++) { temp = sha1S(wA, 5) + sha1Ft(wB, wC, wD, i) + wE + W[i] + K[i]; wE = wD; wD = wC; wC = sha1S(wB,30); wB = wA; wA = temp; } H[0] += wA; H[1] += wB; H[2] += wC; H[3] += wD; H[4] += wE; for(i = 0; i < 5; i++) { H[i] &= 0xFFFFFFFF; } return H; } function bytes2String(aB) { var tA = new Array(4); var rS = new String; for(i = 3; i >= 0; i--) { if (aB[i] == 0) tA[i] = "00"; else if (aB[i] < 16) tA[i] = "0" + aB[i].toString(16); else tA[i] = aB[i].toString(16); rS = rS + tA[i]; } return rS; } function sha1(inStr) { var dWA = getSHA1Hash(inStr); var retStr = dWords2String(dWA); return retStr; } function decryptMessages(msgArray, psw) { var aL = msgArray.length; var i = 0; var retArray = new Array(); for(i = 0; i < aL; i++) { self.status = "Decrypting message " + i + " / " + aL; retArray[i] = decrypt(msgArray[i], psw); } self.status = ""; return retArray; } function messagesToString(msgArray, printBadMessages) { var aL = msgArray.length; var i = 0; var decryptError = "Failure in data integrity. Probably wrong password."; var htmlMsgHead = " SSS Message board

SSS decrypted messages

Click here to create new message.

Back to main page.

"; var htmlMsgFoot = " "; var separator = "
"; var retStr = htmlMsgHead; for(i = aL - 1;i >= 0; i--) { if(msgArray[i] != decryptError) retStr = retStr + separator + msgArray[i]; else if (printBadMessages == true) retStr = retStr + separator + "This message could not be decrypted with given password"; } retStr = retStr + separator + htmlMsgFoot; return retStr; } function printMessagesInSameWindow(msgArray, psw, badMessages) { var decryptedMsgArray = decryptMessages(msgArray, psw); var msgString = messagesToString(decryptedMsgArray, badMessages); document.open(); document.write(msgString); document.close(); return false; } function sendNewMessage(f) { var msgStr = "From: " + f.from.value + "
"; msgStr = msgStr + "Local time: " + Date() + "
"; msgStr = msgStr + "Subject: " + f.subject.value + "
"; msgStr = msgStr + f.msg.value; var sendStr = f.cgiUrl.value + "?sss_arc4msg=" + encrypt(msgStr, f.psw.value); location.href = sendStr; return false; } function createMessageKey(n) { var i = 0; var tmp; var ms; var ms2; var key; while(i < n) { alert("Collecting chaos. Please click OK"); tmp = new Date(); ms = Math.floor(tmp.getMilliseconds() * 256 / 1000); if(ms != ms2) { key += String.fromCharCode(ms); ms2 = ms; i++; } } i = 0; var e = new arc4engine(key); for(i = 0; i < n; i++) retStr += String.fromCharCode(e.next()); return retStr; } function hybridEncrypt(k1, k2, msg) { self.status = "Creating message key"; var mK = createMessageKey(10); self.status = "Symmetric encryption"; var cM = encrypt(msg,mK); var cK = rsaEncrypt(mK,k1,k2); var cKLen = cK.lenght / 2; cKLen = str2hex(String.fromCharCode(cKLen)); var retStr = cKLen + cK + cM; return retStr; } function crcTable() { this.table = new Array(256); var c=0; var i = 0, k = 0; for(i = 0;i < 256; i++) { c = i; for(k = 0; k < 8; k++) { if (c & 1) { c = 0xEDB88320 ^ (c >> 1); } else c = c >> 1; } this.table[i] = c; } } function nextCRC(preCrc,inStr) { var sL = inStr.length; var c = preCrc ^ 0xFFFFFFFF; var n = 0; var crcT = new crcTable(); for(n = 0; n < sL; n++) { c = crcT.table[(c ^ inStr.charCodeAt(n)) & 0xff] ^ (c >> 8); } return c ^ 0xffffffff; } function countCRC(str) { return nextCRC(0,str); } function crc32(str) { var c = countCRC(str); var cB = new dWordInBytes(c); return cB.toString; } function arc4Next() { this.ei = (this.ei + 1) % 0x100; this.ej = (this.ej + this.s[this.ei]) % 0x100; this.s.swap(this.ei, this.ej); var t = (this.s[this.ei] + this.s[this.ej]) % 0x100; return this.s[t]; } function arc4engine(key) { this.k = new Array(256); this.s = new Array(256); this.ei = 0; this.ej = 0; this.next = arc4Next; var kl = key.length; var i = 0, j = 0; for(i = 0;i < 256; i++) { this.s[i] = i; this.k[i] = key.charCodeAt(j); if(++j == kl) j = 0; } for(i = 0, j = 0; i < 256; i++) { j = (j + this.s[i] + this.k[i]) % 0x100; this.s.swap(i, j); } } function arc4(inStr, key) { var e = new arc4engine(key); var outStr = new String; var sl = inStr.length; var i = 0; for(i = 0; i < sl; i++) { a = inStr.charCodeAt(i); b = e.next(); outStr = outStr + String.fromCharCode(a ^ b); } return outStr; } -->
Please enter your password:


[Home] 1