Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91868 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52534 invoked from network); 22 Mar 2016 19:35:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Mar 2016 19:35:45 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.50 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.213.50 mail-vk0-f50.google.com Received: from [209.85.213.50] ([209.85.213.50:35834] helo=mail-vk0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E2/84-30596-F8E91F65 for ; Tue, 22 Mar 2016 14:35:43 -0500 Received: by mail-vk0-f50.google.com with SMTP id e6so268129315vkh.2 for ; Tue, 22 Mar 2016 12:35:43 -0700 (PDT) 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; bh=pe95Aaafukfs29F7fo90sC1uM6fckyoQYxGzjeRV4Bg=; b=Nv1pM0YRaw3iHFTd6U73nMqEvz4SlKIStkS3+3ZhHen2B3u9L83fRlFapOkIW77fyV S5RvsCzDB6ggUC/IHA0gig16IoqZebkcL6DBayrqNuMVfTos5d4FAZ2wx9WcqRobTaqn mhcvfCI1UZluoe9da5UYVPKStsS5LsS2t1gcorLeE4216lC40bY4vr5PNGi/JAgm+wYw jum13bFl11dgZkYcUZv21subQaGeAjqoIRcnM5vjNYXc1DIwa1m9EiOI+RpXHY8S9OJA toaq4KegdqKlUrDt2dtyI1q0HcCS7VMUkQ3bzczDMf4j+1wb5Sz/grpFbPl3ajXCeo4Y guzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=pe95Aaafukfs29F7fo90sC1uM6fckyoQYxGzjeRV4Bg=; b=Eo4qD1z4qae6u4ns0kocPy0ni/ChWz9dxEu26okWEMnD6+0BISnexCRyrFpO2waRTX Kwg8OCQ6P1w0HKh8IZlKosc8q/t5P6wgBlN7o4b0y5UhA0gVsRMsWj4oRkFaaNrXeOKN VUaXmfMSu1qzRFTk6vE2nnDzY4xoOkknEc4k4JSpUNmvEGf5R0UpAI0CuE3qTqjc7OnQ qxK3w1IMiOohPuzq2n9SqZJq56XyeMMjQySLH54Q1wJ+ozfSdbpAs9k0CD7ZmLNJgu2K ejHEUBrhFqH2QGo92kyvrZSZDzr55OFwzFj12/ZUY/4AyHnqWyIe2FQfqMDxHEwz+tCj royA== X-Gm-Message-State: AD7BkJKjQn8PfWgwSBnjBd6ekbF4mpkgLeFJZ8lFKA5NFEFIfzZN9NSBAX1E7tOIl/fOD4RhEwke2POQ6U5K0w== X-Received: by 10.159.39.42 with SMTP id a39mr5304177uaa.64.1458675340773; Tue, 22 Mar 2016 12:35:40 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.159.35.77 with HTTP; Tue, 22 Mar 2016 12:35:01 -0700 (PDT) In-Reply-To: References: Date: Wed, 23 Mar 2016 04:35:01 +0900 X-Google-Sender-Auth: xMFDstNGGb5SdVKzuoibO00IAbM Message-ID: To: Scott Arciszewski Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] RFC4648 encoding From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi Scott, On Wed, Mar 23, 2016 at 3:29 AM, Scott Arciszewski wrote: > PHP already offers bin2hex()/hex2bin() and base64_encode()/base64_decode(). > This covers part, but not all, of RFC 4648. > > I'd like to extend the coverage to include, at minimum, Base32. > > I'd also like to make these functions to be written to resist cache-timing > attacks (i.e. when used to encode/decode encryption keys for long-term > storage). Userland PoC: https://github.com/paragonie/constant_time_encoding > > http://blog.ircmaxell.com/2014/11/its-all-about-time.html > > These modifications can either be made in-place (at a negligble cost on the > scale of nanoseconds) or they can be an alternative implementation. i.e. > > * bin2hex_ts() > * base64_encode_ts() > * base32_encode_ts() > > Does anyone have any questions or concerns? Sounds good to me and I would like to see these in next release. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net