Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

encryption

Name: Anonymous 2008-04-18 11:06

i created a html file which does CBC encryption in javascript and converts the result to hex. What does anon think about encryption? For me it's like safe sex (interesting, but too much of a nuisance to actually practice it).

http://www.2shared.com/file/3163087/1a14b3fa/stream.html


DA5CAE33789E8D00A8E1D2DACDC44A44C58F91369999FE4678769A3F9450
6F16C98212F7270E8201D856C8262417535452FBFC52CDEC977607702853
847CF5040BDA9EAF98C4CE0E54136C5CFC6BBE72541B5003C8F4DFB5BEE6
BB89EB076DA678551B50C1A53F1F6FEA2F7D2298D806F050F738DB281248
7BA2F476EA8169528FAA589C076CB0CF4349CC0FE9DD5EF771FB6A0E5413
CEF67F370D4E3404191BAB68641F2C106FD277BB5CF29CAF66259F16271B
F6A2E3C6846D0F60038D7E01E8EB529D


in b4 sGTFO

Name: Anonymous 2008-04-18 14:28

<html><head><style>body { color: white; background-color: black; }</style><script type="text/javascript">
N = 624;
M = 397;
MATRIX_A = 0x9908b0df;
UPPER_MASK = 0x80000000;
LOWER_MASK = 0x7fffffff;
var mt = new Array(N);
var mti = N+1;
function unsigned32 (n1) { return n1 < 0 ? (n1 ^ UPPER_MASK) + UPPER_MASK : n1; }
function subtraction32 (n1, n2) { return n1 < n2 ? unsigned32((0x100000000 - (n2 - n1)) & 0xffffffff) : n1 - n2; }
function addition32 (n1, n2) { return unsigned32((n1 + n2) & 0xffffffff) }
function multiplication32 (n1, n2) {
    var sum = 0;
    for (var i = 0; i < 32; ++i){
        if ((n1 >>> i) & 0x1){
            sum = addition32(sum, unsigned32(n2 << i));
        }
    }
    return sum;
}
function init_genrand(s)
{
    mt[0]= unsigned32(s & 0xffffffff);
    for (mti=1; mti<N; mti++) {
        mt[mti] = addition32(multiplication32(1812433253, unsigned32(mt[mti-1] ^ (mt[mti-1] >>> 30))), mti);
        mt[mti] = unsigned32(mt[mti] & 0xffffffff);
    }
}
function init_by_array(init_key, key_length)
{
    var i, j, k;
    init_genrand(19650218);
    i=1; j=0;
    k = (N>key_length ? N : key_length);
    for (; k; k--) {
        mt[i] = addition32(addition32(unsigned32(mt[i] ^ multiplication32(unsigned32(mt[i-1] ^ (mt[i-1] >>> 30)), 1664525)), init_key[j]), j);
        mt[i] = unsigned32(mt[i] & 0xffffffff);
        i++; j++;
        if (i>=N) { mt[0] = mt[N-1]; i=1; }
        if (j>=key_length) j=0;
    }
    for (k=N-1; k; k--) {
        mt[i] = subtraction32(unsigned32((dbg=mt[i]) ^ multiplication32(unsigned32(mt[i-1] ^ (mt[i-1] >>> 30)), 1566083941)), i);
        mt[i] = unsigned32(mt[i] & 0xffffffff);
        i++;
        if (i>=N) { mt[0] = mt[N-1]; i=1; }
    }
    mt[0] = 0x80000000;
}
function genrand_int32()
{
    var y;
    var mag01 = new Array(0x0, MATRIX_A);
    if (mti >= N) {
        var kk;
        if (mti == N+1)
            init_genrand(5489);
        for (kk=0;kk<N-M;kk++) {
            y = unsigned32((mt[kk]&UPPER_MASK)|(mt[kk+1]&LOWER_MASK));
            mt[kk] = unsigned32(mt[kk+M] ^ (y >>> 1) ^ mag01[y & 0x1]);
        }
        for (;kk<N-1;kk++) {
            y = unsigned32((mt[kk]&UPPER_MASK)|(mt[kk+1]&LOWER_MASK));
            mt[kk] = unsigned32(mt[kk+(M-N)] ^ (y >>> 1) ^ mag01[y & 0x1]);
        }
        y = unsigned32((mt[N-1]&UPPER_MASK)|(mt[0]&LOWER_MASK));
        mt[N-1] = unsigned32(mt[M-1] ^ (y >>> 1) ^ mag01[y & 0x1]);
        mti = 0;
    }
    y = mt[mti++];
    y = unsigned32(y ^ (y >>> 11));
    y = unsigned32(y ^ ((y << 7) & 0x9d2c5680));
    y = unsigned32(y ^ ((y << 15) & 0xefc60000));
    y = unsigned32(y ^ (y >>> 18));
    return y;
}

function l() {
    pass = document.getElementById("pass").value
    if (pass) { init_by_array(pass,pass.length); return true; }
    else { alert('ENTER PASSWORD FIRST'); return false; }
}
function dec2hex(i) {
    hex = "0123456789ABCDEF"
    r = i % 16;
    s = hex.charAt((i-r)/16) + hex.charAt(r);
    return s;
}
function e() {
    if (l()) {
        iv = Math.floor(Math.random()*256)
        body = document.getElementById("body").value
        result = dec2hex(iv);
        for (i=0;i<body.length;i++) {
            if ((i+1)%30 == 0) result = result + "\n"
            iv = (body.charCodeAt(i)+iv+genrand_int32())%256
            result = result + dec2hex(iv)
        }
        document.getElementById("body").value = result
    }
}
function d() {
    if (l()) {
        r = /[^0-9A-F]/g
        body = document.getElementById("body").value.replace(r,"")
        result = ""
        for(i=1;(i*2)<body.length;i++) {
            s=(parseInt(body.substr(i*2,2),16)-parseInt(body.substr((i-1)*2,2),16)-genrand_int32());
            if (s<0) { s=256-((-s)%256); }
            result = result + String.fromCharCode(s);
        }
        document.getElementById("body").value = result
    }
}
    </script>
  </head>
<body>
<form>
<pre>

CBC style encryption, using the mersenne twister as generator.
feel free to download/edit/share this file with anyone.
   
Password: <input class="inputText" type="password" value="NONAMEFAGS" id="pass">

<textarea id="body" rows="20" cols="65"></textarea>

<input id="encrypt" type="button" value="Encrypt" onclick="e();"> <input id="decrypt" type="button" value="Decrypt" onclick="d();">
</pre>
</form>
</body>
</html>

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List