[RFC] PHP 7.1 - Simple Cryptography Interface
| From: | Scott Arciszewski | Date: | Sun, 10 Jan 2016 04:23:59 +0000 |
| Subject: | [RFC] PHP 7.1 - Simple Cryptography Interface | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-90445@lists.php.net to get a copy of this message | ||
I'd like to make cryptography drop-dead simple in PHP 7.1 and
thereafter. The simplest thing to do is to provide a simple front-end
API, designed for human usability, that abstracts away the
complexities of cryptography engineering.
I've started writing an RFC draft here: https://wiki.php.net/rfc/php71-crypto
These are the rules I'd like everyone to keep in mind when proposing
changes to these features:
1. Security is the first priority. It is absolutely unacceptable to
add a cryptographic side-channel or render this library vulnerable to
any sort of chosen-ciphertext attack.ECB mode is completely off the
table.
2. Simple is good. Developers should not need to know what a nonce is,
nor should they be given the opportunity to weaken the protocol by
providing their own.
Some general guidelines that I feel particularly strong about but
others might contest:
For 7.1, we will only allow elliptic curve public key cryptography. In
the future, we might expand to include post-quantum cryptography. We
must absolutely not support RSA or classic (non-EC) Diffie Hellman.
This is the overall process I'd like to follow for getting this ready
for PHP 7.1.
1. Develop a PHP extension, available in PECL, so developers can
implement it in PHP 7.0 projects to test it out. This process starts
today. I've set up a GIthub repository at
https://github.com/paragonie/php71_crypto
for any developers that
would like to help.
2. The RFC/voting process. This starts as soon as we have a stable
implementation and drivers for both libsodium and openssl ready to go.
3. Formal code review from a third-party team of security experts
(Depending on how successful I am in my business ventures this year, I
might be able to cover the cost of this personally. I can't promise
anything today, however.)
4. Merge it into the PHP core before 7.1.0 is released.
Everyone is welcome to contribute, even if you're not a cryptography
expert. Non-experts are the people I intend to be able to use it, so
your feedback will be incredibly valuable.
Together, I believe we can make PHP 7.1 the pinnacle of usable security. :)
Scott Arciszewski
Chief Development Officer
Paragon Initiative Enterprises <https://paragonie.com>