-
Rot13 Program.
Recently I found a XOR encryption program. Upon deciding that XOR sucks, I decided to adapt it to the almighty ROT13! :) Well, I'm pretty sure my program complies to the ROT13 rule and I was wondering if any of you dudes would check it out for me and see if it is.
Here's the source code and attached is a zip file with the source code and the actual program itself (compiled)
Code:
/* ROT13 by Jethro
1337 3ncrypt10n! :)
[email protected]
*/
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
int count;
FILE *in,*out;
if(argc < 3) {
printf("ROT13 by Jethro\n");
printf("Usage: rot13 <source file> <destination file>");
return 0;
}
in = fopen(argv[1], "rb");
out = fopen(argv[2], "wb");
while(( count = getc(in)) != EOF)
{
count = count ^ 13;
putc(count, out);
}
return 0;
}
Thanks!
-
Eht,-Cdnh-hcnt}ydbc!-`ltoh-D-~ebxai-`lfh-bch-bk-`t-bzc-~b-yeh-il`c-jb{*cy-nlcy-hli-`t-h`lda~#####-Leee!-Yehti-nlnf-dy-dc-lobxy-elak-l-~hnbci-lctzlt-7]
Hmmm, Do you have a decoder? Or do I just use the same program backwards.....
-
Just making sure that the desired effect was actually ROT13 and not some other crazy thing. Isn't it <camp>super</camp> :)?
Quote:
Originally posted here by ac1dsp3ctrum
Eht,-Cdnh-hcnt}ydbc!-`ltoh-D-~ebxai-`lfh-bch-bk-`t-bzc-~b-yeh-il`c-jb{*cy-nlcy-hli-`t-h`lda~#####-Leee!-Yehti-nlnf-dy-dc-lobxy-elak-l-~hnbci-lctzlt-7]
Hmmm, Do you have a decoder? Or do I just use the same program backwards.....
-
<advertisement>
And YOU can have this guaranteed uncrackable* encryption for only 3 easy payments of 500million $
* Not a guarantee
</advertisement>
/me hands jethro the advert whore trophy :D
-
Well, I don't wanna be excused of somehow over-selling my program, but if the Nazis had used ROT13 instead of the Enigma yolk, you'd all be singing a different anthem! It's uncrackable!
-
I thought ROT13 was taking a number of the alphabet (1=a 2=b.....ie). adding 13 to the number mod 26? Thus XORing the letter by 13 is not ROT13, also XORing the value by 13 is EXTREMELY breakable..:) And the answer to someone's question is that this program applied on a ciphertext will result in the plaintext..:)
-
I also think, that rot13 in a computer context is simply adding 13 to the ASCII code of a letter and being careful that you roll over when the value crosses the upper boundry (i.e. 122 dec / 90 dec, excluding numbers).
have fun!
shr1k3
-
Heey, you have forgotten the most obvious tester thingie... AntiOnline's own! http://www.antionline.com/tools-and-toys/encrypt-text/
If ac1dsp3ctrum got his strange series of characters out of your prog, I think it doesn't work, because that's
Rug,-Pqau-upag}lqop!-`ygbu-Q-~roknv-`ysu-opu-ox-`g-omp-~o-lru-vy`p-wo{*pl-aypl-uyv-`g-u`yqn~#####-Yrrr!-Lrugv-ayas-ql-qp-ybokl-rynx-y-~uaopv-ypgmyg-7]
if encrypted. I assume ac1dsp3ctrum gave it some smart input?-)
-
Hmm, so whatever the program does, it isn't ROT13. Maybe I have stumbled across the most advanced algorhythm... :). Are you sure that it isn't ROT13?
-
If it's uncrackable, then it can't be ROT13...
-
Okay fine, maybe ROT13 isn't the best encryption method around...
But... it still kicks ass, IMHO! :)
-
Code:
/* ROT13 by Jethro
1337 3ncrypt10n!
[email protected]
*/
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
int count;
FILE *in,*out;
if(argc < 3) {
printf("ROT13 by Jethro\n");
printf("Usage: rot13 <source file> <destination file>");
return 0;
}
in = fopen(argv[1], "rb");
out = fopen(argv[2], "wb");
while(( count = getc(in)) != EOF)
{
count = count ^ 13;
putc(count, out);
}
return 0;
}
To the comments this is unbreakable? They are VERY false....this is extremely breakable. Anyone with the program would know that you are xoring each value in the plaintext by 13 or 1101 binary. Since all ASCII letters can be shown by FFh in hex for 1111 1111b in binary, and lets say you have an ASCII message of "the dog" it comes out to a stream of binary looking like this:
Code:
t= 01110100
h=01101000
e=01100101
=00100000
d=01100100
o=01101111
g=01100111
These are just the ASCII values for the words "the dog" including the space. Now, lets see what the program is doing to them?
Code:
01110100 01101000 01100101 00100000 01100100 01101111 01100111 'is the message
00001101 00001101 00001101 00001101 00001101 00001101 00001101 'is the 'key'
01111001 01100101 01101000 00101101 01101001 01100010 01101010 'is our ciphertext (actually a binary stream)
Now for *why* this program is vurnerable, we are going to analyze the ciphertext and "leak" information about the plaintext without knowing anything.....
Code:
01111001 01100101 01101000 00101101 'first part of the messge ("the<space>')
01101001 01100010 01101010 00000000 'second part of message ("dog")
00010000 00000111 00000010 00101101 'a REALLY messed up message but the key is now negated...:)
01110100 01101000 01100101 'is the word "the" xoring the previous value...
01100100 01101111 01100111 'we now have the word dog, as output....
basically what we did was, since we know the key is repeated (or at least are guessing it to be repeated, we simply took half the message, xored it by the other half (in this case negating the keys effect on it) then we line thethethethethethethe up at different offsets along the new ciphertext, and it will leak information from the ciphertext, allowing us to find the key if we take the ciphertext and xor the leaked data out of it. Just thought I would bring this up, as your program is SEVERELY flawed...:)
-
Quote:
Originally posted here by shr1k3
I also think, that rot13 in a computer context is simply adding 13 to the ASCII code of a letter and being careful that you roll over when the value crosses the upper boundry (i.e. 122 dec / 90 dec, excluding numbers).
have fun!
shr1k3
Ok i'm a bit confused here. You say "adding 13"; adding exactly 13 of what?
ROT13 is short for ROTate 13 characters.
So A would become M yes?
[Edit]
Here's the source to a ROT13 program.
-
you would be correct, it was used (and still used) to post offensive material to newsgroups.....:) It is by no means supposed to be secure...:) Although what is posted here is just as breakable, it is not ROT13...
-
Well I thought everybody was going to "get it" but I was actually joking. I just wanted to show my lovely program :). When I said that ROT13 was uncrackable, well that would be a kind of stupid statement to make! :rofl:
Cheeseball: You're absolutely right!
-
Sorry...I am too serious sometimes....:p Also BTW....I am still playing with it....but on my page under the projects there is an implementation of a onetime pad (currently statically done because I have not started checking the filesize or stuff like that), but it technically is secure.......(it also causes dataloss in the version I wrote, ahhh...buggy!) :) anyway......
-
Quote:
Originally posted here by jethro
Well, I don't wanna be excused of somehow over-selling my program, but if the Nazis had used ROT13 instead of the Enigma yolk, you'd all be singing a different anthem! It's uncrackable!
*quiet laugh* :D good one ::ha-sign: *quiet chuckle* hehe
-
I think if you exchange count ^ 13 to count ^ *argv[3] in my wee program, you will get XOR.