Using RSA with bigger exponent


Dec 16, 2010 06:47
Johnny You

Hi,
I'm trying to use PolarSSL RSA to verify a data by RSA-2048. The problem is our exponent is not 3 or 65537, we are using 2379907207 as our exponent. Whenever I input this exponent, the verification will be failed. sign and encryption also produce incorrect result.
Is there any ways to use PolarSSL with this exponent value?

Thank you
 
Dec 16, 2010 12:36
Paul Bakker

Hi Johnie,

Can you provide a sample that shows the non-working code?

Otherwise it's hard to guess what's going wrong.
 
Dec 17, 2010 02:07
Johnny You

Hi,

Please follow this link:

https://docs.google.com/leaf?id=0B1d981feZey-YWI4YzkwZjMtNjBiNS00MGZkLTgzY2QtYzg0ZDdmZTE2NDhi&hl=en

The program will successfully generate a signed data, but the data is wrong (I have a test data from my friend which signed by OpenSSL). And the verification process will fail as well.

Thank you
 
Dec 17, 2010 13:53
Paul Bakker

Hi Johnie,

It seems we are at discussion about your QP!

If I calculate QP and set it at:
#define RSA_QP "5E0B5FF20F74EEFC09C2F64B57B601BE2FCB68C3B93AA4761F05D7507DFBB86A473BD08F0FF2240BB30BA6B46650DBE521C611BBE6D644457BF89A1C50C3D4012F7093D54E58BBEA88B439C6C0EBBEF70A1076F0EEB706048A423F5E41C7784AD0D038FFF4874581F30577D436C28883ADE953684C2B7A8322FAA439CA3F2432"

It verifies.

Please check this out.

Best regards,
Paul
 
Dec 20, 2010 02:18
Johnny You

Hi Paul,

Yes, it works.

Thank you!