ietf-wg-drip / draft-ietf-drip-auth

1 stars 0 forks source link

cSHAKE String #35

Closed kc2rxo closed 1 year ago

kc2rxo commented 1 year ago

There is a comment in the document asking the following question about the cSHAKE hash use.

Should the cSHAKE string be:

  1. "Remote ID Auth Hash" -- current
  2. DET Context ID (i.e. 0x00B5 A69C 795D F5D5 F008 7F56 843F 2C40)
  3. New Context ID
kc2rxo commented 1 year ago

Looks like this is still left hanging. We can keep it as is or do we have a preference to change it?

rgmhtt commented 1 year ago

First per SP800-185 pg 7, "L" (the 2nd argument) is in bits, not bytes. So

cSHAKE128(ASTM Message, 64, "", "Remote ID Auth Hash")

Then, "Remote ID Auth Hash" is a perfectly good value of "S", the customization bit string. Though sometimes a bit representation is provided so there are no mistakes. Take, pg 10 in above for KMAC:

N ="KMAC" = 11010010 10110010 10000010 11000010

Presenting in hex is also acceptable so it is not too long. Thus there is no question of the text to bit encoding rules.

Finally, replace:

  Informative Note: [RFC9374] specifies cSHAKE128 but is open for
  the expansion of other OGAs.

with

  Informative Note: For OGAs other than "5" [RFC9374], use the construct
 appropriate for the associated hash.  e.g. for "2" which is ECDSA/SHA-384:

       Ltrunc( SHA-384( ASTM Message | "Remote ID Auth Hash" ), 8 )
kc2rxo commented 1 year ago

Added in -35