Subject: [CFRG] XDR in RFC8391

From: "Kretschmer, Andreas" <[email-masked]>
Date: Wed, 2 Dec 2020 09:42:33 +0000

Hello,

I tried to use the XDR definitions given in RFC8391 Appendix A,B,C for generating a parser skeleton. Unfortunately I found some parts of the XDR definitions not compliant to the referred RFC4506:

- some Identifiers contain "/" and "-", RFC4506 allows only letter, digits and underbars
- some enum bodies end with  ",}", RFC4506 requests "}" here
- some union definitions have incomplete declarations in the case-spec, e.g. the union xmss_ots_signature refers to the wotsp-sha2_256 without giving a type.

Now my questions:

- Is there a fixed formal correct version of the  RFC8391 XDR definitions available?
-  Whats the binary representations of an union holding incomplete  declarations?

Could somebody please give me a  hint or a pointer to the answers?

Regards,
Andreas

---

From: "David McGrew (mcgrew)" <[email-masked]>
Date: Wed, 2 Dec 2020 21:02:47 +0000

Hi Andreas,

I’m not an author, but I think I can help, please see inline:

On Dec 2, 2020, at 4:42 AM, Kretschmer, Andreas <[email-masked]<mailto:[email-masked]>> wrote:

Hello,

This is unfortunate, but it can be worked around easily by replacing the nonconformant characters with underbars, or some similar change.

The meaning of the following snippet:

      union xmss_ots_signature switch (xmss_algorithm_type type) {
        case xmss-sha2_10_256:
        case xmss-sha2_16_256:
        case xmss-sha2_20_256:
          wotsp-sha2_256;
      }

Has the same meaning as

      union xmss_ots_signature switch (xmss_algorithm_type type) {
        case xmss-sha2_10_256:
          wotsp-sha2_256;
        case xmss-sha2_16_256:
          wotsp-sha2_256;
        case xmss-sha2_20_256:
          wotsp-sha2_256;
      }

That is, multiple discriminant values correspond to the same implied arm.

Now my questions:

Not that I’m aware of.

Hope that helps.

David

Regards,
Andreas

_______________________________________________
CFRG mailing list
[email-masked]<mailto:[email-masked]>
https://www.irtf.org/mailman/listinfo/cfrg

---

From: "Kretschmer, Andreas" <[email-masked]>
Date: Thu, 3 Dec 2020 07:13:43 +0000

Hi David,

I agree, the superfluous commas and strange identifiers are easy to fix. Also having multiple discriminant values for one union arm is not a problem.

But RFC4506 requests at the end of a "case-spec" a full "declaration" and not only a single value. (only "void" would be allowed here). Therefore I ask for the binary encoding of such definition.

Thanks,
Andreas

From: David McGrew (mcgrew) <[email-masked]>
Sent: Mittwoch, 2. Dezember 2020 22:03
To: Kretschmer, Andreas (T RDA CST SEA-DE) <[email-masked]>
Cc: [email-masked]
Subject: Re: [CFRG] XDR in RFC8391

Hi Andreas,

On Dec 2, 2020, at 4:42 AM, Kretschmer, Andreas <mailto:[email-masked]> wrote:

Hello,

Now my questions:

Not that I’m aware of.

Hope that helps.

David

Regards,
Andreas

mailto:[email-masked]

---

From: Carsten Bormann <[email-masked]>
Date: Thu, 3 Dec 2020 08:38:21 +0100

Indeed, the below expansion addresses the thinly documented fall-through, but not what actually should be in that signature.

>      union xmss_ots_signature switch (xmss_algorithm_type type) {

Note that wotsp-sha2_256 is defined here:

      enum ots_algorithm_type {
        wotsp_reserved  = 0x00000000,
        wotsp-sha2_256  = 0x00000001,
        wotsp-sha2_512  = 0x00000002,
        wotsp-shake_256 = 0x00000003,
        wotsp-shake_512 = 0x00000004,
      };

So wotsp-sha2_256 is an identifier for a value, not for a type.
(Even if it were a type, an identifier would need to follow it.)

xmss_ots_signature is then used here:

      /* XMSS signature structure */

      struct xmss_signature {
        /* WOTS+ key pair index */
        bytestring4 idx_sig;
        /* Random string for randomized hashing */
        random_string_xmss rand_string;
        /* WOTS+ signature */
        xmss_ots_signature sig_ots;
        /* authentication path */
        xmss_path nodes;
      };

Grüße, Carsten

---

From: [email-masked]
Date: Thu, 03 Dec 2020 09:34:25 +0100

Hi Andreas,

thanks for pointing out the issues and please excuse the inconvencience.

> - some Identifiers contain "/" and "-", RFC4506 allows only letter,  
The easy fix for which I'd settle as suggested by David is to use underbars.

> - some enum bodies end with  ",}", RFC4506 requests "}" here
You're right. Please omit the commas.

> - some union definitions have incomplete declarations in the  
> case-spec, e.g. the union xmss_ots_signature refers to the  
> wotsp-sha2_256 without giving a type.
It's just a numeric identifier, as pointed out by Carsten, defined as  
ots_algorithm_type. Does this help or do you have any further  
questions about it?

> - Is there a fixed formal correct version of the  RFC8391 XDR  
No, there isn't, yet. But we could e.g. go for an errata for the RFC.

Kind Regards,
Stefan (speaking for the authors)

---

From: "Kretschmer, Andreas" <[email-masked]>
Date: Thu, 3 Dec 2020 08:44:51 +0000

Hallo Stefan,

Is this right:

If I want to encode a xmss_ots_signature (e.g. as part of a xmss_signature) I have to write at first 4 byte for the " xmss_algorithm_type type" discriminator followed by 4 byte for an specific arm?

Thanks,
Andreas

-----Original Message-----
From: [email-masked] <[email-masked]>
Sent: Donnerstag, 3. Dezember 2020 09:34
To: Kretschmer, Andreas (T RDA CST SEA-DE) <[email-masked]>
Cc: [email-masked]
Subject: Re: [CFRG] XDR in RFC8391

Hi Andreas,

Kind Regards,

---

From: [email-masked]
Date: Wed, 09 Dec 2020 16:49:01 +0100

Hi Andreas,

please excuse the late answer.

The identifier should be 4 byte, yet it looks like the ots_signature  
itself is missing.

Currently working on an errata.

Kind Regards,
Stefan

Quoting "Kretschmer, Andreas" <[email-masked]>:

> Hallo Stefan,
>
> Is this right:
>
> If I want to encode a xmss_ots_signature (e.g. as part of a  
> xmss_signature) I have to write at first 4 byte for the "  
> xmss_algorithm_type type" discriminator followed by 4 byte for an  
> specific arm?
>
> Thanks,
> Andreas
>

---

From: "Kretschmer, Andreas" <[email-masked]>
Date: Thu, 10 Dec 2020 08:11:53 +0000

Hallo Stefan,

I submitted already an errata: https://www.rfc-editor.org/errata/eid6352 . Maybe we can push it together?

Kind regards,
Andreas

-----Original Message-----
From: [email-masked] <[email-masked]>
Sent: Mittwoch, 9. Dezember 2020 16:49
To: Kretschmer, Andreas (T RDA CST SEA-DE) <[email-masked]>
Cc: [email-masked]
Subject: Re: [CFRG] XDR in RFC8391

Hi Andreas,

The identifier should be 4 byte, yet it looks like the ots_signature itself is missing.

Kind Regards,
Stefan

---

From: [email-masked]
Date: Fri, 11 Dec 2020 07:20:15 +0100

Hi Andreas,

sure, would be a pleasure.

Taking this discussion off-list. Gonna text you soon.

Kind Regards,
Stefan

Zitat von "Kretschmer, Andreas" <[email-masked]>:

> Hallo Stefan,
>
> I submitted already an errata:  
> https://www.rfc-editor.org/errata/eid6352 . Maybe we can push it  
> together?
>
> Kind regards,
> Andreas
>