in reply to modular exponentiation with arbitrary precision binary numbers (did I say RSA?)

Two questions:
  1. why do you use local rather than my?
  2. why do you do all of this as string operators rather than the binary operators perl has?
Update: I answered #2 myself when I looked again and saw "Arbitrary length" in the comments. #1 I'm still curious about
  • Comment on Re: modular exponentiation with arbitrary precision binary numbers (did I say RSA?)

Replies are listed 'Best First'.
(tye)Re: modular exponentiation with arbitrary precision binary numbers (did I say RSA?)
by tye (Sage) on Dec 01, 2000 at 00:38 UTC

    Note that Perl supports binary operations on "arbitrary length" strings so this could be done using real bits instead of '0' and '1' chars. Of course, some logic would have to be reworked since you can't append one bit to a string.

            - tye (but my friends call me "Tye")
      Yes... But actually my target lanaguage for this is javascript. Javascript doesn't support arbitrary length binary operations.

      But with this little diddly one can potentially do browser based public key crypto without needing SSL, eg to transmit credit cards, who knows what else...

      j

      Let's see... Can you add binary strings? Multiply them? Modulo them? ... What can you do with them? Oh, I know, AND and XOR and NOT... funny, I don't remember using any of those in my code... Oh well... Ok, so maybe you could rewrite badd and bsub to do those...

        Sorry, I meant "bitwise logical operations" but wrote "binary operations". And rewriting badd, bsub, and bmod to use these and work with bits instead of working with the characters '0' and '1' is all that I was talking about.

                - tye (but my friends call me "Tye")
Re: Re: modular exponentiation with arbitrary precision binary numbers (did I say RSA?)
by jhanna (Scribe) on Dec 01, 2000 at 01:26 UTC
    1) I use local because (call me a fool) I'm still running perl 4 (yes FOUR) on my windoze box. I've tried to quit... Really I have... And I know I can quit any time I want. I can. I Really Can. So just LEAVE ME ALONE!