UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Adventurer
Adventurer
3,877 Views
Registered: ‎03-21-2013

HDCP using 2017.2 HDMI example design

I trying to use the KC705 HDMI example design in order to show HDCP working.

 

I have managed to build the example design using Vivado 2017.2, and the supporting application using the example HDMI RX/TX SS SDK source code in Vivado SDK 2017.2. This passes unencrypted 1080P/60 from a test source. Good.

 

Now I need to enable the HDCP features. Initially, I need to load the encrypted HDCP keys into the FMC EEPROM. Am I correct in assuming that I need to run the same utility as is described in the old XAPP1287 (noting all steps to this point were carried out using just the example designs within the tools, not XAPP1287).

 

Prior to running this utility using a genuine set of HDCP keys, I must use the test-keys detailed in the back of the HDCP 1.4 specification documentation. I have a Quantum test-generator which *should* be able to deliver a valid HDMI stream “encrypted” using these keys.

 

XAPP1287 instructs me as follows:

  1. Open the file hdcp_key.c in the app_hdcp_key/src folder
  2. The arrays Hdcp22Lc128, Hdcp22Key, Hdcp14Key1, and Hdcp14Key2 hold the HDCP keys and are empty. Fill these arrays with the acquired HDCP keys. The arrays are defined in big endian byte order.

 

Checking in this hdcp_key.c file, I find the dummy array Hdcp14Key1 defined as 328 8-bit hex values (each value = 0x00 as I expect).

However, the HDCP test-keys are defined in the HDCP 1.4 spec as: 1 x 40-bit KSV + 40 56-bit Keys.

 

Could you describe exactly how this array of test keys is supposed to be inserted into the Hdcp14Key1 array?

 

Thanks

 

Clive

 

 

 

0 Kudos
7 Replies
Adventurer
Adventurer
3,833 Views
Registered: ‎03-21-2013

Re: HDCP using 2017.2 HDMI example design

Further information:

I took a guess at the array format, and ran the utility and the instructions, loading the FMC EEPROM with the results accordingly. This seems to operate smoothly.

Upon loading the HDMI design onto the FPGA and running the application, I get the following feedback:

 

--------------------------------------
--- HDMI SS + VPhy Example v1.0 ---
--- (c) 2016 by Xilinx, Inc. ---
--------------------------------------
Build Jul 12 2017 - 09:01:21
--------------------------------------
Before the HDCP functionality can be enabled,
the application will load the encrypted HDCP keys
from the HDMI FMC EEPROM.
The HDCP keys are protected with a unique password.
Please enter your password.
Enter Password ->.......
Password is valid.
Loading HDCP keys from EEPROM... done
Enabling HDCP functionality
ERROR: Failed Rinv Calculation
ERROR: HDCP22-RX MMult NPrimeP Generation Failed

 

 

 

When I query the HDCP log, I see the following:

 

--------------------------
--- HDCP Main Menu ---
--------------------------
1 - Enable repeater
2 - Disable repeater
3 - Enable detailed logging
4 - Disable detailed logging
5 - Display log
6 - Display repeater info
99 - Exit
Enter Selection -> 5
Display log.

 

HDCP 1.4 RX Info
Encryption : Disabled.
Type: hdmi-rx
Current State: unauthenticated
Previous State: disabled
Encrypted?: No
Flags: 0001
Driver Version: 1.00.35
Cipher Version: 1.02.09
Local KSV: 511EF21ACD

 

Rx Stats
Auth Attempts: 0

Link Failures: 0
Ri Updates: 0

 

Cipher Stats
Int Count: 0

 

Port Stats
Int Count: 0

 

HDCP 1.4 TX Info
Type: hdmi-tx
Current State: unauthenticated
Previous State: disabled
Encrypted?: No
State Helper: 0000000000000000
Flags: 0001
Encryption Map: 0000000000000000
Driver Version: 1.00.35
Cipher Version: 1.02.10
Local KSV: B70361F714

 

Tx Stats
Auth Passed: 0
Auth Failed: 0
Reauth Requests: 0
Check Passed: 0
Check Failed: 0
Read Failures: 0

 

Cipher Stats
Int Count: 0

 

Port Stats
Int Count: 0

 

This shows correct-looking KSVs, but it seems to still be dead.

 

0 Kudos
Adventurer
Adventurer
3,859 Views
Registered: ‎03-21-2013

Re: HDCP using 2017.2 HDMI example design

Yet further info:

Suspecting my usage of the key encryption utility, and my array construction, I thought it might be useful to show the feedback when running the utility:

 

HDCP Key EEPROM v1.0

This tool encrypts and stores the HDCP 2.2 certificate and

HDCP 1.4 keys into the EEPROM on the HDMI FMC board

 

Enter Password ->.......

Encrypt signature  done

Write signature (16 bytes)

Verify signature ok (16 bytes)

Encrypt LC128  done

Write LC128 (16 bytes)

Verify lc128 ok (16 bytes)

Encrypt HDCP 2.2 Certificate  done

Write HDCP 2.2 Certificate (912 bytes)

Verify HDCP 2.2 Certificate error (564 bytes)

Encrypt HDCP 1.4 Key A  done

Write HDCP 1.4 Key A (336 bytes)

Verify HDCP 1.4 Key A ok (328 bytes)

Encrypt HDCP 1.4 Key A  done

Write HDCP 1.4 Key B (336 bytes)

Verify HDCP 1.4 Key B ok (328 bytes)

 

HDCP Key EEPROM completed.

This application is stopped.

 

I am only attempting HDCP1.4 to start with, so is it safe to ignore the HDCP2.2 certificate error?

 

0 Kudos
Xilinx Employee
Xilinx Employee
3,851 Views
Registered: ‎08-01-2007

Re: HDCP using 2017.2 HDMI example design

The problem might be the formatting of the HDCP keys.

Take a look at AR 67830.

Chris
Video Design Hub | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Xilinx Employee
Xilinx Employee
3,808 Views
Registered: ‎08-01-2007

Re: HDCP using 2017.2 HDMI example design

AR 67830 is for HDCP 1.4 Keys

AR 67305 is for HDCP 2.2 Keys

Chris
Video Design Hub | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Xilinx Employee
Xilinx Employee
3,731 Views
Registered: ‎08-02-2007

Re: HDCP using 2017.2 HDMI example design

Hi @clivewmwalker

 

You can ignore following error message if you only have HDCP 1.4 key. 

 

ERROR: Failed Rinv Calculation
ERROR: HDCP22-RX MMult NPrimeP Generation Failed

 

It doesn't stop your getting authenticated from Quantum Data.

 

Can you follow chapter 5 of PG235/PG235, and only enable HDCP 1.4? Then the error message should disappear.

 

Can you enable detailed logging, and see if Ri and Ro value are correct?

0 Kudos
Highlighted
Observer mcmontague
Observer
3,014 Views
Registered: ‎07-09-2013

Re: HDCP using 2017.2 HDMI example design

Hi @clivewmwalker

Were you ever able to get HDCP 1.4 fully functional?

0 Kudos
Xilinx Employee
Xilinx Employee
2,983 Views
Registered: ‎08-02-2007

Re: HDCP using 2017.2 HDMI example design

@mcmontague 

 

clivewmwalker was able to make loopback test working. the test vector from HDCP 1.4 spec doesn't need to be byte swapped.

0 Kudos