Subject: [netconf] Supported algorithms lists

From: Kent Watsen <[email-masked]>
Date: Thu, 13 Feb 2020 17:23:22 +0000

All,

We had a discussion awhile back about split/move-ing the 3 “supported algorithm” lists into the SSH- and TLS- client-server drafts (a total of 6 lists when done).  The thinking was SSH and TLS might (perhaps likely?) support different algorithms, which would be good to capture.

That said, we noted that this was a compromise as there may be more than one SSH or TLS library used by an application, and thus having protocol-specific lists may be too  course (compared to library-specific lists).

I’m wondering if we can do better and maybe even simpler…

One idea is to stick with having a single list per algorithm type (i.e., symmetric, asymmetric, hash, etc.), but then to allow each list item to contain a list of *where* that algorithm can be used.   In the simplest case, the “where it can be used” could be enumerated values (“SSH”, “TLS”) but perhaps better could be a list of XPaths?

However this seems a bit upside-down, as what would likely be preferred is to have a list of XPaths and then, for each, as list of supported algorithms.     Better, but messy, but it suggests a 3rd idea, which is to have an RPC that takes an XPath (to a key) and returns the list of supported algorithms for that key.

	rpc get-support-algorithms {
	   input {
	      leaf schema-path {
	         type string;
	         description
	            “Schema path to a ‘key’ node.”;
	      }
	   }
	   output {
	      choice key-type {
	         case symmetric-key {
	            leaf-list symmetric-algorithm {
                       type symmetric-algorithm-type;
                    }
	         }
	         case asymmetric-key {
	            leaf-list asymmetric-algorithm {
                       type symmetric-algorithm-type;
                    }
	         }
	      }
	   }
	}

This seems elegant as the implementation complexity scales with the complexity of the application.  An application that uses only a single crypto library could have a fairly static response, whereas complex applications could vary the response by the path (knowing which crypto library would be used).

Thoughts?

Kent // contributor

---

From: "Salz, Rich" <[email-masked]>
Date: Thu, 13 Feb 2020 18:48:33 +0000

> it suggests a 3rd idea, which is to have an RPC that takes an XPath (to a key) and returns the list of supported algorithms for that key.
   
I could be confused, but I don't know if this is a good idea.  Suppose I have an RSA keypair; would I expect to get back every TLS 1.2 ciphersuite name that has RSA in it?  There are around 30.  And for TLS 1.3, where the identity is broken out separately from the bulk encryption -- the so-called "a la carte" approach -- it becomes rather difficult.

---

From: Kent Watsen <[email-masked]>
Date: Fri, 14 Feb 2020 01:06:14 +0000

Hi Rich,  good to see you’re keeping us honest here ;)

> I could be confused, but I don't know if this is a good idea.  Suppose I have an RSA keypair; would I expect to get back every TLS 1.2 ciphersuite name that has RSA in it?  There are around 30.  An…

That’s not quite what I had envisioned, but you may be onto something nonetheless.

Regarding the proposed idea, first note that the intent is that the desire to know what algorithms are supported is mostly to either 1) ask the device to generate and key or 2) know what kind of key could be generated offline and subsequently loaded onto the device.  In either case, it’s not so much that you *have* an RSA keypair, but that you wish to generate a one.

To give a concrete example, assume the data model illustrated by tree diagram here: https://tools.ietf.org/html/draft-ietf-netconf-restconf-client-server-17#appendix-A.2 <https://tools.ietf.org/html/draft-ietf-netconf-restconf-client-server-17#appendix-A.2>.  The RPC might be:

 <rpc message-id="101"
     xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
     <get-supported-algorithms xmlns="urn:ietf:params:xml:ns:yang:ietf-crypto-types>
       <schema-path>
          /restconf-server/listen/endpoint/transport/https/tls-server-parameters/server-identty/...
       </schema-path>
     </get-supported-algorithms>
   </rpc>

So it’s clear that the intent that the key is intended for TLS (not SSH).  That said, and to your point, it doesn’t indicate if for TLS 1.2 or 1.3 and, worse, if the path instead references a keystore path (e.g., /keystore/asymmetric-keys/asymmetic-key/…), it’s not even clear that the key is intended for TLS or SSH…

In contrast, the current/planned/old approach described in my previous message, whereby there would be a list per protocol (TLS vs SSH), also did not take into account protocol versions (1.2 vs 1.3).  So, if this is an issue, we have no proposal addressing it yet...

How does OpenSSL CLI support this?  Looking at `openssl ciphers`, I see that it’s possible to specific protocol versions (i.e., 1.2, 1.3, etc.).   But, in the end, these are cipher suites (e.g., ECDHE-RSA-AES128-GCM-SHA256), not just the algorithm (RSA) and definitely not indicating supported key lengths (presumable all RSA key lengths are supported?)...

It would help if we could identify the CLI-equivalent for all this…

PS: both the SSH and TLS client-server draft create mapping tables between the protocol-specific cipher-suite names and to the algorithm names in crypto-types.  For instance, here are the mapping tables for TLS: https://tools.ietf.org/html/draft-ietf-netconf-tls-client-server-17#section-5.

PPS: I’m beginning to think that we might be better giving up on having any RPC to ask the server to generate keys or indicate which algorithms are supported, punting all this complexity to some future revision.  That said, it would be best is we could get something passable working now, if possible...

Thanks,
Kent. // contributor

---

From: Kent Watsen <[email-masked]>
Date: Mon, 17 Feb 2020 23:15:12 +0000

All,

TL;RD;, I’m back to thinking that the RPCs are best.

See below for an addendum.

Kent  // contributor

> On Feb 13, 2020, at 8:06 PM, Kent Watsen <[email-masked]> wrote:
> 
> 

Regarding the algorithms being protocol sensitive (e.g., 1.2 vs 1.3), in lieu of not finding a way to do this in CLI, this appears to be a non-issue.

Regarding XPaths pointing to keys in Keystore, we need only declare them as unsupported (i.e., an error should be returned).  While the key MAY be configured to Keystore, the important part is to know where it is *used* (i.e., the XPath would be to a leafref pointing to the Keystore elsewhere in the configuration, per the original response above).

Note that misconfigurations are still possible.  For instance, someone could point a leafref to an already created yet incompatible key in the keystore.  It is expected that errors arising from such incompatibilities would be detected when the configuration is applied/committed.

PS: I’m preparing a multi-draft update that will include this idea (and every other discussed since IETF 106).  This update will most likely be used for the first WGLC on the three foundational client-server suite of drafts (i.e., crypto-types, keystore, and truststore).  So, if any objections, please shout out now.

Kent // contributor

> PS: both the SSH and TLS client-server draft create mapping tables between the protocol-specific cipher-suite names and to the algorithm names in crypto-types.  For instance, here are the mapping tables for TLS: https://tools.ietf.org/html/draft-ietf-netconf-tls-client-server-17#section-5 <https://tools.ietf.org/html/draft-ietf-netconf-tls-client-server-17#section-5>.
> 
> _______________________________________________
> netconf mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netconf

---

From: "Salz, Rich" <[email-masked]>
Date: Mon, 17 Feb 2020 23:24:13 +0000

Looking forwards to reading the new docs.

From: Kent Watsen <[email-masked]>
Date: Monday, February 17, 2020 at 6:17 PM
To: Rich Salz <[email-masked]>
Cc: "[email-masked]" <[email-masked]>
Subject: Re: [netconf] Supported algorithms lists

All,

Kent  // contributor

On Feb 13, 2020, at 8:06 PM, Kent Watsen <[email-masked]<mailto:[email-masked]>> wrote:

To give a concrete example, assume the data model illustrated by tree diagram here: https://tools.ietf.org/html/draft-ietf-netconf-restconf-client-server-17#appendix-A.2<https://urldefense.proofpoint.com/v2/url?u=https-3A__tools.ietf.org_html_draft-2Dietf-2Dnetconf-2Drestconf-2Dclient-2Dserver-2D17-23appendix-2DA.2&d=DwMFaQ&c=96ZbZZcaMF4w0F4jpN6LZg&r=4LM0GbR0h9Fvx86FtsKI-w&m=GBdRwXL_jtKbkQvlnv34yki1PFUKt0b5NJdCDQFduS0&s=uP8MR8UkworlQc1hUweslpPwCh6z1LwyHCwwExSGRlM&e=>.  The RPC might be:

 <rpc message-id="101"

Kent // contributor

PS: both the SSH and TLS client-server draft create mapping tables between the protocol-specific cipher-suite names and to the algorithm names in crypto-types.  For instance, here are the mapping tables for TLS: https://tools.ietf.org/html/draft-ietf-netconf-tls-client-server-17#section-5<https://urldefense.proofpoint.com/v2/url?u=https-3A__tools.ietf.org_html_draft-2Dietf-2Dnetconf-2Dtls-2Dclient-2Dserver-2D17-23section-2D5&d=DwMFaQ&c=96ZbZZcaMF4w0F4jpN6LZg&r=4LM0GbR0h9Fvx86FtsKI-w&m=GBdRwXL_jtKbkQvlnv34yki1PFUKt0b5NJdCDQFduS0&s=ngEHT-ndElJjUB76zut3ctc_WTO5wYeckXF_AUDpa9s&e=>.

Thanks,
Kent. // contributor

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