Good idea about the max and min values. Yes, urandom is os.urandom. s2num('blah') will convert the phrase blah to ascii, and treat them as if they were a big function.
Anyone else whose still interested, I found another small bug, but it was in the modular (Again). It won't do much, but... I did test out the RSA from end to end, found another small bug (I imputed the text luke, and it decrypted to ekul), but it works good now. Hopefully there's nothing left gaping, thanks for the help! -- http://mail.python.org/mailman/listinfo/python-list