w3c / encrypted-media

Encrypted Media Extensions
https://w3c.github.io/encrypted-media/
Other
180 stars 80 forks source link

Clarify `first decryption time` when the session is never used #470

Closed xhwang-chromium closed 4 years ago

xhwang-chromium commented 4 years ago

The persistent-usage-record session, the record of key usage consists of:

... first decryption time - The first decryption time, defined as the time at which the session was first used to decrypt content, accurate to key usage accuracy and...

It's unclear about the case where the session was never used to decrypt content. In that case, I assume we do not need first decryption time in the record of key usage?

Then in 9.1.5 License Release Format (for Clear Key)

... For sessions of type "persistent-usage-record" the object shall also contain the following members: "firstTime" The first decryption time expressed as a number giving the time, in milliseconds since 01 January, 1970 UTC. "latestTime" The latest decryption time expressed as a number giving the time, in milliseconds since 01 January, 1970 UTC.

If the session was never used to decrypt content. Do we still need "firstTime"? Or shall we have a "firstTime" with value 0?

joeyparrish commented 4 years ago

I think the format of how the data is stored is up to the key system. Only Clear Key's record format is spec'd here.

But it seems to me that the difference between "never" and "start of the epoch" would be an important one for key systems generally. I would suggest a non-normative note pointing that out in the definition of record of key usage. Again, the format is up to the key system, so maybe you omit a field from your structure, or maybe you use whatever is equivalent to null in your structure. But you probably want to know the difference between "never" and "since always/1970". :-)

For the Clear Key release message format, I suggest we specify that null be used (valid in JSON) for firstTime and latestTime if the content has never been decrypted.