Subject: [Anima] Feedback on constrained-voucher example certificates (in Github / -09 )

From: Esko Dijk <[email-masked]>
Date: Tue, 17 Nov 2020 10:12:26 +0000

Hello Peter,

I did my review of the new example certificates in Github. Below my feedback. Because examples are used in the constrained-voucher draft Appendix C, I include all authors in this email.

pledge-cert.txt / pledge-cert.hex (https://github.com/anima-wg/constrained-voucher/blob/master/examples/pledge-cert.txt) :

  *   The X509v3 extension ‘subjectKeyIdentifier’ should not be included according to the 802.1AR-2009 spec section 7.2.6 (for IDevID/LDevID).  Reason is that this value in an EE certificate is never used for chain building; it’s unnecessary bytes effectively.  Only CA certs do need this extension.
  *   The X509v3 extension ‘keyUsage’ is present, and is allowed per the 802.1AR-2009 spec section 7.2.13 , however looking at the 802.1AR text there it basically says restrictions of key usage shouldn’t be necessary for an IDevID – it can be used for any purpose whether defined today or in the future. (Up to the year 9999 at least :-) )
BRSKI-45 also writes “therefore RECOMMENDS that no key usage restrictions be included” for IDevID.

masa-cert.txt / masa-cert.hex (https://github.com/anima-wg/constrained-voucher/blob/master/examples/masa-cert.txt) :

  *   the validity (1 year) seems a little short for a manufacturing root CA.  3, 5, 7, or 10 years I would expect to be more usual for such a CA.
  *   Of course a Pledge stores this root CA cert in its trust store for the entire device lifetime, and will keep using it during this lifetime. Even if that root CA cert expired and the Pledge has a realtime clock so it *could* verify expiry in principle. But it will not do that, because the cert is hardcoded in its trust store. So I’m not sure if the validity of it has any impact in practice; it seems not.
  *   Side note 1: the MASA will need to sign Vouchers with this root CA identity , for many years to come,  and in the meantime the root CA cert may expire and MASA may be given a renewed root CA cert that uses the same public/private keypair.  The latter – using same keypair - ensures that ‘older’ Pledges can still recognize the signer and so accept these newer Vouchers. So the MASA’s root CA cert validity period will impact how often the cert needs to be renewed – all the time using the same pub/private keypair – and that seems to be all.
  *   Side note 2: one can also have a MASA signing the Vouchers using an expired root CA cert/identity.  The Registrar and the Pledges won’t mind.
  *   Side note 3: another easy way out of this is to give the MASA root CA certificate also a very long / infinite lifetime just like the IDevID.

registrar-cert.txt / registrar-cert.hex (https://github.com/anima-wg/constrained-voucher/blob/master/examples/registrar-cert.txt)

  *   (Looks ok)

pledge-to-regis.txt  (https://github.com/anima-wg/constrained-voucher/blob/master/examples/pledge-to-regis.txt)

  *   Looks like this should be a .hex file! Not .txt.
  *   (May consider a filename like ‘pledge-to-regis.cbor.hex’ to indicate it is hex-format CBOR binary)
  *   Similar comment for the other ‘x-to-y’ .txt files.
  *   I will review the contents of these files later on!

Best regards
Esko

IoTconsultancy.nl  |  Email/Teams: [email-masked]

---

From: Peter van der Stok <[email-masked]>
Date: Tue, 17 Nov 2020 11:53:31 +0100

Hi Esko,

many thanks,

This week I will react. Many of the recommendations look quite viable.

Peter

Esko Dijk schreef op 2020-11-17 11:12:

> * The X509v3 extension 'subjectKeyIdentifier' should not be included according to the 802.1AR-2009 spec section 7.2.6 (for IDevID/LDevID).  Reason is that this value in an EE certificate is never used for chain building; it's unnecessary bytes effectively.  Only CA certs do need this extension.
> 
> * The X509v3 extension 'keyUsage' is present, and is allowed per the 802.1AR-2009 spec section 7.2.13 , however looking at the 802.1AR text there it basically says restrictions of key usage shouldn't be necessary for an IDevID - it can be used for any purpose whether defined today or in the future. (Up to the year 9999 at least :-) )
> BRSKI-45 also writes "therefore RECOMMENDS that no key usage restrictions be included" for IDevID. 
> 
> * Of course a Pledge stores this root CA cert in its trust store for the entire device lifetime, and will keep using it during this lifetime. Even if that root CA cert expired and the Pledge has a realtime clock so it *could* verify expiry in principle. But it will not do that, because the cert is hardcoded in its trust store. So I'm not sure if the validity of it has any impact in practice; it seems not.
> * Side note 1: the MASA will need to sign Vouchers with this root CA identity , for many years to come,  and in the meantime the root CA cert may expire and MASA may be given a renewed root CA cert that uses the same public/private keypair.  The latter - using same keypair - ensures that 'older' Pledges can still recognize the signer and so accept these newer Vouchers. So the MASA's root CA cert validity period will impact how often the cert needs to be renewed - all the time using the same pub/private keypair - and that seems to be all.
> * Side note 2: one can also have a MASA signing the Vouchers using an expired root CA cert/identity.  The Registrar and the Pledges won't mind.
> * (May consider a filename like 'pledge-to-regis.cbor.hex' to indicate it is hex-format CBOR binary)
> * Similar comment for the other 'x-to-y' .txt files.
> _______________________________________________
> Anima mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/anima

---

From: Esko Dijk <[email-masked]>
Date: Wed, 18 Nov 2020 14:50:50 +0000

PS one more remark on the Registrar certificate:  per BRSKI, the Registrar must have the id-kp-cmcRA extension in its certificate to make it a Registration Authority (RA). As defined in https://tools.ietf.org/html/rfc6402#section-2.10.
I did not see this in the certificate.  In principle, the Pledge could reject the Registrar as not-valid EST server for this reason (per RFC 7030) and the MASA will reject the Registrar (per BRSKI).

Esko

From: Esko Dijk
Sent: Tuesday, November 17, 2020 11:12
To: 'peter van der Stok' <[email-masked]>; Michael Richardson <[email-masked]>; Panos Kampanakis (pkampana <[email-masked]>
Cc: [email-masked]
Subject: Feedback on constrained-voucher example certificates (in Github / -09 )

Hello Peter,

  *   (Looks ok)

Best regards
Esko

IoTconsultancy.nl  |  Email/Teams: [email-masked]<mailto:[email-masked]>

---

From: Peter van der Stok <[email-masked]>
Date: Fri, 20 Nov 2020 09:33:19 +0100

Hi Esko,

Many thanks. Just what I need for comfort.

I did change my openssl config files as you suggested. The EKU has been
added for the masa and the registrar.
But its value.......? it is now TLS web server

The life time of the masa certificate is 1000 days; that will do in my
opinion for an example.
The life time of the registrar is unchanged 1 year.

Attributes of pledge certificate have been removed.

Concerning .txt or .hex extensions; I will leave them as they are for
the moment.

In a few days I will put them in the github. But that necessitates also
some editing of the openssl output to conform to 72 character limits.

Cheerio,

peter
Esko Dijk schreef op 2020-11-18 15:50:

---

From: Esko Dijk <[email-masked]>
Date: Fri, 20 Nov 2020 08:52:17 +0000

Thanks Peter,

FYI I use the following x509v3 extensions file in OpenSSL to set the ‘RA’ flag in EKU:

authorityKeyIdentifier=keyid
subjectKeyIdentifier=hash
basicConstraints=CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
extendedKeyUsage = 1.3.6.1.5.5.7.3.28, serverAuth, clientAuth

# see https://tools.ietf.org/html/rfc6402#section-2.10
# see https://www.openssl.org/docs/man1.1.1/man5/x509v3_config.html
# see http://oidref.com/1.3.6.1.5.5.7.3.28

Esko

From: Peter van der Stok <[email-masked]>
Sent: Friday, November 20, 2020 09:33
To: Esko Dijk <[email-masked]>
Cc: [email-masked]; Michael Richardson <[email-masked]>; Panos Kampanakis (pkampana <[email-masked]>; [email-masked]
Subject: Re: [Anima] Feedback on constrained-voucher example certificates (in Github / -09 )

Hi Esko,

I did change my openssl config files as you suggested. The EKU has been added for the masa and the registrar.
But its value.......? it is now TLS web server

The life time of the masa certificate is 1000 days; that will do in my opinion for an example.
The life time of the registrar is unchanged 1 year.

Concerning .txt or .hex extensions; I will leave them as they are for the moment.

In a few days I will put them in the github. But that necessitates also some editing of the openssl output to conform to 72 character limits.

Cheerio,

peter

Esko

From: Esko Dijk
Sent: Tuesday, November 17, 2020 11:12
To: 'peter van der Stok' <[email-masked]<mailto:[email-masked]>>; Michael Richardson <[email-masked]<mailto:[email-masked]>>; Panos Kampanakis (pkampana <[email-masked]<mailto:[email-masked]>>
Cc: [email-masked]<mailto:[email-masked]>
Subject: Feedback on constrained-voucher example certificates (in Github / -09 )

Hello Peter,

  *   The X509v3 extension 'subjectKeyIdentifier' should not be included according to the 802.1AR-2009 spec section 7.2.6 (for IDevID/LDevID).  Reason is that this value in an EE certificate is never used for chain building; it's unnecessary bytes effectively.  Only CA certs do need this extension.
  *   The X509v3 extension 'keyUsage' is present, and is allowed per the 802.1AR-2009 spec section 7.2.13 , however looking at the 802.1AR text there it basically says restrictions of key usage shouldn't be necessary for an IDevID – it can be used for any purpose whether defined today or in the future. (Up to the year 9999 at least :-) )
BRSKI-45 also writes "therefore RECOMMENDS that no key usage restrictions be included" for IDevID.

  *   Side note 1: the MASA will need to sign Vouchers with this root CA identity , for many years to come,  and in the meantime the root CA cert may expire and MASA may be given a renewed root CA cert that uses the same public/private keypair.  The latter – using same keypair - ensures that 'older' Pledges can still recognize the signer and so accept these newer Vouchers. So the MASA's root CA cert validity period will impact how often the cert needs to be renewed – all the time using the same pub/private keypair – and that seems to be all.

  *   (Looks ok)

Best regards

Esko

_______________________________________________
Anima mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/anima