So I'm trying to use a JS bignum library, despite not knowing JS. That's probably my first mistake. I'm using JSBN which is allegedly in Google's JS benchmark.
I've narrowed it down to a single line not working. Unfortunately, it's the only line that I actually need the JavaScript for. I've checked and rechecked the library, and the method I should want is .modPowInt(). As in base.modPowInt(exponent,modulus). The base, exponent, and modulus are all properly defined bignums, and I can use the other methods defined in the library on them fine. There's a demo on their site that uses .modPowInt() exactly the way I am, and it's working there, in the same browser, with the same loaded scripts.
The line is, exactly, no more or less than:
var ret = base.modPowInt(exp, mod);
... base, exp, and mod are all perfectly fine bignums, that other bignum functions from the same library work on.
But if I try to use it, the script goes from working to failing silently. I've tried everything I can think of.
If I get any more frustrated, I might start pulling out my hair.
