Re: [Rats] Android comments on EAT draft

Shawn Willden <swillden@google.com> Thu, 16 May 2019 21:12 UTC

Return-Path: <swillden@google.com>
X-Original-To: rats@ietfa.amsl.com
Delivered-To: rats@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C2F0E120303 for <rats@ietfa.amsl.com>; Thu, 16 May 2019 14:12:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -17.509
X-Spam-Level:
X-Spam-Status: No, score=-17.509 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.com
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 u8yyhWYgZhCB for <rats@ietfa.amsl.com>; Thu, 16 May 2019 14:12:02 -0700 (PDT)
Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9C7BB1202FD for <rats@ietf.org>; Thu, 16 May 2019 14:12:02 -0700 (PDT)
Received: by mail-yb1-xb31.google.com with SMTP id x5so1807890ybn.6 for <rats@ietf.org>; Thu, 16 May 2019 14:12:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=on2LkoJAHu+Ui5NuW/0J7YSZPSUtTHkofUjvNEx0E2k=; b=Ks0VH3yutkc82YBFKzU4lbrz0zyD+yjhmqyyDC1WasOJi57p8xrK/Q7dYdE05lf1r3 tKICzeuqUzoAiiSjHxN/fEUu0GDSH3DMY6IbsJhzNxCPblYE5rn+Z1osu1VzP14YIra8 Ydf0gh/jMzF/Hn0EBUmFaZIY4OjyIivZ4aBbvs6AMRTBjjonwoytS8+B71+a461vweLg qsjdDJ0htb1C1RtceaovSZ6i5+AOqcM4NMpis91a+eUXD8JQ5C6djBFgCmCXwiiY/qtb 8HmnqGTjLlaOEosMoCHywBLnd05hjwIWXLeWzrneUeJXQE8wGJGV0aKSiGgmEst17/Ko VGkg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=on2LkoJAHu+Ui5NuW/0J7YSZPSUtTHkofUjvNEx0E2k=; b=lsfhgR/n3PdWQgAsgk4fL6wVAWXYe2Lr9/cK6aSyL2QwqH13KLWh9MMo/ycQeRt6Xb 5gdW4fPvPpuulTE7fJQuRAeNwNPIugUThzWIL2nmCdjLKHl7s23+/FxtMyZP1gp76fMH LZwdPa1x8PyjozzTVUQNOdz/bJYX85dfyI0x9nBQP34zVs6gIG7xsnNqxjAqcKPQSDR+ QNmqgjX8BTjOejrVjnb1E/deIQEwoDdpopZsNtq/O+CzjHE3LR8fL7smjoKrTRxxmjvQ LAh5XexeYf2AjM04Mykjtg7RmtSfgWsH1ytGiP8bq5pl6zMCh+koV5WpqTNywVFuEnc2 bfBQ==
X-Gm-Message-State: APjAAAUhrMYJEDkNr/0FMa1YVDJTr9YNhhS+zmEhFak1ocmNkeJf7JJ0 ADOVgLfLa3VgnhkiYpzhrIMfR3J9qO6VSBS9jPGjAiKFy9NCtg==
X-Google-Smtp-Source: APXvYqyRMnz20HSoKi/qFgShm1t1sp12KgEJhLYgG6q0vFrPbj1nLj1QZJeF45Z0SS811fy28p4FByWJEU0rg5y9h7A=
X-Received: by 2002:a25:e55:: with SMTP id 82mr24162271ybo.50.1558041121406; Thu, 16 May 2019 14:12:01 -0700 (PDT)
MIME-Version: 1.0
References: <CAFyqnhVJ-ps4bdhsyQDOHdzHVZsXeK7_kCDXxUVUcuyDzWS3uA@mail.gmail.com> <35459D73-3D08-4E0B-814B-780AD60DD600@island-resort.com> <HE1PR0801MB1643AA2E129098E2C65F9163EF0A0@HE1PR0801MB1643.eurprd08.prod.outlook.com>
In-Reply-To: <HE1PR0801MB1643AA2E129098E2C65F9163EF0A0@HE1PR0801MB1643.eurprd08.prod.outlook.com>
From: Shawn Willden <swillden@google.com>
Date: Thu, 16 May 2019 15:11:49 -0600
Message-ID: <CAFyqnhX9f5s21roZvz_VcfR+sd3E89SYmunZKX-2JMC4Rqy_cw@mail.gmail.com>
To: Simon Frost <Simon.Frost@arm.com>
Cc: Laurence Lundblade <lgl@island-resort.com>, "rats@ietf.org" <rats@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000096beef058907b733"
Archived-At: <https://mailarchive.ietf.org/arch/msg/rats/4zuhy9OofZhwBx1F-9nBafB6nIE>
Subject: Re: [Rats] Android comments on EAT draft
X-BeenThere: rats@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Remote Attestation Procedures <rats.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rats>, <mailto:rats-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/rats/>
List-Post: <mailto:rats@ietf.org>
List-Help: <mailto:rats-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rats>, <mailto:rats-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 16 May 2019 21:12:05 -0000

*From: *Simon Frost <Simon.Frost@arm.com>

> As an example, have a look at the draft ‘profile’ we put together for an
> Arm PSA attestation (
> https://www.ietf.org/id/draft-tschofenig-rats-psa-token-01.txt) and let
> us know where that does or doesn’t cover your software needs.
>

I'll do that.

I would be very interested in reading your set of claims necessary to
> describe a key as that use case has also been expressed for our usage.
>

Sure, here's a list of everything currently included in Android key
attestations (excluding device info items and some elements that are
redundant, also specified in the enclosing X.509 certificate):


   - Purpose:  one or more of SIGN, ENCRYPT and WRAP_KEY.
   - Digest: one or more of MD5, SHA1, SHA-256, SHA-324, SHA-512; which
   digest(s) can be used for message digesting (MD5 and SHA1 are only for
   legacy compatibility).
   - Padding:  (RSA only) one or more of RSA_PKCS1_1_5_ENCRYPT, RSA_OAEP,
   RSA_PKCS1_1_5_SIGN and RSA_PSS
   - Rollback resistance: Boolean, if true, indicates that when the key is
   deleted it is guaranteed never to be usable again
   - No auth required:  Indicates key can be used without user
   authentication.  If this is present, user auth type and auth timeout must
   not be present.
   - User auth type:  Indicates type of required user authentication
   (password/biometric)
   - Auth timeout: Indicates time in seconds during which key can be used
   after user authentication (absence indicates key requires authentication
   for each key usage).
   - Allow while on body: Applicable only to wearables, and only for keys
   that require authentication with a timeout.  Indicates that the key
   immediately becomes unusable when the device is removed from the body, even
   if timeout has not yet expired.
   - Origin:  Where the key originated, one of GENERATED (in device; exists
   nowhere else), DERIVED (in device, but also derivable by some off-device
   entity), IMPORTED (imported in plaintext), SECURELY_IMPORTED (imported in
   encrypted form), UNKNOWN
   - Application ID:  Which Android app created the key

A note about purpose, digest, padding: the idea is that AndroidKeyStore
only allows keys to be used in the mode(s) that were declared when the key
was created.  Any attempt to use the keys in any other way (e.g. sign with
a n RSA key that has only the ENCRYPT purpose) will be rejected by the
TEE/SE.

I think Android R will add support for ECDH, so that will add some
associated claims, and we may also add an option for secure export of key
material, assuming the key was configured to allow it at creation/import
time.  That will add some associated claims as well, including the public
key(s) to which exports may be encrypted.

-- 
Shawn Willden | Staff Software Engineer | swillden@google.com | 720-924-6645