Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96454 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83003 invoked from network); 19 Oct 2016 00:20:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Oct 2016 00:20:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=daniel@honestempire.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=daniel@honestempire.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain honestempire.com designates 66.111.4.25 as permitted sender) X-PHP-List-Original-Sender: daniel@honestempire.com X-Host-Fingerprint: 66.111.4.25 out1-smtp.messagingengine.com Received: from [66.111.4.25] ([66.111.4.25:53522] helo=out1-smtp.messagingengine.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 59/B0-12428-76CB6085 for ; Tue, 18 Oct 2016 20:20:56 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 654D6207DC for ; Tue, 18 Oct 2016 20:20:53 -0400 (EDT) Received: from web1 ([10.202.2.211]) by compute4.internal (MEProxy); Tue, 18 Oct 2016 20:20:53 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=honestempire.com; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=HKy9V5R8wiZf2bhGfuYmi/8FtVM=; b=YEjZEm 9A/B6YpH36cCQKAljJ46Sch3vaDg+ToWoRFFfo2/RzNrIu80foinkcwpUA0ez+2T RVKHSLD8dHRBFf3gWrosltxbLHdnrVUffZrewrgpA25Fw5e76rrLj5npfRLUV7BF WlM48ySUrv4QaTY+rrDqUJgmKrXXhicCvvVVs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=HKy9V5R8wiZf2bh GfuYmi/8FtVM=; b=H71a/ti4nD87XF+nsEzHrPgGciDYheiA7eERawlnps8xB2b Yd/26qvgz8YrtGnCKiAkhpNxOqqQUKtVUPlcTopvXeVAPqzVEIOaIdyF70QKcT+X Oq/SXuPqU93VhWOSV+PSfNWSHFIcCR5tE1RbMTcAwVnbcCscVAyDeqm+PxoY= Received: by mailuser.nyi.internal (Postfix, from userid 99) id 21FDA9E6DD; Tue, 18 Oct 2016 20:20:53 -0400 (EDT) Message-ID: <1476836453.1255990.760265209.2E3FF6C9@webmail.messagingengine.com> X-Sasl-Enc: a0iXWv3Kggdthzoiy9b4CewR8exFZMj/1wbX7JrHihGJ 1476836453 To: internals@lists.php.net MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-2518523d Date: Wed, 19 Oct 2016 01:20:53 +0100 In-Reply-To: <1476834503.1248593.760253489.1D748624@webmail.messagingengine.com> References: <1476834503.1248593.760253489.1D748624@webmail.messagingengine.com> Subject: Re: [PHP-DEV] [RFC] OpenSSL BigNum support From: daniel@honestempire.com (Daniel Morris) And sorry for the spam (this should have been mentioned in the last email), as far as I can tell, there is no-way to say "I want a either a signed or unsigned integer with an N bits", I've come across this recently whilst trying to implement Murmur3 (128-bit) in PHP, I can of-course binary AND into 0b111111111111111111111111111111111111111111111111111111111111111 (e.g. $x & 0b11...) and it will yield result of 9,223,372,036,854,775,807 ((2^63)- 1 (PHP_INT_MAX)) but adding an additional 1 (radix 10) will yield a double(9.2233720368548E+18) and it's at that point it becomes incredibly difficult to work with to work with natural numbers. (Unrelated to Sara's RFC, just a thought I'd mention incase someone is interested...) I personally think this RFC is fine despite the existing libraries that do similar (BCMath and GMP), it's more of an interface to the lower layer (and OpenSSL specific) rather than an implementation. We're just keeping up with existing implementations. Sara, I'm happy to implement additional tests and look at fast ZPP for methods tomorrow if you're too busy and think this is going somewhere... DM