Reputation: 61
I'm using OpenSSL for registration stuff and I need to generate a license key from my server using RSA. The problem is that SSCrypto and PHP generate different digests. I tried everything. I'm very desperate. I Googled a lot. Spent more than 3 hours trying to solve it, but nothing seems to solve the problem. Could anyone please help me?
Thanks
Upvotes: 0
Views: 265
Reputation:
You should try posting a sample digest generated by SSCrypto and by PHP. My guess would be that the digests are compatible with one another - that SSCrypto can verify digests created by PHP and vice versa - and that you're just not understanding how a PKCS#1 compliant digest works. See, for example, this:
http://www.frostjedi.com/phpbb/viewtopic.php?p=120212#p120212
Also, I'd recommend using phpseclib, a pure PHP RSA implementation. It's easier to get support for, it supports naked RSA public keys (eg. RSA keys not encapsulated by a X.509 cert), is easier to use, etc.
Upvotes: 1