Home | History | Annotate | Download | only in inc
      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 struct drm_wv_mod_key_object
     36 {
     37     const uint8_t *key_id;
     38     uint32_t key_id_len;
     39     const uint8_t *key_data_iv;
     40     const uint8_t *key_data;
     41     uint32_t key_data_length;
     42     const uint8_t *key_control_iv;
     43     const uint8_t *key_control;
     44     uint32_t cipher_mode;
     45 };
     46 
     47 struct drm_wv_mod_key_refresh_object
     48 {
     49     const uint8_t *key_id;
     50     uint32_t key_id_len;
     51     const uint8_t *key_control_iv;
     52     const uint8_t *key_control;
     53 };
     54 
     55 #endif /* __WV_MOD_OEM_CRYPTO_H_ */
     56