w3c / encrypted-media

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

Needs clarification on "Usable For Decryption" and "usable" key status #460

Closed xhwang-chromium closed 1 year ago

xhwang-chromium commented 4 years ago

Currently, a key is usable if

The CDM is certain the key is currently usable for decryption. Keys that may not currently be usable for decryption must not have this status.

Then usable for decryption is defined as

A key is considered usable for decryption if the CDM is certain the key is currently usable to decrypt one or more blocks of media data.

The language used here is a bit ambiguous. Does it mean if the CDM is certain the key can be used to decrypt any media block, then the key status should be usable?

If that's true, then the reverse of that is: if the key status is not usable, then the CDM should not be able to decrypt any media block. This seems to contradict with some other key statuses, e.g.

output-restricted: Media data decrypted with this key may be blocked from presentation, if necessary according to the output restrictions.

It seems that "usable for decryption" doesn't care whether the decoded media can be presented. Then in the case when a key can be used for decryption, but the decrypted media is blocked from presentation, it's unclear whether the key status should be usable or output-restricted.

joeyparrish commented 1 year ago

It seems reasonable to assume that output-restricted supercedes usable.