in reply to RSA encryption on Win32

More information...
There is no error message.
I do have Bigint.pl
Expanded Perl code is available at http://cypherspace.org/~adam/rsa/story.html
I'm following a tutorial from http://www.webreference.com/perl/tutorial/16/
My encryption key is: 3353bc7
My decryption key is: 1c07e37
N is 6537b15
My dos commands look like this: perl rsa.pl -k=3353bc7 -n=6537b15 < text.txt > text.out
perl rsa.pl -d -k=1c07e37 -n=6537b15 < text.out
The decrypted message should print to the screen.
I got these keys off the tutorial b/c I didn't want to compile a key generator on win32. Are the keys incorrect?
I don't think so.

Replies are listed 'Best First'.
(tye)Re2: RSA encryption on Win32
by tye (Sage) on Feb 28, 2001 at 01:40 UTC

    Well, the usage you describe doesn't match the code. Try:

    perl rsa.pl 3353bc7 6537b15 <text.out >text.enc perl rsa.pl -d 1c07e37 6537b15 <text.enc >text.dec

    Not that I think that will work (that is mostly what I tried), but at least it matches what the code appears to want. I've watched it go through its calculations and they appear to make sense.

    Of course there are no error messages, there is no error checking. O-: There must be a "real" (as opposed to "cute") Perl-only implementation of RSA floating around (I only looked briefly).

            - tye (but my friends call me "Tye")
      Actually this isn't going to work, because rsa.pl relies on perl being executed with the -s switch, so if you execute the script like this perl never gets the -s switch. Either do
      % perl -s rsa.pl ...
      Or make rsa.pl executable and run it like
      % ./rsa.pl ...
      BTW, w/r/t to a "real" implementation of RSA: I think this'd be a great thing and I know that I've not really found much, so I think I'm going to do some work on this.
        Question Answered
        The problem was the -s switch. Thanks very much.
      Re: Perl-only implementation of RSA: take a look at this node, just written.