[Botan-devel] SHA512/RSA

Rickard Bondesson Rickard.Bondesson at iis.se
Fri Nov 28 05:20:10 EST 2008

Are there any known issues with SHA512/RSA signing?

My code is looking similar to this:

  EMSA *hashFunc = NULL_PTR;
  hashFunc = new EMSA3(new SHA_512);
  session->pkSigner = new PK_Signer(*signKey, &*hashFunc);
  session->pkSigner->update(pPart, ulPartLen);
  session->pkSigner->update(pPart2, ulPartLen2);
  SecureVector<byte> signResult = session->pkSigner->signature(*softHSM->rng);

The signature produced by PK_Signer is the same as the one produced by OpenSSL when used together with one of these functions:

  hashFunc = new EMSA3(new MD5);
  hashFunc = new EMSA3(new RIPEMD_160);
  hashFunc = new EMSA3(new SHA_160);
  hashFunc = new EMSA3(new SHA_256);
  hashFunc = new EMSA3(new SHA_384);

But the signature produced by SHA512/RSA is not the same as the one from OpenSSL.

Where could the problem be?

// 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/20081128/a626dd32/attachment.sig>

More information about the botan-devel mailing list