Dr. Weihrauch, It is possible to run javascript from within PHP using the official extension called V8js. This isn't elegant, however.
> http://php.net/manual/en/book.v8js.php $v8 = new V8Js(); $invocation = "javascript code invoking the functions you need"; $result = $v8->executeString(file_get_contents('openpgp.js' . $invocation)); Xun Yuan On Tue, Jul 9, 2013 at 10:01 AM, Dr. M. Weihrauch <[email protected]>wrote: > Probably, but I actually wanted to write a software that is used by many > people. Thus, PHP would be nicer :) > > Am 09.07.2013 16:27, schrieb Souvik Banerjee: > > Would it be possible to use Node.js and openpgp.js on the server side? > On Jul 9, 2013 5:29 AM, "Dr. M. Weihrauch" <[email protected]> wrote: > >> 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 >> > > > _______________________________________________ > http://openpgpjs.org > > > > -- > --------------------------------- > Priv.-Doz. Dr. med. Martin Weihrauch > Facharzt für Innere Medizin, > Hämatologie und intern. OnkologieVSCO.NET > Elsternweg 6 > 50997 Köln > GERMANY > Tel: 02233-6278658 > Fax: 02233-6278659 > Mob: [email protected] > > > _______________________________________________ > > http://openpgpjs.org > >
_______________________________________________ http://openpgpjs.org

