[Botan-devel] Botan 64-bit on Solaris

Rickard Bondesson Rickard.Bondesson at iis.se
Mon Dec 22 10:25:07 EST 2008

> I can not figure out why I am getting a segmentation fault 
> when creating a RSA private key. Everything is ok in 32-bit 
> mode, but with 64-bit it segfaults.
> Another strange thing is that the 32-bit does not throw an 
> error, but the 64-bit wants to throw an error but segfaults 
> in the exception handling mechanism. The code is the same 
> except for the "-m64"-flag when compiling.
> Any suggestions on where to look?
> The 64-bit exception handling might be faulty?
> But why are not an exception thrown in 32-bit mode?
> The prime1, prime2, pubExp, privExp, and modulus are stored 
> and loaded from the database.
> The BigInts are created with BigInt(const byte buf[], u32bit 
> length, Base base=Binary) And stored with the aid of the 
> command: binary_encode(byte buf[]) Using the AutoSeeded_RNG 
> *rng = new AutoSeeded_RNG() to verify the key.

Another strange thing is that prime1 (p) and prime2 (q) have a length of 48 bytes in 32-bit mode.
But in 64-bit mode they are 32 bytes in length.
If I generate a 768-bit RSA key, shouldn't p and q have a length of 48 bytes?

// Rickard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 475 bytes
Desc: not available
URL: <http://lists.randombit.net/pipermail/botan-devel/attachments/20081222/2363c419/attachment.sig>

More information about the botan-devel mailing list