Subject: [urn] Informal NID registration interest

From: Kate Gray <[email-masked]>
Date: Sun, 28 Mar 2021 09:01:48 +0000

Hello,

I am interested in registering an informal NID for URNs.

I have attempted to fill out the template as requested.  I apologize if I screwed up somewhere; this is my first time doing this.

Namespace Identifier: Assigned by IANA (informal)

Version: 1

Date: 2021-03-28

Registrant:
    Kate Gray <kate&codebykate.com>
    340 S Lemon Ave #5926
    Walnut, CA 91789 USA

Purpose:
    The purpose of this NID is to provide a Uniform Resource Name representing
    derived keys within a card issuance scheme.  Specifically, they provide a
    path within a hierarchal tree representing implementers (referred to as
    tenants within the system), card issuers (e.g. Universities), optional sub-
    issuers (e.g. Departments), and individual keys within a card (used for
    different purposes).

    These URNs will be used by card manufacturers (to preload data for issuers),
    as well as issuers and users to refer to the cards and keys throughout the
    card lifecycle.  Good security practices require the use of diversified
    (per-card) keys, so that an attacker who defeats the security on a card will
    not have the keys required to attack other cards within the system.

    A cryptographic module (generally a smart card) can be pre-provisioned with
    the issuer keys, and the URN for a given key provided to it.  With this
    information and cryptographic keying material, the appropriate keys can be
    derived, without the host needing to know the issuer keys.

    While this URN will be implemented into software (including open source
    software), and published to permit others within the industry to
    interoperate, it is not expected to become a formal standard, or to be
    publicly resolvable.  The general use will be between actors in a card
    issuance scheme, for purposes like enabling a vending machine to derive a
    balance update key for a stored balance wallet on a card, or for a help
    desk agent to determine the Personal Unblocking Key (PUK) for a user that
    has lost their PIN.

Syntax:

  All URNs defined under the namespace have the following structure,
  specified in RFC 7405 ABNF notation[1]:

    NSS                = %s"urn:" NID ":" TenantId "@" TenantVersion ":"
                         IssuerId "@" IssuerVersion ":" Purpose "@"
                         PurposeVersion "/" ResourceId "@" ResourceKeyVersion
    NID                = "urn" - DIGIT
    TenantId           = 3*(label)
    TenantVersion      = version
    IssuerId           = 3*(label) / 3*(label) ":" 3*(label) / 3*(label) ":" 3*(label) ":" 3*(label)
    IssuerVersion      = version
    Purpose            = 3*(alphanum / other)
    PurposeVersion     = version
    ResourceId         = 1*(alphanum / other)
    ResourceKeyVersion = version
    label              = loalpha / loalpha *(alphanum / "-") alphanum
    version            = 2*2(HEXDIG)
    alphanum           = loalpha / DIGIT
    loalpha            = %x61-7A
    other              = "-" / "_"

    As the full string of the URN is used as an input to the Key Derivation
    Function, equivalent URNs are impossible.  As such, the equivalency rules
    consist of bit-by-bit comparisons (Simple String Comparison).

Assignment:

    Registration within this NID is private.

    Implementers will register a Tenant ID, and be responsibile for issuers and
    sub-issuers within their card issuance tenancy.  The web site will be
    responsible for ensuring that Tenant IDs are unique.

    Uniqueness will be guaranteed through a combination of statistical and
    database-based methods.  For example, when issuing management for PIV cards,
    the keying material used incudes a UUID that is guaranteed mathematically to
    be unique.  In contrast, when deriving GlobalPlatform keys (which use a 10
    byte unique ID for the card), issuers will be responsible for keeping a
    record of all such cards issued and ensuring there are no duplicate IDs.

    Because each issuer is at a unique path within the hierarchal tree,
    uniqueness is guaranteed as long as they take care not to issue duplicate
    cards within their own subtree.

Security and Privacy:

    As these identifiers will be used in the generation of cryptographic keys,
    their opacity does serve to provide a degree of "security through obscurity"
    for attackers looking to compromise the cards.  The loss of that obscurity
    (for example, if an attacker is able to find a users card ID in the browser
    history) in theory represents a slight loss of security for the user.

    Keys for this system will be stored in Hardware Security Modules (HSMs), and
    configured such that the actual keying material for that level never leaves
    the cryptographic envelope.  Through the use of hash functions that provide
    strong cryptographic guarantees, and hardware security on the keys
    themselves, there is no need for the identifiers to be private, and no risk
    to the user should an attacker somehow gain access to his identifier without
    having additionally compromised the HSM or a machine connected to the HSM.

    In a broader sense, the point of this card issuance scheme is to facilitate
    the issuance of privacy-protecting and security-enhancing credentials to
    individuals within organizations.  Such cards permit strong authentication,
    as well as multi-factor logins that are resistant to phishing and which
    enable mutual authentication from the server level.  As such, the net effect
    on Privacy and Security will be positive.

Interoperability:

    The author is not aware of any potential conflicts with this namespace, and
    given the rather tightly coupled nature of the identifier with the
    implementation, any overlapping areas of concern for other systems should
    not present interoperability issues, as there will be no operability.

Resolution:

    Resolution mechanisms are not intended or anticipated for this namespace.

---

From: Ted Hardie <[email-masked]>
Date: Mon, 29 Mar 2021 14:50:02 +0000

Howdy,

Thanks for submitting the registration.  I have a couple of questions,
inline below.

On Sun, Mar 28, 2021 at 3:05 PM Kate Gray <[email-masked]> wrote:

> I have attempted to fill out the template as requested.  I apologize if I
> screwed up somewhere; this is my first time doing this.
>

To confirm my understanding here:  the TenantId is associated with the
software writer who went to the website and requested a new ID.  That
implementer then manages the uniqueness of the TenantVersion, the IssuerId,
and IssuerVersion of the NSS.  The latter two are managed by ensuring that
each IssuerID minted goes only to a single organization? Is that correct?

>     label              = loalpha / loalpha *(alphanum / "-") alphanum

I am not sure that I understand the ABNF of "label".  According to section
3.6 of RFC 5234, * without a minimum or maximum bound can include zero of
the following element.  That appears to mean that loalpha alphanum would be
a legal result.  Is that intended, or is the "-" always present?

>     responsible for ensuring that Tenant IDs are unique.
Can you specify the website which will issue them?  As written, it might be
misread to imply that someone else could set up a website to issue these,
which could result in collisions.

>     record of all such cards issued and ensuring there are no duplicate

GlobalPlatform keys do not appear to be referenced in the ABNF above.  Are
these a sub type of the ResourceID?  If so, given these examples, is 1
really the minimum number of characters for a ResourceID?

> Evaluating the system described is beyond the scope of the URN review
process, but I will say that the description above seems to place a great
deal of stress on the HSM and not much on what other inputs the hash
function has and what properties are available to update the hash function
used.  If you desire such a review, I believe the IETF security area
advisory group ([email-masked]) could provide that.

>     Resolution mechanisms are not intended or anticipated for this

Thanks again for submitting the registration.

regards,

Ted Hardie

> _______________________________________________
> urn mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/urn
>

---

From: Kate Gray <[email-masked]>
Date: Tue, 30 Mar 2021 07:42:20 +0000

From: Kate Gray <[email-masked]>
Sent: Monday, March 29, 2021 1:40 PM
To: Ted Hardie <[email-masked]>
Subject: Re: [urn] Informal NID registration interest

Answers inline.

________________________________
From: Ted Hardie <[email-masked]>
Sent: Monday, March 29, 2021 10:50 AM
To: Kate Gray <[email-masked]>
Cc: [email-masked] <[email-masked]>
Subject: Re: [urn] Informal NID registration interest

Howdy,

Thanks for submitting the registration.  I have a couple of questions, inline below.

On Sun, Mar 28, 2021 at 3:05 PM Kate Gray <[email-masked]<mailto:[email-masked]>> wrote:
Hello,

Version: 1

Date: 2021-03-28

Registrant:
    Kate Gray <kate&codebykate.com<http://codebykate.com/>>
    340 S Lemon Ave #5926
    Walnut, CA 91789 USA

Purpose:

Syntax:

To confirm my understanding here:  the TenantId is associated with the software writer who went to the website and requested a new ID.  That implementer then manages the uniqueness of the TenantVersion, the IssuerId, and IssuerVersion of the NSS.  The latter two are managed by ensuring that each IssuerID minted goes only to a single organization? Is that correct?

The tenantID is associated with the implementer of the card issuance scheme.  It's functionally similar to a persistent domain name, issued without charge and in perpetuity.

The implementer may be a commercial entity, a standards body, or a parent organization of some sort.  For example, an organization like the UC system might wish to run their own tenant, with issuer keys given to each particular university within the system.

The term tenant is used within the scheme because it's intended to allow key management software to create separate trees in much the way that Gmail and Office 365 have separate tenants within their hosted email solutions.  Allowing a single piece of software to have multiple tenants allows for organizational flexibility in terms of division of responsibility.

I am not sure that I understand the ABNF of "label".  According to section 3.6 of RFC 5234, * without a minimum or maximum bound can include zero of the following element.  That appears to mean that loalpha alphanum would be a legal result.  Is that intended, or is the "-" always present?

The intent is that the first character in the label must be lowercase alpha.  After that, alpha numeric may be used.  Dashes may be present, but if present, must be followed by at least one alpha numeric character.

    version            = 2*2(HEXDIG)

Assignment:

Can you specify the website which will issue them?  As written, it might be misread to imply that someone else could set up a website to issue these, which could result in collisions.

Tenant IDs will be registered, free of charge, through the website "credentsys.cloud".

GlobalPlatform keys do not appear to be referenced in the ABNF above.  Are these a sub type of the ResourceID?  If so, given these examples, is 1 really the minimum number of characters for a ResourceID?

That was intended as an example.  Different applets and card types provide different identifiers.  GlobalPlatform (the most common type of key) only allows 10 characters for derivation.  The goal is to ultimately be platform agnostic.

Security and Privacy:

Evaluating the system described is beyond the scope of the URN review process, but I will say that the description above seems to place a great deal of stress on the HSM and not much on what other inputs the hash function has and what properties are available to update the hash function used.  If you desire such a review, I believe the IETF security area advisory group ([email-masked]<mailto:[email-masked]>) could provide that.

Thank you for the recommendation.

Interoperability:

Resolution:

regards,

Ted Hardie

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

________________________________
From: Ted Hardie <[email-masked]>
Sent: Monday, March 29, 2021 10:50 AM
To: Kate Gray <[email-masked]>
Cc: [email-masked] <[email-masked]>
Subject: Re: [urn] Informal NID registration interest

Howdy,

Thanks for submitting the registration.  I have a couple of questions, inline below.

On Sun, Mar 28, 2021 at 3:05 PM Kate Gray <[email-masked]<mailto:[email-masked]>> wrote:
Hello,

Version: 1

Date: 2021-03-28

Registrant:
    Kate Gray <kate&codebykate.com<http://codebykate.com>>
    340 S Lemon Ave #5926
    Walnut, CA 91789 USA

Purpose:

Syntax:

To confirm my understanding here:  the TenantId is associated with the software writer who went to the website and requested a new ID.  That implementer then manages the uniqueness of the TenantVersion, the IssuerId, and IssuerVersion of the NSS.  The latter two are managed by ensuring that each IssuerID minted goes only to a single organization? Is that correct?

I am not sure that I understand the ABNF of "label".  According to section 3.6 of RFC 5234, * without a minimum or maximum bound can include zero of the following element.  That appears to mean that loalpha alphanum would be a legal result.  Is that intended, or is the "-" always present?

    version            = 2*2(HEXDIG)

Assignment:

Can you specify the website which will issue them?  As written, it might be misread to imply that someone else could set up a website to issue these, which could result in collisions.

GlobalPlatform keys do not appear to be referenced in the ABNF above.  Are these a sub type of the ResourceID?  If so, given these examples, is 1 really the minimum number of characters for a ResourceID?

Security and Privacy:

Evaluating the system described is beyond the scope of the URN review process, but I will say that the description above seems to place a great deal of stress on the HSM and not much on what other inputs the hash function has and what properties are available to update the hash function used.  If you desire such a review, I believe the IETF security area advisory group ([email-masked]<mailto:[email-masked]>) could provide that.

Interoperability:

Resolution:

regards,

Ted Hardie

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

---

From: Ted Hardie <[email-masked]>
Date: Tue, 30 Mar 2021 10:46:08 +0000

Thanks for the reply.  Some additional comments below.

On Tue, Mar 30, 2021 at 8:42 AM Kate Gray <[email-masked]> wrote:

> *From:* Kate Gray <[email-masked]>
> *Sent:* Monday, March 29, 2021 1:40 PM
> *To:* Ted Hardie <[email-masked]>
> *Subject:* Re: [urn] Informal NID registration interest
>
> Answers inline.
>
> ------------------------------
> *From:* Ted Hardie <[email-masked]>
> *Sent:* Monday, March 29, 2021 10:50 AM
> *To:* Kate Gray <[email-masked]>
> *Cc:* [email-masked] <[email-masked]>
> *Subject:* Re: [urn] Informal NID registration interest
>
> Howdy,
>
> The tenantID is associated with the implementer of the card issuance
> scheme.  It's functionally similar to a persistent domain name, issued
> without charge and in perpetuity.
>
> The implementer may be a commercial entity, a standards body, or a parent
> organization of some sort.  For example, an organization like the UC system
> might wish to run their own tenant, with issuer keys given to each
> particular university within the system.
>
> The term tenant is used within the scheme because it's intended to allow
> key management software to create separate trees in much the way that Gmail
> and Office 365 have separate tenants within their hosted email solutions.
> Allowing a single piece of software to have multiple tenants allows for
> organizational flexibility in terms of division of responsibility.
>
>
>
>
> The intent is that the first character in the label must be lowercase
> alpha.  After that, alpha numeric may be used.  Dashes may be present, but
> if present, must be followed by at least one alpha numeric character.
>
>
I suspect we need to get a full ABNF review here, because I don't think
this ABNF matches your intent (if there must be a loalpha to start, I
believe you need "1*loalpha" followed by the alternatives, for example).
I'm also a little confused by the TenantId and IssuerId construct, because
"3*label" means that there is a minimum of 3 labels.  Because there is no
delimiter between the labels in that construct, it would be hard to
identify where the label boundaries are. That is, I think if someone
presented a TenantId like this:

aXaaa-YbbbGGa

"aX" could be a label but "aXa" could as well, so it is not clear where the
label boundary is.  On the other hand, if your intent is to say that these
labels must be a minimum of 3 characters long,  it is probably easier to
define that within  the "label" rule.

If you use the verification tools here:
https://tools.ietf.org/inventory/verif-tools (e.g. Eustathius or abnfgen),
do the productions match what you expect?

> Can you specify the website which will issue them?  As written, it might
> be misread to imply that someone else could set up a website to issue
> these, which could result in collisions.
>
>
Thank you; I suggest that the template include this information.

> That was intended as an example.  Different applets and card types provide
> different identifiers.  GlobalPlatform (the most common type of key) only
> allows 10 characters for derivation.  The goal is to ultimately be platform
> agnostic.
>

It might be useful to note that this is an example in the template.  I
would also be surprised if a single character could be useful ID, but if
this is your preferred minimum, it is up to you.

> Thank you for the recommendation.
Thanks again for your reply and registration.

best regards,

Ted Hardie

> ------------------------------
> *From:* Ted Hardie <[email-masked]>
> *Sent:* Monday, March 29, 2021 10:50 AM
> *To:* Kate Gray <[email-masked]>
> *Cc:* [email-masked] <[email-masked]>
> *Subject:* Re: [urn] Informal NID registration interest
>
> Howdy,
>
> Can you specify the website which will issue them?  As written, it might
> be misread to imply that someone else could set up a website to issue
> these, which could result in collisions.
>
>

---

From: Kate Gray <[email-masked]>
Date: Tue, 30 Mar 2021 11:40:02 +0000

Responses also below.

Sent: Tuesday, March 30, 2021 6:46 AM

On Tue, Mar 30, 2021 at 8:42 AM Kate Gray <[email-masked]<mailto:[email-masked]>> wrote:
From: Kate Gray <[email-masked]<mailto:[email-masked]>>
Sent: Monday, March 29, 2021 1:40 PM
To: Ted Hardie <[email-masked]<mailto:[email-masked]>>
Subject: Re: [urn] Informal NID registration interest

Answers inline.

________________________________
From: Ted Hardie <[email-masked]<mailto:[email-masked]>>
Sent: Monday, March 29, 2021 10:50 AM
To: Kate Gray <[email-masked]<mailto:[email-masked]>>
Cc: [email-masked]<mailto:[email-masked]> <[email-masked]<mailto:[email-masked]>>
Subject: Re: [urn] Informal NID registration interest

Howdy,

Version: 1

Date: 2021-03-28

Registrant:

Purpose:

Syntax:

I suspect we need to get a full ABNF review here, because I don't think this ABNF matches your intent (if there must be a loalpha to start, I believe you need "1*loalpha" followed by the alternatives, for example).  I'm also a little confused by the TenantId and IssuerId construct, because "3*label" means that there is a minimum of 3 labels.  Because there is no delimiter between the labels in that construct, it would be hard to identify where the label boundaries are. That is, I think if someone presented a TenantId like this:

aXaaa-YbbbGGa

"aX" could be a label but "aXa" could as well, so it is not clear where the label boundary is.  On the other hand, if your intent is to say that these labels must be a minimum of 3 characters long,  it is probably easier to define that within  the "label" rule.

That is a mistake, and I will correct it before the next version of the application.  The intent is that a label needs to be 3 or more characters, can't start or end with a hypen, and the rest is alphanumeric.  Tenant IDs should always be present between colons.

The issuer ID can be a single label, or a subtree which consists of label:label, or label:label:label.  Tenants can not be compound like that.

If you use the verification tools here: https://tools.ietf.org/inventory/verif-tools (e.g. Eustathius or abnfgen), do the productions match what you expect?

I didn't see anything amiss with abnfgen, but I can see I have more work to do on this one.  Thank you for catching that.

    version            = 2*2(HEXDIG)

Assignment:

I will add this.

It might be useful to note that this is an example in the template.  I would also be surprised if a single character could be useful ID, but if this is your preferred minimum, it is up to you.

It's surprisingly a useful ID, and that particular design choice was not an accident (unlike the mistakes with the ABNF earlier).  There are situations in which keys are numbered sequentially for purposes of issuance.  Semantically, this is not a new version of a key (which could be accommodated with the version flag), but a new key.  Unlike a version change, the possibility exists that multiple keys will be used simultaneously.  Generally, with key versioning, a new version invalidates all previous keys for new operations moving forward.

With HSMs, the certificates are generally separate from the keys, and so it can make sense to represent a key in isolation from a certificate.  The same can be true on cards, where the secrets may be generated prior to issuance.  In other words, a URN need to represent something that's simply the Nth key in a sequence.

Here's a sample of what that might look like in practice:

urn:urn-8:kategray@01:hsmpool-04:hsm-02@01:puk@01/1@01?+len=08:truncate=oath

The intended parsing on this would be that the version numbers are all 1.  The tenant in this case would
be "kategray", and the resolver would know to act accordingly.  The issuer would be "hsmpool-04:hsm-02", which is a second level issuer.

Derivation could start at the "kategray" secret, deriving the secret for "hsmpool-04", and using that to derive the secret for "hsm-02", and using that to derive the puk key, which is then used to derive key #1 (representing the first card issued by hsm-02, for example).  If the key needed to be replaced on the card, its version number would be incremented to 2, with 1@2 representing a very different key from 2@1.

Alternatively, the resolver could store the hsmpool-04 secret, and derive the rest of the chain starting there.  Or, the resolver might only have the hsm-02 key, or even just the puk key.  Any of those would work, as the chain works its way down from the root.  In fact, if the resolver cached or stored it, it could even have /just/ that key #1.

Finally, the r component (which is not part of the standard at this point in time) provides hints to the resolver to how to use the SHA256 key.  In this case, it would be to take the SHA256 derived key, use the OATH truncation algorithm, and truncate it down to 8 digits.

In short, that URN would represent the way to get the Personal Unlock Key (PUK) for card #1, both how to derive the secret and how to format it for a particular use.  The same key may be formatted in different ways (for example, binary coded decimal, padded to different lengths, hex, etc.), so allowing resolver specific parameters provides a degree of flexibility in different systems while still semantically representing the same underlying key.

Security and Privacy:

best regards,

Ted Hardie

Interoperability:

Resolution:

regards,

Ted Hardie

________________________________
From: Ted Hardie <[email-masked]<mailto:[email-masked]>>
Sent: Monday, March 29, 2021 10:50 AM
To: Kate Gray <[email-masked]<mailto:[email-masked]>>
Cc: [email-masked]<mailto:[email-masked]> <[email-masked]<mailto:[email-masked]>>
Subject: Re: [urn] Informal NID registration interest

Howdy,

Version: 1

Date: 2021-03-28

Registrant:

Purpose:

Syntax:

    version            = 2*2(HEXDIG)

Assignment:

Security and Privacy:

Interoperability:

Resolution:

regards,

Ted Hardie