In my last post I wrote that the private key was encrypted with CAST5,
this was a mistake, the message was encrypted with CAST5 (with
Kleopatra). This is the original answer of the programmer of the
PHP-library:

"Once I do that for your example, however, it still doesn't work because
your message is encrypted with CAST5.  The library currently only
supports 3DES and AES, because that is what phpseclib supports. "

----------------------------------------------------------


I have a question:

I would like to encrypt messages with openpgp.js on the client side and
decrypt them with PHP on the server side. However, I have a
Windows-server, where the installation of the GnuPG-library for PHP
seems a little more complicated than on Linux-servers.

After searching the web, I found a "full" PHP-implementation of PGP here:

https://github.com/bendiken/openpgp-php/blob/master/lib/openpgp_crypt_rsa.php

But the problem is that it does not support CAST-enrypted private keys,
which poses a problem: I used standard Windows PGP to generate a
public/private keypair, then I included the private ASCII-armored key in
the PHP-script and it was not able to decrypt the CAST-encrypted private
key to finally decrypt my message. The author of the software told me
that the Crypt/Math-library for PHP he is using does not support CAST
and therefore he had not implemented that functionality.

Do you have a suggestion for a PHP-solution, which would be independent
of an installed gpg?

Thanks

Martin

PS: I hope I didn't mix up PHP and PGP ;)
_______________________________________________

http://openpgpjs.org

Reply via email to