Support 32 bytes session key
[ Merge of http://go/wvgerrit/149849 ] With ECC based DRM cert, the session key is expected to be 32, as compared to 16 bytes in RSA case. This CL adds supports for 32 bytes session key. Bug: 236317198 Test: oemcrypto_test Change-Id: I657fdd92d17736a23375ddcd457f83efa6ca6d1f
This commit is contained in:
@@ -606,6 +606,12 @@ class Session {
|
||||
// |public_ecc_| using Widevine ECDSA.
|
||||
void VerifyEccSignature(const vector<uint8_t>& message,
|
||||
const uint8_t* signature, size_t signature_length);
|
||||
// Verify RSA or ECC signature based on the key type installed. The
|
||||
// padding_scheme will be ignored in case of ECC key.
|
||||
void VerifySignature(const vector<uint8_t>& message, const uint8_t* signature,
|
||||
size_t signature_length,
|
||||
RSA_Padding_Scheme padding_scheme);
|
||||
|
||||
// Encrypts a known session key with public_rsa_ for use in future calls to
|
||||
// OEMCrypto_DeriveKeysFromSessionKey or OEMCrypto_RewrapDeviceRSAKey30.
|
||||
// The unencrypted session key is stored in session_key.
|
||||
@@ -616,6 +622,10 @@ class Session {
|
||||
// The unencrypted session key is stored in session_key.
|
||||
bool GenerateEccSessionKey(vector<uint8_t>* session_key,
|
||||
vector<uint8_t>* ecdh_public_key_data);
|
||||
// Based on the key type installed, call GenerateRsaSessionKey or
|
||||
// GenerateEccSessionKey.
|
||||
bool GenerateSessionKey(vector<uint8_t>* session_key,
|
||||
vector<uint8_t>* key_material);
|
||||
|
||||
// Calls OEMCrypto_RewrapDeviceRSAKey30 with the given provisioning response
|
||||
// message. If force is true, we assert that the key loads successfully.
|
||||
|
||||
Reference in New Issue
Block a user