1 /* 2 * Copyright (C) 2014 Intel Corporation. All rights reserved. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef __WV_MOD_OEM_CRYPTO_H_ 18 #define __WV_MOD_OEM_CRYPTO_H_ 19 20 #include <inttypes.h> 21 22 enum drm_wv_mod_algorithm 23 { 24 DRM_WV_MOD_AES_CBC_128_NO_PADDING = 0, 25 HMAC_SHA256 26 }; 27 28 enum drm_wv_mod_rsa_padding_scheme 29 { 30 DRM_WV_MOD_RSA_PADDING_SCHEME_RSASSA_PSS_SHA1 = 1, 31 DRM_WV_MOD_RSA_PADDING_SCHEME_RSASSA_PKCS1v15, 32 DRM_WV_MOD_RSA_PADDING_SCHEME_MAX_VALUE 33 }; 34 35 enum drm_wv_mod_usage_entry_status 36 { 37 k_free = -1, 38 k_unused = 0, 39 k_active = 1, 40 k_inactive = 2, // deprecated in v13 41 k_inactive_used = 3, 42 k_inactive_unused = 4 43 }; 44 45 struct drm_wv_mod_key_object 46 { 47 const uint8_t *key_id; 48 uint32_t key_id_len; 49 const uint8_t *key_data_iv; 50 const uint8_t *key_data; 51 uint32_t key_data_length; 52 const uint8_t *key_control_iv; 53 const uint8_t *key_control; 54 uint32_t cipher_mode; 55 }; 56 57 struct drm_wv_mod_key_refresh_object 58 { 59 const uint8_t *key_id; 60 uint32_t key_id_len; 61 const uint8_t *key_control_iv; 62 const uint8_t *key_control; 63 }; 64 65 #endif /* __WV_MOD_OEM_CRYPTO_H_ */ 66