Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: FrOzeN on June 22, 2006, 01:28 AM

Title: Encryption / Decryption Program
Post by: FrOzeN on June 22, 2006, 01:28 AM
I was bored the other day mucking around with the For loop making words, and I ended up with this after awhile.

http://www.clananthrax.net/vb6/Encrypter.zip

It works fine for encrypting/decrypting strings, though, it's not very practical nor efficient. I just wrote it out of boredom. Though it may be interesting to look over. Also after playing around with it '346' seems to be a relatively good 'x' value to use.

Thoughts..?
Title: Re: Encryption / Decryption Program
Post by: rabbit on June 22, 2006, 02:18 PM
    For t = 6 To -52 Step -4
        a = 51 Or (10 Mod t)
        For p = &O321 To 9 Step -1
            b = (a Mod 30) / p Xor t
            For y = 3 To 111 Step 9
                d = (b Mod a + &HF / t) ^ p
                For r = t To 17 Step 2
                    f = ((c * b Xor (12 * a)) Mod 4) + 16
                    For c = 24 To 76 Step 4
                        g = (2 ^ t + a - 6 Xor p) + (d + (2 / b - y))
                        For n = 1 To y Step (k + 1)
                            h = c Xor (g * 2 / d Mod 5)
                            For e = 1 To 27 Step 3
                                i = ((f - 2) * t) Xor 9 + (73 / p) - c
                                j = j + 1
                                If (j Mod x) = 0 Then GoTo P2
                                DoEvents
    Next e, n, c, r, y, p, t
Disgusting.  It gives numbers, which make it easy to crack.  ie:
1.53846153846154E-02
!Q
43.1666666666667E4
3.5E4
3.5

There's 4 numbers, and two characters.  Not to mention it's expansion is huge.  3 letters with a key of 1 gives a 48 character string.  1->16 is harsh.  I tried a 57 character input with a key of 1, and the output is 828, which is roughly 1->15.  I tried a longer one, specifically 2391 characters, again, key of 1, and it yields 1->14.

If you want better encryption, take a look into key ciphers in the form of aP + b mod N or matrix systems, they are much more efficient.
Title: Re: Encryption / Decryption Program
Post by: Joe[x86] on June 25, 2006, 08:04 PM
I wrote this (http://www.x86labs.org:81/forum/index.php/topic,6406.msg76969.html#new) a few days ago in Java. Yes, shoot me. Java.

QuoteI think this one is actually secure, because as far as I can see, it's impossible to decrypt it without the key, and you can't guess the next byte of the message without knowing the one before it.
Title: Re: Encryption / Decryption Program
Post by: rabbit on June 26, 2006, 07:18 AM
It can be broken, quite easily, in fact.  As long as you have the last byte of the key, it's really simple.  If you don't have any of the key at all, it will take some time, but can still be pretty easily broken.
Title: Re: Encryption / Decryption Program
Post by: TheMinistered on July 27, 2006, 01:00 PM
Thats a pretty poor encryption design.  You should study other algorithms such as TEA, BLOWFISH, AES, etc
Title: Re: Encryption / Decryption Program
Post by: ShadowDancer on July 27, 2006, 06:31 PM
It depends of to who are u trying to hide data... but surelly TEA, BLOWFISH, AES are not good to hide things to the NSA ^^

Shadow.
Title: Re: Encryption / Decryption Program
Post by: FrOzeN on July 29, 2006, 06:14 AM
At the moment, I really have no interest in encryption/decryption whatsoever. I pretty much just made this for a nifty looking "Next e, t, c.." statement. :P
Title: Re: Encryption / Decryption Program
Post by: HardCoded. on August 28, 2006, 08:38 PM
>< anything is crackable as long as you have the right pattern