ehn-dcc-development / eu-dcc-schema

Schema for the ehn DCC payload
Apache License 2.0
164 stars 59 forks source link

Define charset for Luhn-Mod-N algorithm #45

Closed gabywh closed 3 years ago

gabywh commented 3 years ago

https://github.com/ehn-digital-green-development/ehn-dgc-schema/issues/38#issuecomment-829008964

closes #38

gabywh commented 3 years ago

Option 3 to be used. https://github.com/ehn-digital-green-development/ehn-dgc-schema/issues/44#issuecomment-829265000

gabywh commented 3 years ago

@jschlyter regex pattern for schema?

martin-lindstrom commented 3 years ago

My vote is also on option 3, but we need to decide on the charset.

dirkx commented 3 years ago

I'll make an example with calcualtion- we had that in Konstantin vfirst vrsion of the document

jschlyter commented 3 years ago

The specs refers to RFC 3986, but the UVCI are not URIs?

dirkx commented 3 years ago

prefixing it with a sensible urn: or IRI style prefix would make it so. They would not/never be URLs though.

gabywh commented 3 years ago

Are we talking Luhn-Mod-N or Luhn-10 here? Annex 2 in the eHN Vacc Interop states:

This checksum should be the ISO-7812-1 (LUHN-10) summary of the entire UVCI in digital/wire transport format.

(@martin-lindstrom so I guess that answers your question about scope of the checksum)

gabywh commented 3 years ago

Are we talking Luhn-Mod-N or Luhn-10 here? Annex 2 in the eHN Vacc Interop states:

This checksum should be the ISO-7812-1 (LUHN-10) summary of the entire UVCI in digital/wire transport format.

Luhn-Mod-N would make sense here, Luhn-10 not, and the footnote (7) also discusses Luhn-Mod-N, so is the Luhn-10 reference simply a small error?

Luhn-10 is the only ISO spec I know of in this context and AFAIK Luhn-Mod-N was never ISO (maybe someone else knows better?), so I can understand the Luhn-10 reference from that perspective, but that makes the text confusing since it clearly states Luhn-10 should be used.

Suggest wording to be sth like:

"Luhn-Mod-N algorithm shall be used" and in footnote 7 explain that Luhn-Mod-N is a variant on the basic Luhn-Mod-10 as per ISO 7812-1