[Botan-devel] using botan with a javascript crypto library

Jack Lloyd lloyd at randombit.net
Wed Jul 7 08:02:06 EDT 2010

On Tue, Jul 06, 2010 at 07:33:29PM -0400, jonny ram wrote:
> Haven't had any luck yet as far as getting Botan keys to work. I even hashed
> them on both sides to make sure it's not just an issue with the way JCT
> decodes base 64 or something, but the hashes are identical. If you have any
> time, I've attached a simple test script with the private keys I generated
> included, and it lets you choose which key to use. The botan key was
> generated with the method you suggested (and it will lock up your browser or
> tab if you choose it). I appreciate any help.

I'll take a look at this later today if I have time, but this really
sounds like an issue with JCT.

> > Instead of get_d(), give it the result of (get_p()-1)*(get_q()-1)
> > as the private key.

I made a mistake here: the private key for JCT should be:
   inverse_mod(key.get_e(), (key.get_p()-1)*(key.get_q()-1));

inverse_mod is declared in numthry.h


More information about the botan-devel mailing list