News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Harry Fuecks' Blog:
Using OpenSSL, RSA and RC4 to exchange encrypted data from PHP to Java
October 30, 2007 @ 11:14:00

Harry Fuecks came across a need in his development work to bridge a gap between a PHP script and some Java work he'd done. He found the way that fit his situation the best - the encryption of the data on the PHP side via OpenSSL.

Needed a mechanism to be able to pass chunks of data securely from PHP to Java [...] One solution might be something "from scratch" involving mcrypt or PHP libraries like Crypt_RSA. [...] Another approach is GnuPG, either via the command line as discussed in this tutorial or via the GnuPG extension from PECL.

Option 3 is using OpenSSL and PHP's openssl_seal() function. SSL is normally used for encrypting networked communication between peers but that's not all it can do. [...] What's more - and perhaps the biggest win - it also allows us to re-use existing SSL certificates.

He uses the openssl_seal functionality on top of the EVP encrypted envelope on the certificate to handle the encrypt/decrypt of the data. Both the PHP code and Java code (and execution example) are included in the post.

0 comments voice your opinion now!
rsa openssl rc4 encrypt decrypt java exchange data rsa openssl rc4 encrypt decrypt java exchange data


blog comments powered by Disqus

Similar Posts

PHPBuilder.com: Write an Ajax-driven Login Application in PHP Using SSL/TLS

Community News: GotAPI.com - A Gateway to Manuals

DZone.com: And now instead, 5 things Java envies PHP for

Ivo Jansch's Blog: System.out.print in PHP

Jonathan Snook's Blog: CakePHP: Setting Default Values


Community Events





Don't see your event here?
Let us know!


configure unittest language testing install developer library wordpress release threedevsandamaybe code api laravel introduction podcast application series list community interview

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework