mIRC Homepage

Decyphering problem

Posted By: CyBot

Decyphering problem - 07/08/03 08:01 AM

Hey, i think i've got a deciphering problem:
Here's my code, it can work one way but i can't really figure out how to code it back to normal text:

alias password {
if ($2) {
set %e 1
while ($len($1) >= %e) {
set %d $calc(%d + $asc($mid($1,%e)))
inc %e 1
}
;sets a number based on the first word, the password
var %a 1
while (%a <= $len($2-)) {
set %>.blah %>.blah $+ $chr($calc($len($1) + %d + $asc($mid($2-,%a,1))))
inc %a 1
}
;sets %>.blah as a character based on: ' <length of password> + <ascii characters for password> + <the ascii character for the second word (chosen letter)> '
unset %e
unset %d
.timer -m 1 1 unset %>.blah
return %>.blah
}
}

Say i used $password(pass,text here)
it turns it into: /3/#-

So does anyone know how to get it back to text here? confused grin confused
Posted By: Raccoon

Re: Decyphering problem - 07/08/03 08:10 AM

This is really an ugly cipher, and unless you really need it for compatability, I would recommend using something else... blowfish encryption even.

From what I gleened of the cipher, it shouldn't be too hard to reverse, but the code looks 5 years old and really needs to be cleaned up. I could probably knock it down to 10 lines and make it 10x faster, but again is truely an ugly cipher.

Consider what you need it for, and what else is available out there. If all you need is a weak cipher, then consider ROT13. Using it will increase your popularity just by it's sheer coolness.

- Raccoon
Posted By: CyBot

Re: Decyphering problem - 07/08/03 08:15 AM

Uh, where would i be able to get these encrypters?
mircscripts.org ?
- edited from here -
I checked out that rot13 thing i think its not really that good because im trying to create something that needs a password so the computer user can store passwords and only needs 1 to access them, anyway, ill just do it myself another way :P
Posted By: Raccoon

Re: Decyphering problem - 07/08/03 08:30 AM

Strong Encryption -- Blowfish
There is a Blowfish DLL for mIRC, as well as a Script-only version as mentioned in this thread. However, the DLL is reportidly much faster.

Weak Cipher -- ROT13
ROT13 is simply short for rotate alphabet 13 places. It has been around since ancient times, first used by the romans or the greeks (i forget). I've written 5 or 6 scripts which encode/decode (same routine) ROT13 using various methods to see which is faster. You might try writing it for yourself just to hone your scripting skills.

ROT13 KEY:
ABCDEFGHIJKLMNOPQRSTUVWXYZ
NOPQRSTUVWXYZABCDEFGHIJKLM

I'm sure you can find many other ciphers and encryption schemes on any number of mIRC Scripting sites.

- Raccoon
Posted By: feud

Re: Decyphering problem - 07/08/03 02:17 PM

i think it was the greeks. something about rot13 makes me remember some teacher sometime telling me about (one of the) caesar's using it.
Posted By: MTec89

Re: Decyphering problem - 07/08/03 03:33 PM

i have a dll with ROT26 feature in it, if you want it pmsg me or i have a text encrypter with the dll on my site http://matrixn3t.net/mtec89/scripts.html
Posted By: Raccoon

Re: Decyphering problem - 07/08/03 04:00 PM

Quote:
i have a dll with ROT26 feature in it

You're too funny.
Posted By: feud

Re: Decyphering problem - 07/08/03 04:30 PM

<sarcasm>
rot26?! does that mean it's twice as secure as rot13? i should probably go download this dll, since doing rot13 is just too processor intensive without one.
</sarcasm>
Posted By: MTec89

Re: Decyphering problem - 07/08/03 06:04 PM

<sarcasm>
yeah it is twice as secure!!!
in fact! it is the most secure encryption EVER!!!!!!
</sarcasm>

shush man, it just moves the char over 26 instead of 13, and it only takes a small line to do it (in the script)
Posted By: Collective

Re: Decyphering problem - 07/08/03 06:05 PM

I sincerely hope you're joking..
Posted By: feud

Re: Decyphering problem - 07/08/03 06:07 PM

"it just moves the char over 26 instead of 13"
really? i had no idea.

"and it only takes a small line to do it (in the script)"
but if you're using a dll to do this, a) it doesn't matter how 'small' the line is, and b) you should try and script things before turning to dlls.

btw- who would ever make a dll for mirc to do rot26?
Posted By: MTec89

Re: Decyphering problem - 07/08/03 06:13 PM

an old friend of mine did it for me, with a many other features that i use in my scripts

as for the rest of your comments...shush
Posted By: Collective

Re: Decyphering problem - 07/08/03 06:14 PM

What is the point of ROT26? You just end up back where you started!
Posted By: MTec89

Re: Decyphering problem - 07/08/03 06:15 PM

it is just different man so leave it be
Posted By: Collective

Re: Decyphering problem - 07/08/03 06:20 PM

What's the point of it? You give it "secret text" and it gives you "secret text" back, complete waste of time.
Posted By: feud

Re: Decyphering problem - 07/08/03 06:21 PM

i hadn't even thought of that. that makes mtec89 that much funnier.
Posted By: MTec89

Re: Decyphering problem - 07/08/03 06:22 PM

whats the point of any encryption then? there is none, or thats how you make it sound
Posted By: feud

Re: Decyphering problem - 07/08/03 06:25 PM

no, no.. he's saying that if you used rot26 (haha, still can't get over how funny that is) to encrypt "hello", you would go 26 letters from 'h' to get... 'h'! the same for all the following letters. subsequently, 'hello' rot26'ed would be 'hello'.
Posted By: MTec89

Re: Decyphering problem - 07/08/03 06:27 PM

OMFG! YOU LAMER!!!!!!

IT USES ALL CHARECTERS OF THE FONT, NOT JUST LETTERS!!!!!



LAMERRRRR!
Posted By: Collective

Re: Decyphering problem - 07/08/03 06:29 PM

"ROT13 is simply short for rotate alphabet 13 places."

Since ROT13 is rotate alphabet 13 times, and ROT(N) is generally assumed to mean rotate alphabet N times, then it is logical to assume that ROT26 means rotate by alphabet 26 times, not font you sodding idiot.

He isn't a lamer because you don't know what ROT is.
Posted By: MTec89

Re: Decyphering problem - 07/08/03 06:31 PM

why the [censored] would you think someone would actually waste time to make somthing that did nothing????????

you people need to think differently
Posted By: Collective

Re: Decyphering problem - 07/08/03 06:33 PM

Well when most of what you post is a complete load of s[/b]hite why should we assume that you have actually posted something intelligent? (You didn't, you still misused the term ROT)

If you're gonna say ROT means "rotate by font" then you may aswell say lol means lots of lesbians or something equally stupid.
Posted By: MTec89

Re: Decyphering problem - 07/08/03 06:37 PM

lol doesnt mean lots of lesbians? wow i am so confused now..i thought it did
Code:
{{:{F::{:}:}:F:|::~:{F::::LP:}{
Posted By: KingTomato

Re: Decyphering problem - 07/08/03 07:51 PM

Quote:

anyways whatever, its a custom encryption then, but it dont matter, it still shifts 26 chars

(To all those who didnt want to spend the 0.4 minute(s) making an alias to decipher what it took a dll to do...)

Actually from what i gather the ROT13 shifts the letters 13 positions, not incriments the ascii value..

ABCDEFGHIJKLMNOPQRSTUVWXYZ
Would then be
NOPQRSTUVWXYZABCDEFGHIJKLM
and not
NOPQRSTUVWXYZ[\]^_`abcdefg

as your intended DLL would have given us..
Posted By: Rich

Re: Decyphering problem - 07/08/03 09:11 PM

I was the romans actually, the caesars were romans (like Iulius Caesar)
Posted By: codemastr

Re: Decyphering problem - 07/08/03 09:32 PM

Quote:
i think it was the greeks. something about rot13 makes me remember some teacher sometime telling me about (one of the) caesar's using it.


Umm Caesar wasn't Greek, he was Roman. The ROT13 is one variation of the Caesar Cipher which Julius Caesar used to communicate with his military. It is generally regarded as the first encryption method ever used, although it is also regarded as so simplistic that even a child could crack it.
Posted By: feud

Re: Decyphering problem - 08/08/03 12:58 AM

doh!
Posted By: Raccoon

Re: Decyphering problem - 08/08/03 02:19 AM

I intend to teach my children (if I ever get someone pregnant) how to read and write ROT13 natively without looking at a key.

I wonder if there are certain export restrictions on people with that ability. :tongue:
Posted By: Hammer

Re: Decyphering problem - 08/08/03 03:58 AM

Only in Ancient Rome, specifically against the Germanic/Gaelic tribes in the hinterlands - especially those pesky druids and Picts. If you're not druidic or Pictish (or anything at all that resembles Gaelic), you should be fine.
© 2022 mIRC Discussion Forums