Rot13 Program.
Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Rot13 Program.

  1. #1
    Senior Member
    Join Date
    Nov 2001
    Location
    Ireland
    Posts
    735

    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! :)
       jethrojones@gmx.net
    */
    
    #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!

  2. #2
    Banned
    Join Date
    Oct 2001
    Posts
    1,462
    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.....

  3. #3
    Senior Member
    Join Date
    Nov 2001
    Location
    Ireland
    Posts
    735
    Just making sure that the desired effect was actually ROT13 and not some other crazy thing. Isn't it <camp>super</camp> ?

    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.....

  4. #4
    Banned
    Join Date
    Oct 2001
    Posts
    1,462
    <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

  5. #5
    Senior Member
    Join Date
    Nov 2001
    Location
    Ireland
    Posts
    735
    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!

  6. #6
    Senior Member
    Join Date
    Sep 2001
    Posts
    138
    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..
    http://www25.brinkster.com/cheeseball

    -- Do not dwell in the past, do not dream of the future, concentrate the mind on the present moment--

  7. #7
    Junior Member
    Join Date
    May 2002
    Posts
    2
    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

  8. #8
    Senior Member
    Join Date
    Oct 2001
    Location
    Helsinki, Finland
    Posts
    570
    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?-)
    Q: Why do computer scientists confuse Christmas and Halloween?
    A: Because Oct 31 = Dec 25

  9. #9
    Senior Member
    Join Date
    Nov 2001
    Location
    Ireland
    Posts
    735
    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?

  10. #10
    Junior Member
    Join Date
    May 2002
    Posts
    25

    Talking

    If it's uncrackable, then it can't be ROT13...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •