![]()  | 
  
    dp14txss
    
   Vitis Drivers API Documentation 
   | 
 
This file contains common functions shared between HDCP22 drivers.
MODIFICATION HISTORY:
Ver Who Date Changes
1.00 MH 10/30/15 First Release. 1.01 MH 01/15/16 Added prefix to function names.
Functions | |
| void | XHdcp22Cmn_Sha256Hash (const u8 *Data, u32 DataSize, u8 *HashedData) | 
| This function computes a SHA256 hash on a array of data.  More... | |
| int | XHdcp22Cmn_HmacSha256Hash (const u8 *Data, int DataSize, const u8 *Key, int KeySize, u8 *HashedData) | 
| This function does a HMAC_SHA256 transform: SHA256(K XOR opad, SHA256(K XOR ipad, text))  More... | |
| void | XHdcp22Cmn_Aes128Encrypt (const u8 *Data, const u8 *Key, u8 *Output) | 
| This function encrypts 128 bits data with a key of size 128 bits.  More... | |
| void | XHdcp22Cmn_Aes128Decrypt (const u8 *Data, const u8 *Key, u8 *Output) | 
| This function encrypts 128 bits data with a key of size 128 bits.  More... | |
| void XHdcp22Cmn_Aes128Decrypt | ( | const u8 * | Data, | 
| const u8 * | Key, | ||
| u8 * | Output | ||
| ) | 
This function encrypts 128 bits data with a key of size 128 bits.
| Input | is the 16 byte ciphertext | 
| Key | is the user supplied input key | 
| Output | is the 16 byte plaintext | 
| void XHdcp22Cmn_Aes128Encrypt | ( | const u8 * | Data, | 
| const u8 * | Key, | ||
| u8 * | Output | ||
| ) | 
This function encrypts 128 bits data with a key of size 128 bits.
| Input | is the 16 byte plaintext | 
| Key | is the user supplied input key | 
| Output | is the 16 byte ciphertext | 
| int XHdcp22Cmn_HmacSha256Hash | ( | const u8 * | Data, | 
| int | DataSize, | ||
| const u8 * | Key, | ||
| int | KeySize, | ||
| u8 * | HashedData | ||
| ) | 
This function does a HMAC_SHA256 transform: SHA256(K XOR opad, SHA256(K XOR ipad, text))
ipad is the byte 0x36 repeated 64 times opad is the byte 0x5c repeated 64 times and text is the data being protected
| Data | is the input data. | 
| DataSize | is the size of the data buffer. | 
| Key | is the hash-key to use. | 
| KeySize | is the size of the hash key. | 
| HashedData | is the output of this function. | 
References SHA256_SIZE, and XHdcp22Cmn_Sha256Hash().
| void XHdcp22Cmn_Sha256Hash | ( | const u8 * | Data, | 
| u32 | DataSize, | ||
| u8 * | HashedData | ||
| ) | 
This function computes a SHA256 hash on a array of data.
| Data | is the data on which a hash is calculated. | 
| DataSize | is the size of the data array.. | 
| HashedData | is a 256-bits size hash. | 
Referenced by XHdcp22Cmn_HmacSha256Hash().