Commit Graph

21 Commits

Author SHA1 Message Date
John W. Bruce
365ea19c9a OEMCrypto and OPK v19.3 2024-09-05 07:21:15 +00:00
Fred Gylys-Colwell
8e55868e8a Missing images 2021-12-04 01:10:46 +00:00
Fred Gylys-Colwell
bb16924e69 Update Unit tests and reference code
This patch adds a suite of tests for OEMCrypto that verifying buffer
overflow and off-by-one errors. The reference code has also been
updated to pass these tests.

The ODK library and the OEMCrypto API have not changed since the
release of version 16.4.
2021-01-25 19:51:10 -08:00
Fred Gylys-Colwell
2980612cb5 Update version compatibility document
- This updates the version compatibility document to clarify how the
Android hidl interface works.
- Testing of analog output was removed because the unit tests cannot
verify correct behaviour.
- Some buffer overflow tests have been added.
2020-12-15 14:29:34 -08:00
Fred Gylys-Colwell
ad3791e23f OEMCrypto and ODK v16.4
This update is not required for all devices. It is necessary for
supporting some use cases for offline licenses on devices that do not
support usage tables. Most devices are expected to support usage
tables.

There were no new changes to the OEMCrypto code. However, the ODK
library has been updated so the minior version has been updated to 4.

There were also some changes to the unit tests.
1. We added more tests for pattern decryption.
2. We added more tests for buffer overflow handling.
4. We added some support for fuzz testing. These tests are not quite
   ready for wide use.
2020-10-07 19:37:40 -07:00
Fred Gylys-Colwell
b5637c89cb OEMCrypto v16.3
There were no new changes to the OEMCrypto code. However, the ODK
library changed, so we rolled the minor version number to 3.  The ODK
library was updated to support a nonce-free offline license. An
offline license would not require a nonce if, for example, it is
preloaded onto the device and does not have an entry in the usage
table.

Also, the following unit tests have been updated:
1. Various tests: Keys are not derived if they are not used. This is more
   in line with the “OEMCrypto state” diagram below.
2. The decrypt hash is not verified when there are multiple samples or no
   key is selected.
3. LoadKeyWithNoRequest. A nonce-free license is loaded in a session that
   did not sign the request. (Requires 16.3 ODK library)
4. RefreshLargeBuffer. The renewal message was set to the large
   size. Previously, only the license request was set to the larger size.
5. OEMCryptoGenericCryptoTest.*LargeBuffer. The correct buffer size is
   now being used.
6. ShrinkOverOpenSessions: The correct error code
   OEMCrypto_ERROR_ENTRY_IN_USE is now verified.
7. TimeRollbackPrevention: The test was refactored and fixed. Comments
   were added.
2020-06-02 10:14:16 -07:00
Fred Gylys-Colwell
e000b9de99 Update OEMCrypto documents (v16.2)
There were no function signature changes, so the API version number
did not change from 16.2. There were several grammar and spelling
errors. There were also the following corrections:

1. The description of OEMCrypto_LoadProvisioning now says that devices
with a keybox use keys derived from the keybox device key, and devices
using Provisioning 3.0 use keys derived from the session key. The
description was previously reversed.

2. The function OEMCrypto_SupportedPatterns is no longer
discussed. This function was never fully defined.

3. The function OEMCrypto_LoadRenewal no longer says that keys and key
control blocks should be verified. This is because the function
OEMCrypto_LoadRenewal processes a message with no key control
block. It should update timers for the entire license.
2020-04-14 10:10:56 -07:00
Fred Gylys-Colwell
016c2970ac Update unit tests to 2020-03-27 version
This CL updates the following:
- Some robustness improvements to the ODK library.
- Unit tests assume that license release does not have a core message.
- Added version string to unit tests.

The version string of the unit tests is now:
OEMCrypto unit tests for API 16.2. Tests last updated 2020-03-27
2020-03-30 18:51:33 -07:00
Fred Gylys-Colwell
1a9765171b OEMCrypto v16.2 unit tests and reference code 2020-02-10 16:34:45 -08:00
Fred Gylys-Colwell
d597f863e9 Update OEMCrypto docs to v16.2
This updates the documentation for the v16.2 release.
2020-02-01 12:00:52 -08:00
Fred Gylys-Colwell
5b9580a351 Update to v16.1 documentation and ODK library 2019-12-13 11:12:54 -08:00
Fred Gylys-Colwell
2f232e2939 OEMCrypto v16.1 Documentation and Headers
This commit contains the updated v16.1 documentation dated Nov 12th,
as well has the headers and update ODK library.

Unit tests and reference code is partially implemented, but not yet
complete.
2019-11-15 15:45:18 -08:00
Fred Gylys-Colwell
4de11d11e8 Initial v16 ODK Library
This commit has the initial ODK library.  Partners may use this code
to begin integrating the ODK library into their platform.  The
functionality is not complete, but this should help partners get an
early start playing with build files.
2019-10-04 16:47:20 -07:00
Fred Gylys-Colwell
ded4417dd4 OEMCrypto v15.2
See the file docs/Widevine_Modular_DRM_Version_15_Delta.pdf for
changes since version 15.1.
2019-05-08 13:37:45 -07:00
Fred Gylys-Colwell
88d6b53ba3 Improve OEMCrypto unit tests
This change updates the unit tests to have more comments so that it is
more clear what went wrong if a test fails.

Also, some utility code has been changed to make it easier to support
new platforms and read/write locks.

Also, the reference code has had some refactoring added to make it
easier for Widevine to test CDM code.  There should be no
functionality differences in the reference code.

Also, in the main API doc, there was an obsolete paragraph in the
description of the threading model.  This paragraph has been removed.
2019-03-15 13:24:46 -07:00
Fred Gylys-Colwell
e7d6da8d24 OEMCrypto v15.1 Updates
This CL updates documentation, reference code, and unit tests to match
the OEMCrypto v15.1 API.

1. The design for the Full Decrypt Path Testing application has
changed. Instead of reading hashes from an external file, it will use
a single key frame and modify it to match the desired size.  The test
application will then compute the hash and encrypt the frame.  For
OEMCrypto, this means that there will not be a call to
OEMCrypto_InitializeDecryptHash before the frame and
OEMCrypto_SetDecryptHash after the frame. Instead, there will be a
single call to OEMCrypto_SetDecryptHash before the frame. The function
OEMCrypto_InitializeDecryptHash will not be used.

2. The "Shared License" feature is not used by any production
server. This functionality is no longer required and OEMCrypto may
reject licenses with a nonzero bit 23 in the key control block.
2019-01-04 12:00:00 -08:00
Fred Gylys-Colwell
70e67379ec OEMCrypto v15 API
This CL adds pdf documents for the v15 API.
2018-10-16 16:12:24 -07:00
Fred Gylys-Colwell
1655d891de Updates to ref code and unit tests
This CL updates has several changes.

The document WidevineModularDRMSecurityIntegrationGuideforCENC_v14.pdf
had an incorrect definition of the PST_Report structure.  The header
file had the correct definition. This has been updated and the version
number of the document was rolled to 14.1

The unit tests TwoHundredEntries has been modifed to make sure that if
the usage table is full, then OEMCrypto will return the error
OEMCrypto_ERROR_INSUFFICIENT_RESOURCES.  This is important for the CDM
layer to correctly delete old licenses and secure stops when this
happens.

Several other unit tests covering corner cases have been added.

The reference code has been cleaned up a bit.  Some logging that might
be dangerous has been removed.
2018-09-19 20:32:32 -07:00
Fred Gylys-Colwell
61f02edda4 Refactor
This renames the "mock" code to "reference" because that's really what
it is.  Also, some code has been moved from the CDM repo to a common
utility directory so that it can be included here, and the oemcrypto
unit tests can now be built without having access to a current CDM
repo.

There are no functionality changes in this CL.
2018-05-10 15:28:20 -07:00
Fred Gylys-Colwell
7b71a449d0 OEMCrypto v14 Docs
This has the released version of the OEMCrypto API v14 documentation.

This patch also includes sample code and unit tests.
2018-01-23 09:29:28 -08:00
Fred Gylys-Colwell
81c64b3b78 Initial draft of OEMCrypto v14 Delta doc. 2017-12-05 16:51:20 -08:00