Discussion:
RSA Decryption using public key possible ?
Michael
2008-10-08 15:41:13 UTC
Permalink
Hi,

I'm trying to code an client for an existing server, the server
receives RSA public key encrypted requests, then replies with a
message encrypted using the private key,
so the client will need to decrypt using the public key.

Ideally, I'd like to do something like:

Integer pubKey(" <INTEGER MODULUS> " );
Integer e(" <INTEGER EXPONENT> " );

CryptoPP::AutoSeededRandomPool rng;
RSAES_PKCS1v15_Decryptor decryptor;

decryptor.AccessKey().Initialize(pubKey, e);
decryptor.Decrypt (rng, CipherText, CipherTextLen, (byte *)plainText);


I know public key decryption isn't normal practice, but is there any
way of doing this using Crypto++ ?

Regards,
Michael.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-***@googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---
Gung Shi Jie
2008-10-09 09:19:53 UTC
Permalink
http://www.openssl.org/docs/crypto/rsa.html#

Maybe you could try openSSL.

This is a FAQ
The cryptopp guys would tell you this is not possible and does not
make sense.
Hi,
I'm trying to code an client for an existing server,  the server
receives RSA public key encrypted requests, then replies with a
message encrypted using the private key,
so the client will need to decrypt using the public key.
Integer pubKey(" <INTEGER MODULUS> " );
Integer e(" <INTEGER EXPONENT> " );
CryptoPP::AutoSeededRandomPool rng;
RSAES_PKCS1v15_Decryptor decryptor;
decryptor.AccessKey().Initialize(pubKey, e);
decryptor.Decrypt (rng, CipherText, CipherTextLen, (byte *)plainText);
I know public key decryption isn't normal practice, but is there any
way of doing this using Crypto++ ?
Regards,
Michael.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-***@googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---
Michael
2008-10-13 11:43:23 UTC
Permalink
Post by Gung Shi Jie
http://www.openssl.org/docs/crypto/rsa.html#
Maybe you could try openSSL.
This is a FAQ
The cryptopp guys would tell you this is not possible and does not
make sense.
Thanks for everyones advice, as it seems that cryptopp is unable to
decrypt using the public key, I've switched to using openSSL and have
managed to successfully decrypt data using the public key.





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-***@googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---

zooko
2008-10-09 12:53:41 UTC
Permalink
Post by Michael
I'm trying to code an client for an existing server, the server
receives RSA public key encrypted requests, then replies with a
message encrypted using the private key,
so the client will need to decrypt using the public key.
That's impossible and it doesn't make sense.

Okay, more seriously: I don't know how to do it with Crypto++, and
it... Well, I have to say that it doesn't make sense. It is
probably not achieving the security properties that it is intended to
achieve (although I don't know what those are).

Regards,

Zooko
---
http://allmydata.org -- Tahoe, the Least-Authority Filesystem
http://allmydata.com -- back up all your files for $5/month

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-***@googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---
Continue reading on narkive:
Loading...