Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meaning of Report Type in plain text output #16

Open
corneliusroemer opened this issue Dec 23, 2020 · 2 comments
Open

Meaning of Report Type in plain text output #16

corneliusroemer opened this issue Dec 23, 2020 · 2 comments
Labels
question Further information is requested

Comments

@corneliusroemer
Copy link
Contributor

I had a look at the plain text output of the parser as available here: https://ctt.pfstr.de/plaintext/2020-12-22.txt

I'm a bit perplexed by the "Report type" saying "Self diagnosis" and "Recursive". You didn't choose those names yourself, right? These are definitions made by CWA. Self report surely isn't a thing as of now, that must be a mistake somewhere.

Are the official names decoupled from how the transmission levels are actually determined?

Or is the problem that verification key version 1 is being parsed, but version 2 definitions are used?

Can you say a little about v1 vs v2? Are both available, the CWA now uses v2 but the parser is still using v1?

@mh-
Copy link
Owner

mh- commented Dec 23, 2020

Hi @corneliusroemer
Please have a look at https://developers.google.com/android/exposure-notifications/exposure-key-file-format.
This is where the file format and

enum ReportType {
    UNKNOWN = 0;  // Never returned by the client API.
    CONFIRMED_TEST = 1;
    CONFIRMED_CLINICAL_DIAGNOSIS = 2;
    SELF_REPORT = 3;
    RECURSIVE = 4;  // Reserved for future use.
    REVOKED = 5;  // Used to revoke a key, never returned by client API.
  }

is defined.
This is not the Transmission Level, see

  // Varying risk associated with a key depending on diagnosis method
  optional int32 transmission_risk_level = 2 [deprecated = true];

for this.

There's not really a "verification key version 1", but the protobuf definition has evolved a bit. It's still somewhat backward compatible.
The v2 you refer to is supposed to use

  // Number of days elapsed between symptom onset and the TEK being used.
  // E.g. 2 means TEK is 2 days after onset of symptoms.
  optional sint32 days_since_onset_of_symptoms = 6;

instead of transmission_risk_level.

@mh- mh- added the question Further information is requested label Dec 23, 2020
@corneliusroemer
Copy link
Contributor Author

Understood, there is Report Type and TRL. Is CWA abusing the ReportType enum definition by Google or is @janpf parsing TEKs somehow wrong? Is this related to https://github.com/mh-/diagnosis-keys/issues/12?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants