Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86397 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51378 invoked from network); 26 May 2015 23:45:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 May 2015 23:45:10 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.176 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.176 mail-wi0-f176.google.com Received: from [209.85.212.176] ([209.85.212.176:35995] helo=mail-wi0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 93/01-43615-58505655 for ; Tue, 26 May 2015 19:45:10 -0400 Received: by wizk4 with SMTP id k4so93619936wiz.1 for ; Tue, 26 May 2015 16:45:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=bX8Yp2sEYop6I4bJ94U8RMgb6E01K7a9x9WJKFU9nPI=; b=tW/Wqx5rqgHZRhCIFphFX7SoGk/odxem24h5ZumeSGwVth+HFag205sQIT0pIXxWoj G2iDECH00Yj5nD1Rm/CjnMguVdAqUpbRugLPlcaMbpBwsfBKO8qoMNmCQ0SZ/uHhxZe1 yb4OBzbjrZ+v2DEzY2cDwlCOcq/BEwsxkWRV37/EuhncTdILQO1QKKDv9QvySfKYVxyX hSNGFD/KSor1wgBUPc2kGVePZbiTE3jBY5qxEeaiuk9+KKN2LGDdj7se368AxB/rHNKY UCso9I80P4k8n8VivRuUkv8M+DZol5YpvIjG7C+GnX+np71fQYq+wrgnW7xjaFvmkc3k 5j2w== X-Received: by 10.180.87.38 with SMTP id u6mr411313wiz.43.1432683905889; Tue, 26 May 2015 16:45:05 -0700 (PDT) Received: from [192.168.0.5] (cpc68956-brig15-2-0-cust215.3-3.cable.virginm.net. [82.6.24.216]) by mx.google.com with ESMTPSA id n3sm19287767wix.1.2015.05.26.16.45.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 May 2015 16:45:04 -0700 (PDT) Message-ID: <55650573.5080004@gmail.com> Date: Wed, 27 May 2015 00:44:51 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] [PHP 7.1] libsodium From: rowan.collins@gmail.com (Rowan Collins) On 26/05/2015 23:52, Scott Arciszewski wrote: > That's fair, and one of the reasons I wanted to make ext/libsodium part of > the core was so that segueing into a PDO-style cryptography API would be > more natural. Instead of "wrap openssl and maybe wrap libsodium if it's > already installed" it would be "wrap what the language already has". > > Am I mistaken in believing this would be the way forward? Well, it doesn't quite match how PDO works, as I understand it - ext/pdo_pgsql isn't implemented on top of ext/pgsql, the two are separate extensions built on top of the libPQ library which Postgres provides. The "PHP Crypto Objects" equivalent would be "wrap openssl in ext/pco_openssl, wrap libsodium in ext/pco_sodium". The dependency management would be no different between ext/openssl and ext/pco_openssl - PHP doesn't *provide* OpenSSL or mcrypt, it *optionally* depends on them, and the same would be true of libsodium, whatever the bindings looked like. As such, bundling an extension which directly exposes libsodium's functions isn't really a pre-requisite for a pluggable architecture, and could harm the effort by being "too good" and allowing the short-term "good enough" solution that Anthony is afraid of. Regards, -- Rowan Collins [IMSoP]