Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:90262 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27888 invoked from network); 7 Jan 2016 16:24:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jan 2016 16:24:21 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.174 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.214.174 mail-ob0-f174.google.com Received: from [209.85.214.174] ([209.85.214.174:35440] helo=mail-ob0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F6/31-21405-2319E865 for ; Thu, 07 Jan 2016 11:24:19 -0500 Received: by mail-ob0-f174.google.com with SMTP id xn1so56680522obc.2 for ; Thu, 07 Jan 2016 08:24:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=2rOgky6DNxF9GAQ9b3c4VIg+UIv39aLZwynIyOhihAY=; b=ftJUArl6SkGY2+myMJKYToqCMNiUVxfFjgtVFVMBoJqK+8uJpFhQQY69v0SvBQ7mOi MRxalzwfeOb3QIHX1nPzGxqHEE1EGF3EvyVqNnQGrhblsTOcjo7a6V+GTYZMZl4U2dR3 MRGbXr3QzViUC/f/S/U+P0N9KNaBHxnAx7iCQU7z9WaO68v2+9WVCeFZvGsFD6aMuK/R o5xhp92amqNzJZsjq2yOf5L9GBB/HiwQCAb1S+4Mt8A0XaFeyByzeejnUG371GrruXwE xQ1HRarPWci0VFqCDG5ReETX4ofaexlvV4p6LPQo773v1nBD4nSd4SdcKdIPmwdt2S84 gCGw== MIME-Version: 1.0 X-Received: by 10.182.200.162 with SMTP id jt2mr2502052obc.55.1452183855728; Thu, 07 Jan 2016 08:24:15 -0800 (PST) Received: by 10.202.64.136 with HTTP; Thu, 7 Jan 2016 08:24:15 -0800 (PST) In-Reply-To: References: Date: Thu, 7 Jan 2016 23:24:15 +0700 Message-ID: To: Scott Arciszewski Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Libsodium From: pierre.php@gmail.com (Pierre Joye) On Thu, Jan 7, 2016 at 11:11 PM, Scott Arciszewski wrote: > On Thu, Jan 7, 2016 at 10:51 AM, Pierre Joye wrote: >> HI Scott, >> >> On Thu, Jan 7, 2016 at 8:26 PM, Scott Arciszewski wrote: >>> Hi everyone, >>> >>> I've updated the RFC to make libsodium a core PHP extension in 7.1, to >>> include references to the online documentation. >>> >>> https://wiki.php.net/rfc/libsodium >>> >>> All new functions and classes would exist in the Sodium namespace. e.g. >>> >>> $ciphertext = \Sodium\crypto_box($message, $nonce, $keypair); >> >> As much as I like libsodium, yet another extension with yet another >> library in the core sounds like a risk to me, long term. I would >> rather prefer to focus on a larger effort to provide the necessary >> features in the most easiest way using new APIs or existing >> extensions, as you mentioned already in previous discussions and in >> this mail. That's why I won't be in favor of bundling this one. >> >>> This is part of an overall effort to improve PHP's cryptography; up >>> next will be the pluggable crypto API that supports multiple backends >>> (with a scope limited to openssl and libsodium at the time of release) >>> but always provide conservative defaults. Then I'd like to look at >>> deprecating ext/mcrypt back to PECL and add more hash functions to >>> ext/hash. >> >> This is definitely the way. Thanks for your great work :) >> >> Cheers, >> Pierre > > Hi Pierre, > >> As much as I like libsodium, yet another extension with yet another >> library in the core sounds like a risk to me, long term. I would >> rather prefer to focus on a larger effort to provide the necessary >> features in the most easiest way using new APIs or existing >> extensions, as you mentioned already in previous discussions and in >> this mail. That's why I won't be in favor of bundling this one. > > Even if we axe mcrypt and in with a net-gain of 0 extensions, you'd > see it as a risk? Except that we already refused to kill mcrypt, and it is not like I did not try to convince us to kill it. Does your extension provide a compatibility layer? I may have missed that :) > ---------------- > > Let me state this clearly: I'm personally not going to bother pushing > for a pluggable crypto API if the only option is to use OpenSSL and > all its legacy cruft. I especially don't have lukewarm feelings > towards RSA or ECDSA, which are your only real options with it. > > I feel that it simply would not be a worthwhile use of my time to do > so. If Internals decides "no libsodium" but "yes pluggable crypto > API", you'll have to find someone else to spearhead it. Sorry, my point was not clear. I do like the concept of a pluggable crypto API. Very much. I said it before and I say it again. I love the concept and will do what I can to support it :) What I do not like too much is the addition of an extension with (relatively) low level functions for one specific library. It does not really matter how good is this specific library, I simply do not see such addition as a good strategic move. > And I've said everything that needs to be said about mcrypt when I > said, "Kill it with fire!" Now that we have random_bytes() there is > nothing redeemable about it. Full ack. Cheers, -- Pierre @pierrejoye | http://www.libgd.org