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_FKP_H_ 18 #define WV_FKP_H_ 19 20 #include <stdint.h> 21 22 #define KEYBOX_DEVID_SIZE (32) // 32 bytes 23 #define KEYBOX_DEVKEY_SIZE (16) // 16 bytes 24 #define KEYBOX_KEYDATA_SIZE (72) // 72 bytes 25 #define KEYBOX_MAGIC_SIZE (4) // 4 bytes 26 #define KEYBOX_CRC_SIZE (4) // 4 bytes 27 #define WIDE_VINE_KEYBOX_SIZE (KEYBOX_DEVID_SIZE + \ 28 KEYBOX_DEVKEY_SIZE + \ 29 KEYBOX_KEYDATA_SIZE + \ 30 KEYBOX_MAGIC_SIZE + \ 31 KEYBOX_CRC_SIZE) 32 33 //#define WIDEVINE_MAGIC_WORD (0x6b626f78) 34 35 struct wv_keybox_info_length 36 { 37 uint32_t key_data_size; // default 72 bytes 38 uint32_t device_id_sizee; // default 32 bytes 39 }; 40 41 // 42 // Widevine keybox provisioning key container structure. 43 // 44 struct wv_keybox 45 { 46 uint8_t device_id[KEYBOX_DEVID_SIZE]; // 32 bytes 47 uint8_t device_key[KEYBOX_DEVKEY_SIZE]; // 16 bytes 48 uint8_t key_data[KEYBOX_KEYDATA_SIZE]; // 72 bytes 49 uint8_t magic[KEYBOX_MAGIC_SIZE]; // 4 bytes 50 uint8_t crc[KEYBOX_CRC_SIZE]; // 4 bytes 51 }; 52 53 54 #endif /* WV_FKP_H_ */ 55