Re: [Secdispatch] [lamps] IDevID considerations document to secdispatch

Tomas Gustavsson <tomas.gustavsson@primekey.com> Mon, 29 June 2020 08:05 UTC

Return-Path: <tomas.gustavsson@primekey.com>
X-Original-To: secdispatch@ietfa.amsl.com
Delivered-To: secdispatch@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 09ADF3A0BD5; Mon, 29 Jun 2020 01:05:26 -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=primekey.com header.b=JPnIoCWY; dkim=pass (1024-bit key) header.d=primekey.com header.b=JPnIoCWY
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 uTxYNRvDkGT6; Mon, 29 Jun 2020 01:05:23 -0700 (PDT)
Received: from mail.primekey.com (mail.primekey.com [84.55.121.163]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 87D4E3A0BAE; Mon, 29 Jun 2020 01:05:22 -0700 (PDT)
Received: from mail.primekey.com (localhost [127.0.0.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.primekey.com (Postfix) with ESMTPS id C99606AA01AD; Mon, 29 Jun 2020 10:05:01 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=primekey.com; s=mail; t=1593417901; bh=U9yK/HrtiQOG2UeMDHjoahKkRMUis3hFHUzPEhgjgLk=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=JPnIoCWYriSlI1NnrJo4fFTnHVVYKPk0sAXRIhXqjBwCOxeh6g0xoK64PUddvn1Gb By3mM0LVgry3XMFWeJgYy7hjdRzk1GH2bh91mU1izOkDied+7dx68PGqEa9/V5SZkW +RKOkMDsZRcZk5BQM/8nM9+bukTh5Nf2h3DsfI4Y=
Received: from [192.168.1.100] (m37-2-193-37.cust.tele2.se [37.2.193.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.primekey.com (Postfix) with ESMTPSA id 88DAE6AA01AB; Mon, 29 Jun 2020 10:05:01 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=primekey.com; s=mail; t=1593417901; bh=U9yK/HrtiQOG2UeMDHjoahKkRMUis3hFHUzPEhgjgLk=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=JPnIoCWYriSlI1NnrJo4fFTnHVVYKPk0sAXRIhXqjBwCOxeh6g0xoK64PUddvn1Gb By3mM0LVgry3XMFWeJgYy7hjdRzk1GH2bh91mU1izOkDied+7dx68PGqEa9/V5SZkW +RKOkMDsZRcZk5BQM/8nM9+bukTh5Nf2h3DsfI4Y=
To: Michael Richardson <mcr+ietf@sandelman.ca>, secdispatch@ietf.org
Cc: spasm@ietf.org
References: <159176190855.9169.7350787463977998504@ietfa.amsl.com> <10463.1591763623@localhost> <13107.1591804306@localhost> <f7cdd360-7ab7-28f6-86b9-9f8c4ae04aaf@primekey.com> <5843.1591897975@localhost> <092308c1-dc44-4989-e3a5-1a248a3c361e@primekey.com> <20595.1593377487@localhost>
From: Tomas Gustavsson <tomas.gustavsson@primekey.com>
Autocrypt: addr=tomas.gustavsson@primekey.com; prefer-encrypt=mutual; keydata= xsBNBEyuwwYBCAD31Jsxn1lf7rnFc7y3Ol+TE7pU7ohO78kMdoVrZdAMnU9W0P33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+xPabPjqiUmR7EBvg0uocr70Ag93tWk1d 4RgFcicjwMFcPg4TZ8Y/3Y7Nmbyo14+4SMNfNPFLgQMawL+cLLkdABEBAAHCwF8EGAECAAkC GwwFAlYXhXUACgkQYm3EmwBD/kA2igf/QNpPe7sLt3KdRD3x4cStxGjLCWyj7x1YLVnV4Nnu TvaNhC+KHx3uG39y1x3PJQwslpeSQ6JipOUmxeQjjGJGQZLV41L1PCJVhCL98Dinr6dJkYB7 cAVhfmW8PI51jiANExLZu8U5gnthj5CGv4428ODQgSoRI0demG3HmVCNrKdap+orhT8zRkq8 DuHTO01U7PKsfvQ2k8AqSAC/JjMOs1mpFe032IApXxlZkE+33Q3dE5BiJmICYg8hsRXvpKTm ZMCdNZJUQLq+XNpg6RtAPQIPMmCepXrE9M/KuH+jFS2G5+Hx5VBSM644E1G2i+HOPCVdHjof iaNi3V/ItEG3jw==
Message-ID: <841240ae-f610-dcf8-1e29-c73371ae976b@primekey.com>
Date: Mon, 29 Jun 2020 10:05:17 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <20595.1593377487@localhost>
Content-Type: text/plain; charset="utf-8"
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/secdispatch/8nVYX8x0rfO1THHcyCS3fBJDs9Y>
Subject: Re: [Secdispatch] [lamps] IDevID considerations document to secdispatch
X-BeenThere: secdispatch@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Security Dispatch <secdispatch.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/secdispatch>, <mailto:secdispatch-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/secdispatch/>
List-Post: <mailto:secdispatch@ietf.org>
List-Help: <mailto:secdispatch-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/secdispatch>, <mailto:secdispatch-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 29 Jun 2020 08:05:26 -0000

Hi,

On 2020-06-28 22:51, Michael Richardson wrote:
> 
> Thank you again for reviewing the document!
> 
> I know that primekey is involved in creating Birth Certificates for
> many product lines. (Your website's term, not mine, but a good
> one)

It wasn't my (ours) terminology unfortunately :-). We found it
elsewhere. I don't remember where "birth" came from. 3GPP 33.310 have
the same concept, but calling Vendor certificate. I think birth
certificate is a little better, as it's more generic than specifying a
vendor relationship.

> I wonder if you can comment on which of the three methods you
> support? Do you have any suggestions on names for the three
> methods? To me, just getting three good names is 90% of the value
> of this document.

We support:
2.1.1.  On-device private key generation
Standard CSR-submitted-to-CA  process
2.1.2.  Off-device private key generation
Typically CA-generates-keystore process. Some protocols, i.e.
CMP/RFC4210 have standard support for encrypting the private key sent
back to the client

2.1.3.  Key setup based on 256-bit secret seed
We haven't seen this. Albeit, it's not so much related to the PKI
part, so it can still be supported/used if the certificate issuance is
done using a CSR process to the CA.

> Thinking about "birth" concept, I am trying to think if this helps
> with terms. Invivo  <- self-generated private key, with
> enrollment. Invitro <- private key generated in test-tub, deployed
> to device.

Good idea to have naming for these. I like the idea. I don't have any
immediate ideas. Are there any naming from TMP/SE vendors/standards
that can be re-used? (I'm not very familiar with those specs myself).

> I also feel that I want to leverage the "digital twin" terminology
> a bit for the third case.
> 
> I suspect that there might also be some hybrid/fourth case that
> uses Threshold Modes in Elliptic Curves,
> draft-hallambaker-threshold-02 and while I think this would be an
> improvement on the security side of things, I also am concerned
> that it may make the manufacturing process worse.
> 
> In particular, the self-generated (_invivo_) key suffers because
> the device needs to do a write/read operation from the
> infrastructure.  That involves the highest possible latency for
> interaction with the CA and therefore would slow the assembly line
> the most.
> 
> The invitro and shared-secret methods allows the infrastructure to
> generate a few keys in advance (and get them signed, assigning
> DN-serialNumber at the same time), and then injecting that key via
> JTAG at the same time as the firmware.  This overlaps the CA
> interaction with other steps.
> 
> 
> Tomas Gustavsson <tomas.gustavsson@primekey.com> wrote:
>> On 2020-06-11 19:52, Michael Richardson wrote:
>>> 
>>> Tomas Gustavsson <tomas.gustavsson@primekey.com> wrote:
>>>> The notion of serialNumber in the document, for me, reads as
>>>> it's not clear what is the certificate serial number (9-19
>>>> bytes in your document) and the device serial number. There
>>>> don't have to be the same. What I have seen commonly used is
>>>> that the subjectDN field is used to carry the device serial
>>>> number, while the certificate serial number is random, and
>>>> only used to uniquely identify the certificate in the PKI
>>>> (issuer/serial).
>>> 
>>> Your assumption is entirely correct.  I wish that certificates 
>>> hadn't used "serial Number" in it's terminology, as it's
>>> really "certificate Identifier", and we have learnt the hard
>>> way that it should not be sequential.
>>> 
>>>> In such a case I would assume that the manufacturing
>>>> execution system (MES) and it's database controls the device
>>>> serial number, while the PKI controls the certificate serial
>>>> number, and there does not have to be any synchronization
>>>> between these two.
>>> 
>>> Agreed. Do I say something different here?  I would love to
>>> clarify things.
> 
>> This section confused me at first read: ----- In all cases the
>> serialNumber embedded in the certificate must be unique across
>> all products produced by the manufacturer. This suggests some
>> amount of structure to the serialNumber, such that different 
>> intermediate CAs do not need to coordinate when issuing
>> certificates -----
> 
>> At first read I thought about certificate serial number, but now 
>> realize it's the device serial number that is meant. I think
>> that section can be clarified somewhat.
> 
> okay, I will do that. I wish I had a good way to distinguish
> things.
> 
> "serialNumber" (in that case), is a used in RFC5280 as the field
> name of the "CertificateSerialNumber", I sure wish we could go back
> and change the name of the field to be "certificateIdentity"
> 
> The same document mentions "id-at-serialNumber" and
> X520SerialNumber! And in section 4.1.2.4 (Issuer) and 4.1.2.6
> (Subject), it uses the term "serial number"... and the usual
> rendering in a DN is that it is "serialNumber" (OID 2.5.4.5, I
> think it is)!
> 
> I will call it the "product DN-serialNumber". How does this strike
> you?

For me that is crystal clear. Nice.

> 
>> Some additional nitpicking... I think this section is missing an
>> 's'?
> 
> Do you mean the title? that it should be: ## Public Key
> infrastructure for IDevID -> ## Public Key infrastructure for
> IDevIDs
> 
>> ----- The intermediate CA will have a private key, likely kept
>> online, which is used to sign each generated IDevID. Once the
>> IDevID are created, the private key is no longer needed and can
>> either be destroyed, or taken offline. -----
> 
>> In the line preceding this section it talks about "some number
>> of IDevIDs". Then that the CAs private key can be destroyed
>> after generating that number if IDevIDs. Hence, just ad an s:
> 
> 
> 
>> "Once the IDevID are created, the private key is no longer needed
>> and can either be destroyed, or taken offline."
> ->
>> "Once the IDevIDs are created, the private key is no longer
>> needed and can either be destroyed, or taken offline."
> 
> I think I found all the missing s, and one case where it should be
> CAs' rather than CA's.
> 
> see commit/diff: 
> https://github.com/mcr/idevid-security-considerations/commit/84fa9fad74d9b2d950b061a4fa5bf3fe99443472?short_path=77f5cdf#diff-77f5cdfefb38aca78416645deaa3310e
>
> 
> 
> -- ]               Never tell me the odds!                 | ipv6
> mesh networks [ ]   Michael Richardson, Sandelman Software Works
> |    IoT architect   [ ]     mcr@sandelman.ca
> http://www.sandelman.ca/        |   ruby on rails    [
> 
> 
> 
>