Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96467 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19653 invoked from network); 19 Oct 2016 07:01:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Oct 2016 07:01:29 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.171 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.213.171 mail-yb0-f171.google.com Received: from [209.85.213.171] ([209.85.213.171:34737] helo=mail-yb0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 62/B0-14749-64A17085 for ; Wed, 19 Oct 2016 03:01:28 -0400 Received: by mail-yb0-f171.google.com with SMTP id f97so741080ybi.1 for ; Wed, 19 Oct 2016 00:01:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=EXLdAaC7/sNB8fwmnxvneEzpZJP0rB+trNN14zOxwFk=; b=OIy/Ay09x4O0NTgaV+IuwN9O4HzyeML2AyKglErwja/KNlL85Py1nHLc6YCx7CwM6y 8HurkC1Sumzgyat1ZwXMchLgmaUacf4ZV9D8PXivT2ZLahLChk9HC9FXLtxexG0uLg+H ah4wJWCO32i1uAOZJv6yD4CMHEtoBY1ToWDo6h2E2AE1y3QYmSCEg9rXorqp7KNm9s7m p0QO1h/9PMJpgxUO6znMqqsn+Ee3T58G5pW7RSbWH1N9RtVklqKd174yKjrDZ3rRWtME CwuqZFMyDijVgjlp63kZOnWTZDouyd06nAT7tkdu/ahxprz3/6pf7TFft29CvQ6L90fB DLyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=EXLdAaC7/sNB8fwmnxvneEzpZJP0rB+trNN14zOxwFk=; b=XvSlVjHRm9q4NPYHpsmjvw97wguHdk8NDLy0lorGedH7WTc2P3zPPaR2I99+12ndVg 0lGPKsh87yE7lyd+tWDtJ8R2tU4054bYpJiJ43hM8+AL4kxRHHc+holQnPum827/ShHr zpuRg0bJK6oNSG7c+wSt2zWpSUsPIaZQr+4Pkm1jy+ALgsmShkCiYfXhrdlBcD601Lf5 40WfcYCMIhiIBvaTYAcf3GfwePRjN+81AdG+i5W2GF3FeBJzFb9t485imXDeZd37Gs5F /JNud1kVKQYVp/vIGiHydFPcW0CoI1Hb/vlcFyLAbhi/vYruIfj+avUi5TqT+/dHQyDR U7KQ== X-Gm-Message-State: AA6/9Rk1xmgEdtxaM45yZLSrgiUihtqpR7P9GtwkqZhf0oqa3bIkh8oIxSAtQBznE+wScuknGu5a0djjLO+4pQ== X-Received: by 10.37.163.195 with SMTP id e61mr4527574ybi.81.1476860484060; Wed, 19 Oct 2016 00:01:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.219.12 with HTTP; Wed, 19 Oct 2016 00:01:23 -0700 (PDT) In-Reply-To: <1476834503.1248593.760253489.1D748624@webmail.messagingengine.com> References: <1476834503.1248593.760253489.1D748624@webmail.messagingengine.com> Date: Wed, 19 Oct 2016 09:01:23 +0200 Message-ID: To: Daniel Morris Cc: PHP internals Content-Type: multipart/alternative; boundary=f403045c05f88909d4053f326035 Subject: Re: [PHP-DEV] [RFC] OpenSSL BigNum support From: nikita.ppv@gmail.com (Nikita Popov) --f403045c05f88909d4053f326035 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Oct 19, 2016 at 1:48 AM, Daniel Morris wrote: > On Tue, 18 Oct 2016, at 09:22 AM, Nikita Popov wrote: > > On Tue, Oct 18, 2016 at 3:35 AM, Sara Golemon wrote: > > > > > As it says on the tin: Wrap the BN (BigNumber) library in OpenSSL. > > Why do we need GMP when we have BCMath? Because GMP implements big integer arithmetic, while BCMath implements big decimal arithmetic. > GMP is faster (from what I've > seen so far from various tests and blog posts) =E2=80=93 whilst they do s= imilar > ops, they are chosen for specific reasons, all this does is expose the > existing interfaces for arbitrary precision arithmetic made available > with the OpenSSL layer, and I think anyone implementing them would want > the API there, it requires minimal maintenance. Sara, I think the best > route is too match the method names within OpenSSL, it will avoid some > initial confusion, unless people want to change libraries, but I think > that is probably less likely. > What are the specific reasons for choosing OpenSSL Bignums over GMP, outside of extension availability (which is totally a path I don't want us to go down -- see also recent attempts to duplicate ext/mbstring into ext/standard)? Are there any particular properties of the openssl implementation that are beneficial for certain applications? Nikita --f403045c05f88909d4053f326035--