note 118466 added to function.openssl-public-encrypt

From: Date: Fri, 11 Dec 2015 00:00:30 +0000
Subject: note 118466 added to function.openssl-public-encrypt
Groups: php.notes 
Request: Send a blank email to php-notes+get-204325@lists.php.net to get a copy of this message
We can't guarantee that RSA will still be trusted for security in 2016, but this is the current best practice for RSA. The rest of the world is moving on to ECDH and EdDSA (e.g. Ed25519). That said, make sure you are using OPENSSL_PKCS1_OAEP_PADDING or else you're vulnerable to a chosen-ciphertext attack (Google: "Daniel Bleichenbacher 1998 RSA padding oracle" and you'll find plenty of material on it.) The only fix is to use OAEP (preferably with MGF1-SHA256, but this function doesn't let you specify that detail and defaults to MGF1+SHA1). Phpseclib offers RSAES-OAEP + MGF1-SHA256 for encryption and RSASS-PSS + MGF1-SHA256 for signatures. http://phpseclib.sourceforge.net/rsa/examples.html#encrypt,enc1 If you don't want to hassle with these details yourself, check out https://github.com/paragonie/EasyRSA ---- Server IP: 72.52.91.14 Probable Submitter: 71.47.28.193 ---- Manual Page -- http://php.net/manual/en/function.openssl-public-encrypt.php Edit -- https://master.php.net/note/edit/118466 Del: integrated -- https://master.php.net/note/delete/118466/integrated Del: useless -- https://master.php.net/note/delete/118466/useless Del: bad code -- https://master.php.net/note/delete/118466/bad+code Del: spam -- https://master.php.net/note/delete/118466/spam Del: non-english -- https://master.php.net/note/delete/118466/non-english Del: in docs -- https://master.php.net/note/delete/118466/in+docs Del: other reasons-- https://master.php.net/note/delete/118466 Reject -- https://master.php.net/note/reject/118466 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#204325) next »