[kitten] Comments on draft-ietf-kitten-password-storage-00

Jim Fenton <fenton@bluepopcorn.net> Sat, 05 September 2020 00:53 UTC

Return-Path: <fenton@bluepopcorn.net>
X-Original-To: kitten@ietfa.amsl.com
Delivered-To: kitten@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id EAC073A0EF0 for <kitten@ietfa.amsl.com>; Fri, 4 Sep 2020 17:53:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level:
X-Spam-Status: No, score=-2.099 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=bluepopcorn.net
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 Lh96snOUf9rc for <kitten@ietfa.amsl.com>; Fri, 4 Sep 2020 17:53:40 -0700 (PDT)
Received: from v2.bluepopcorn.net (v2.bluepopcorn.net [IPv6:2607:f2f8:a994::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3237F3A0EEF for <kitten@ietf.org>; Fri, 4 Sep 2020 17:53:40 -0700 (PDT)
Received: from steel.bluepopcorn.net ([IPv6:2601:647:4400:1261:d1e3:e316:f015:75b9]) (authenticated bits=0) by v2.bluepopcorn.net (8.15.2/8.15.2/Debian-14~deb10u1) with ESMTPSA id 0850rcSG024843 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Fri, 4 Sep 2020 17:53:39 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bluepopcorn.net; s=supersize; t=1599267219; bh=xeqQ6o8p6IXambB1W0rktdNDtX7ygz58mqrJ9FHfvT0=; h=From:Subject:To:Cc:Date:From; b=Ybo47GU962NIplwqvN1fso/dM++CpHRbQvBrNWM90rFp5ktMqaqsbf8KdAwKHfxGP 6jTmjoSfPVqkv0GaYC1UEyIWSJoJMuBMHEK8jwohb17Nc7Z+ng/RthbEEvVUSMhiXl lxMpsZeG9MQ9PQzsDtRmVonfCzfKFiNaFIHmtbbM=
From: Jim Fenton <fenton@bluepopcorn.net>
To: kitten@ietf.org
Autocrypt: addr=fenton@bluepopcorn.net; prefer-encrypt=mutual; keydata= mQINBFJNz0MBEADME6UoNSsTvSDJOdzL4yWfH4HTTOOZZPUcM/at38j4joeBb2PdatlwCBtk 9ZjupxFK+Qh5NZC19Oa6CHo0vlqw7V1hx1MUhmSPbzKRcNFhJu0KcQdniI8qmsqoG50IELXN BPI5OEZ3chYHpoXXi2+VCkjXJyeoqRNwNdv6QPGg6O1FMbB+AcIZj3x5U18LnJnXv1i+1vBq CxbMP43VmryPf8BLufcEciXpMEHydHbrEBZb/r7SBkUhdQXjxRNcWOLeYvOVUOOrr1c+jvqm DEbTWUJVRnUro/WpZQBffFnymR0jjkdAa8eOVl/nF2oMLbaBsOMvxCRSSEcGhuqwbEappNVT 1nuBTbkJT/GGcXxc+lEx9uNj86oYC4384VZJMTd1BRI4qPXImNZCIdmpKegK743B6xxN6Qh1 Tg167pn9429JENQE/AFIVX5B/gpsg7Aq+3rmz9H6GbfovPvFV3TBTgsHCHAMC8XU+S4fhcqN PN0lbUeyb7g6wxaE+dYqC7TExx7G3prw4v66y0qS7ow/Cfw8XXOEkaFQ4XwP7nvfILT+9CcU yS8I40vlDFU9Wnt56CbGz0ZVQgHnwyPXL+S9kCcIwRLFx1M79s6T6qwX1TXadfpbi1uIw7XG TiPDT8Pk6i2y22oSSROyYD4D+wOhVkkvO0S8iZ3+LhA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C2G4aqn1G3DLSDzwfBfSYLs31dK5mDyzv51G ZJfgxbwTKcdoy6AEkUrzM3A1GP+NVfb/I2LCui+QOHfhfPFmV1OPpTPL77AsTXviA7l1iYMd BADv28GwZyay6Fd1Hp7rOXFI/Qx87++GwpEjpuSKcZihfnh2754ZSyZxim2wmMs6k12nYwvE
Message-ID: <6dde1303-3d0c-6811-c201-00edbe5ab84e@bluepopcorn.net>
Date: Fri, 04 Sep 2020 17:53:32 -0700
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.12.0
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/kitten/X6ltZh0F3QcKAjc3lumN7cAo3Kc>
Subject: [kitten] Comments on draft-ietf-kitten-password-storage-00
X-BeenThere: kitten@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Common Authentication Technologies - Next Generation <kitten.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/kitten>, <mailto:kitten-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/kitten/>
List-Post: <mailto:kitten@ietf.org>
List-Help: <mailto:kitten-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/kitten>, <mailto:kitten-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 05 Sep 2020 00:53:42 -0000

Hi,

I'm not generally up to speed on the work of the kitten WG, but someone
pointed out this draft and thought I'd be interested, and I am. Please
bear that in mind if some of my suggestions conflict with GSS-API,
Kerberos, etc. And I'm not familiar with the various SASL mechanisms so
don't have any comments on them.

1.1 Terminology

Since the term "salt" is so widely used in this document, it would be
good to reference a specific definition, since RFC 4949, SP 800-132, and
SP 800-63-3 all have different definitions.

For "pepper", does "not unique" mean that there is one pepper value for
the entire database that is stored separately? This would be OK if the
database is salted as well (need to de-duplicate cases where different
users have the same password).

3.1 Mechanisms

The end of paragraph 4 talks about providing a strong authenticator
assurance level. In NIST SP 800-63B, authenticator assurance level is a
categorization of authentication transactions (1-3), and single-factor
authentication such as a password is only ever AAL1 regardless of how
it's done. I suggest a different term be used here.

4.1 SASL requirements

Hashes that are unsuitable for use with authenticators such as SHA256:
Should explain what makes them unsuitable. I gather that's because
SHA256 is too fast, especially with all the stuff developed for
cryptocurrency mining. But really all hashes are too fast to be used
alone; they need to be used iteratively or as part of a key derivation
function that is hopefully time- and memory-hard.

4.2 Storage

Salts don't really need to be random; they just need to be unique, and
long enough to make it impractical to construct a rainbow table. "If it
is stored": the salt, I assume? Please be specific. The pepper value
should be stored at arm's length from everything else, such as in an HSM
or otherwise separate place (example:
https://github.com/jimfenton/rehash ). Storing the pepper in an
environment variable seems like a really bad idea to me.

As I mentioned above, a minimum salt length of 16 bytes seems excessive.
NIST SP 800-63B requires 32 bits. Similarly, 32 bytes for the pepper is
more than is really needed; SP 800-63B calls for 112 bits (but calls it
a "salt" which is confusing).

4.3 Authentication and rotation

Paragraph 2, "iteration count" - some algorithms refer to this as a work
factor so suggest "iteration count or work factor".

Paragraph 3, Pepper rotation: In cases where the password is salted and
iteratively hashed, and then a keyed hash with the pepper value is
performed after that, it has been suggested that the keyed hash could be
replaced by a keyed encryption, which has the advantage of allowing the
key to be rotated by sending the verifier values to the peppering
process, which could decrypt the verifiers with the old key and
reencrypt with the new key. This makes a lot of sense; encryption isn't
really a problem here because there isn't a practical brute force threat.

6. Password complexity

Replace blacklist with blocklist, denylist, or something else of course.

"(when paired with the same email or other uniquely identifying
information)" - This would only result in denial of use of a password if
it was used by the same account, when really we want to deny the use of
things like passw0rd entirely. So just compare against the list without
identifying information (which you don't want to have anyway). I'd leave
out the part about commonly used patterns -- that leads down a slippery
slope to the complex composition rules we have today, when really we
just want to make sure common passwords aren't used. So if "aaaaaaaa" is
considered a common password, just put it on the blocklist.

I'm happy to discuss any of this further. Thanks for putting together
this draft.

-Jim