Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Let's have an encryption CHALLENGE!
#41
So what you mean is that you make up a different key each time, right? What's to stop the computer doing the same?
Reply
#42
Here's something i come up with... when i wasn't sober....


DECLARE FUNCTION Rotate$ (Text$)
DECLARE FUNCTION Cipher$ (Text$, Key$)

CLS

NormalString$ = "I Can't Goto Sleep The Clowns Will Eat Me"
Key$ = "QbAsIcNeWs..."

CipherdText$ = Cipher$(NormalString$, Key$)
DeCipherd$ = Cipher$(CipherdText$, Key$)

PRINT "Orignal- "; NormalString$
PRINT "Cipherd- "; CipherdText$
PRINT "DeCipherd-> "; DeCipherd$

PRINT STRING$(80, "-")

PRINT "Orginal Len-"; LEN(NormalString$)
PRINT "Cipherd Len-"; LEN(CipherdText$)
PRINT "DeCipherd Len->"; LEN(DeCipherd$)

SYSTEM

DEFINT A-Z
FUNCTION Cipher$ (Text$, Key$)

DIM L AS LONG
DIM D AS LONG
DIM X AS LONG

X& = 1

OldKey$ = Key$

FOR I = 1 TO LEN(Text$)

Key.I = Key.I + 1
IF Key.I > LEN(Key$) THEN Key.I = 1

C = (ASC(MID$(Text$, I, 1)) XOR (ASC(MID$(Key$, Key.I, 1)) * I)) AND 255
Enc$ = Enc$ + CHR$©

L = L + 7
D = D + 4
X = ((X + (SQR((X XOR (D MOD X))) * (64 + (L * D) - I))) AND 4095) XOR I

IF X Mod (L + D) < I THEN Key$ = Rotate$(Key$)

NEXT

Key$ = OldKey$

Cipher$ = Enc$

END FUNCTION

FUNCTION Rotate$ (Text$)

N$ = SPACE$(LEN(Text$))

FOR I = 2 TO LEN(Text$)

MID$(N$, I - 1) = MID$(Text$, I, 1)

NEXT

MID$(N$, LEN(N$)) = MID$(Text$, 1, 1)

Rotate$ = N$

END FUNCTION
very F***ing song remains the same
To everyone who sucks-up for the fame
Out of strength you know we speak the truth
Every trend that dies is living proof

MasterMinds Software
Reply
#43
one and a half weeks, since i'll be disappearing for a while..
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#44
Excellent, there's been a lot of interest, hasn't there. But I thought this thread had died... so it's good.
Reply
#45
Yes i know it's been 6 days since the last post and that this thread is most likely dead but i have a very bad encryption program. and i want to post it

Code:
CLS
INPUT text$
x$ = " ~!@#$%^&*()_+{}|:<>?`-=[]\;',./1234567890qetuoadgjlxvnwryipsfhkzcbmMBCZKHFSPIYRWNVXLJGDAOUTEQ"
x2$ = "QETUOADGJLXVNWRYIPSFHKZCBMmbczkhfspiyrwnvxljgdaouteq0987654321/.,';\][=-`?><:|}{+_)(*&^%$#@!~"
FOR i = 1 TO LEN(text$)
tmp = INSTR(x$, MID$(text$, i, 1))
IF tmp <> 0 THEN
  tmp2$ = MID$(x2$, tmp, 1)
  f$ = f$ + tmp2$
END IF
NEXT
PRINT f$

Yes very simple. but if you are dumb it may take you a minute or two to figure it out. j/k. :wink:
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#46
Out of interest, is anyone collecting an archive of these programs, because I'll happily do it for QBNZ (I have a whopping 30+ files to add, which have been made available to me in the space of one week!)

If I don't hear anything by tomorrow I'll do it anyway, but of course you have the right to request that it disappears from QBNZ at any time.
Reply
#47
without any effort, I can declare Mango the winner (surely a no-brainer?), and everyone else ties second place. Smile
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#48
YEah 2nd place!!!!!
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#49
Why complicate things, you can't break any decryption without the key no matter what. So an XOR cryption will do fine for most things. And it's small too.

Code:
defint a-z
function xorEncrypt$ ( src as string, ekey as string )
    dim i as integer
    dim dst as string
    dim keyLen as integer    
    
    keyLen = len( ekey )
    
    for  i = 1 to len ( src )
        dst = dst + chr$( asc(mid$( src, i, 1 )) xor _
                          asc(mid$( ekey, i mod keyLen + 1, 1 )) )
    next i
    
    xorEncrypt$ = dst    
    
end function


defint a-z
function xorDecrypt$ ( src as string, ekey as string )
    dim i as integer
    dim dst as string
    dim keyLen as integer    
    
    keyLen = len( ekey )
    
    for  i = 1 to len ( src )
        dst = dst + chr$( asc(mid$( src, i, 1 )) xor _
                          asc(mid$( ekey, i mod keyLen + 1, 1 )) )
    next i
    
    xorDecrypt$ = dst    
    
end function
oship me and i will give you lots of guurrls and beeea
Reply
#50
Quote:Why complicate things, you can't break any decryption without the key no matter what. So an XOR cryption will do fine for most things. And it's small too.
Incorrect. I broke the first encryption technique using english language letter frequency.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)