Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72370 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62973 invoked from network); 7 Feb 2014 10:31:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Feb 2014 10:31:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.54 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.215.54 mail-la0-f54.google.com Received: from [209.85.215.54] ([209.85.215.54:61591] helo=mail-la0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4B/14-34013-B06B4F25 for ; Fri, 07 Feb 2014 05:31:39 -0500 Received: by mail-la0-f54.google.com with SMTP id y1so2444132lam.41 for ; Fri, 07 Feb 2014 02:31:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=g3gZphSNGhX2t77t+G3CKy/vMo+1FlHwaMpoOhVIMQU=; b=wE9yUd4zEwAIz0rAoUls2uUC+fiBkzfihMNKKR09v2769FnQlMzqOJsf22eeVEJ58K SmrmX9LDG5aNN4qTFbtKPYlIU0RA1toTnwNevD0GzRypHSN6r+uQIpDMV/rSKso+G+vp 8DVuZoeVwMhg4oEms1y8P8+ZalsetUY1jiGviXYEUsDgWXIvE3ZUE7HQxnRn1MMCJpX3 5RPFmqfY8LN4lw6DPhZNbUGfaiztoSWO0Bef6Kfy58FvY7dSUX8SlFk7aV1SLuXLIBHC 3E1Ic8gflioPEx3ToIROiWFUN4b7AeroeKqlFl9+3Oc9ZZfqNy6NWx46CRPpGKLY0pIn TASg== X-Received: by 10.152.121.105 with SMTP id lj9mr5502822lab.37.1391769096264; Fri, 07 Feb 2014 02:31:36 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.199.37 with HTTP; Fri, 7 Feb 2014 02:30:56 -0800 (PST) In-Reply-To: <52F485C1.4010208@cubiclesoft.com> References: <52F485C1.4010208@cubiclesoft.com> Date: Fri, 7 Feb 2014 19:30:56 +0900 X-Google-Sender-Auth: 2KahNahE75kzpJQARjLkT_rliu8 Message-ID: To: Thomas Hruska Cc: PHP Development Content-Type: multipart/alternative; boundary=089e0122771697a08704f1ce7e22 Subject: Re: [PHP-DEV] Make mcrypt_create_iv() an alias and move the code into /ext/standard From: yohgaki@ohgaki.net (Yasuo Ohgaki) --089e0122771697a08704f1ce7e22 Content-Type: text/plain; charset=UTF-8 Hi Thomas, On Fri, Feb 7, 2014 at 4:05 PM, Thomas Hruska wrote: > Moving the guts of this non-dependent function into the core would allow > mcrypt_create_iv() to just become an alias. The new userland function > could be located in /ext/standard/rand.c and have an uncreative name like > rand_bytes(). There is new great PECL package. http://pecl.php.net/package/crypto I would like to see it as default for crypt related feature. Anyway, we need default rundom_bytes() function in ext/standard. This is mandatory for secure apps, but we have no default function. This should be resolved. Anyway, mcrypt_create_iv() is not optimum, yet. Here is possible improvement. https://github.com/yohgaki/php-src/compare/PHP-5.6-mcrypt_create_iv It still requires random source and it does not support windows well, though. I'm about to adding new function which solves all of them like session module. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --089e0122771697a08704f1ce7e22--