Re: [dane] I-D Action: draft-ietf-dane-smime-04.txt

Viktor Dukhovni <viktor1dane@dukhovni.org> Thu, 09 January 2014 20:56 UTC

Return-Path: <viktor1dane@dukhovni.org>
X-Original-To: dane@ietfa.amsl.com
Delivered-To: dane@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 700801ADFA6 for <dane@ietfa.amsl.com>; Thu, 9 Jan 2014 12:56:18 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vDDF98mbz--g for <dane@ietfa.amsl.com>; Thu, 9 Jan 2014 12:56:16 -0800 (PST)
Received: from mournblade.imrryr.org (mournblade.imrryr.org [38.117.134.19]) by ietfa.amsl.com (Postfix) with ESMTP id 1E9F41AE177 for <dane@ietf.org>; Thu, 9 Jan 2014 12:56:14 -0800 (PST)
Received: by mournblade.imrryr.org (Postfix, from userid 1034) id 5DB172AB173; Thu, 9 Jan 2014 20:56:04 +0000 (UTC)
Date: Thu, 9 Jan 2014 20:56:04 +0000
From: Viktor Dukhovni <viktor1dane@dukhovni.org>
To: dane@ietf.org
Message-ID: <20140109205604.GM2317@mournblade.imrryr.org>
References: <89AE05E1-BC6C-46BA-A4CC-A8F29070096D@vpnc.org> <CEF43EFD.F8FB%bdickson@verisign.com> <20140109173943.GL2317@mournblade.imrryr.org> <m37ga9kkfs.fsf@carbon.jhcloos.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <m37ga9kkfs.fsf@carbon.jhcloos.org>
User-Agent: Mutt/1.5.21 (2010-09-15)
Subject: Re: [dane] I-D Action: draft-ietf-dane-smime-04.txt
X-BeenThere: dane@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: dane@ietf.org
List-Id: DNS-based Authentication of Named Entities <dane.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dane>, <mailto:dane-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/dane/>
List-Post: <mailto:dane@ietf.org>
List-Help: <mailto:dane-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dane>, <mailto:dane-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 09 Jan 2014 20:56:18 -0000

On Thu, Jan 09, 2014 at 02:45:50PM -0500, James Cloos wrote:
> >>>>> "BD" == Brian Dickson <bdickson@verisign.com> writes:
> >>>>> "VD" == Viktor Dukhovni <viktor1dane@dukhovni.org> writes:
> 
> BD>> So instead of "encoding" per se, what about using a hash function?
> BD>> ... re-use of the NSEC3 code might be reasonable
> 
> VD> An intriguing suggestion.
> 
> Very!
> 
> VD> If the hash is HMAC-SHA1(domain, username), its hex representation
> VD> is 40 octets which fits comfortably into a DNS label.
> 
> As hex; and 40 hex vs 32 base32 isn't enough of a difference to warrant
> adding extra code for base32.  A win overall.
> 
> Should anyone insist of hmac-sha256, though, base32 would be necessary.
> But I've yet to see any credible claims that sha1's vulnerabilities
> affect hmac-sha1, so there shouldn't be a reason for sha2 or sha3.

Indeed, but if one really wants to avoid HMAC-SHA1 because it is
now unfashionable, one can use SHA2-224 to get a 56-byte label.

Choices of canonicalization rules for the HMAC input are identical
to those for the base32 input.  Neither is particularly more amenable
to case-insensitive or other imprecise matching on the encoded output.

So it seems that there is little advantage to base32, and clear
disadvantages.  The only upside I can see for base32 is that with
HMAC the DNS administrator who forgets which user a given key is
for, can't easily recover that information, but he can with base32.
Keeping the user names "secret" is arguably a security feature when
DNS is outsourced.

A sensible administrator will keep the unhashed input names in a
configuration system that generates the corresponding DNS entries.

-- 
	Viktor.