HDMI Intel® Stratix® 10 FPGA IP Design Example User Guide

ID 683701
Date 1/26/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

4.3.3.2.1. Intel KEYENC

KEYENC is a command line software utility that Intel uses to encrypt the HDCP production keys with a 128 bits HDCP protection key that you provide. KEYENC outputs encrypted HDCP production keys in hex or bin or header file format. KEYENC also generates mif file containing your provided 128 bits HDCP protection key. KEYDEC requires the mif file.

System Requirement:
  1. x86 64-bit machine with Windows 10 OS
  2. Visual C++ Redistributable package for Visual Studio 2019(x64)
Note: You must install Microsoft Visual C++ for VS 2019. You can check whether Visual C++ redistributable is installed from Windows > Control Panel > Programs and Features. If Microsoft Visual C++is installed, you can see Visual C++ xxxx Redistributable (x64). Otherwise, you can download and install Visual C++ Redistributable from Microsoft website. Refer to the related information for the download link.
Table 53.  KEYENC Command Line Options
Command Line Options Arguement/Description
-k <HDCP protection key file>

Text file containing only the 128 bits HDCP protection key in hexadecimal. Example: f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff

-hdcp1tx

<HDCP 1.4 TX production keys file>

HDCP 1.4 transmitter production keys file from DCP (.bin file)

-hdcp1rx <HDCP 1.4 RX production keys file>

HDCP 1.4 receiver production keys file from DCP (.bin file)

-hdcp2tx <HDCP 2.3 TX production keys file>

HDCP 2.3 transmitter production keys file from DCP (.bin file)

-hdcp2rx <HDCP 2.3 RX production keys file>

HDCP 2.3 receiver production keys file from DCP (.bin file)

-hdcp1txkeys

<HDCP key range>

Specify the key range for selected input (.bin) files

-hdcp1txkeys|hdcp1rxkeys|hdcp2rxkeys n-m

where

n = key start (1 or >1)

m = key end (n or >n)

Example:

Select 1 to 1000 keys from each HDCP 1.4 TX, HDCP 1.4 RX and HCDP 2.3 RX production keys file.

“-hdcp1txkeys 1-1000 -hdcp1rxkeys 1-1000 -hdcp2rxkeys 1-1000”

Note:
  1. If you are not using any HDCP production keys file, you will not require the HDCP key range. If you are not using the argument in command line, the default key range is 0.
  2. You can also select different index of the keys for HDCP production keys file. However, number of keys should match the selected options.

    Example: Select different 100 keys

    Select first 100 keys from HDCP 1.4 TX production keys file

    “-hdcp1txkeys 1-100”

    Select keys 300 to 400 for HDCP 1.4 RX production keys file

    “-hdcp1rxkeys 300-400”

    Select keys 600 to 700 for HDCP 2.3 RX production keys file

    “-hdcp2rxkeys 600-700”

-hdcp1rxkeys
-hdcp2rxkeys
-o

Output file format <bin|hex|h>. Default is hex file.

Generate encrypted HDCP production keys in binary file format: -o bin

Generate encrypted HDCP production keys in hex file format: -o hex

Generate encrypted HDCP production keys in header file format: -o h

--check-keys

Print number of keys available in input files.

Example:

keyenc.exe -hdcp1tx <HDCP 1.4 TX production keys file> -hdcp1rx <HDCP 1.4 RX production keys file> -hdcp2tx <HDCP 2.3 TX production keys file> -hdcp2rx <HDCP 2.3 RX production keys file> --check-keys
Note: use parameter --check-keys at the end of the command line as mentioned in above example.
--version Print KEYENC version number

You can selectively choose HDCP 1.4 and/or HDCP 2.3 production keys to encrypt. For example, to use only HDCP 2.3 RX production keys to encrypt, use only -hdcp2rx <HDCP 2.3 RX production keys file> -hdcp2rxkeys <HDCP key range> in command line parameters.

Table 54.  KEYENC Common Error Message Guideline
Error Message Guideline
ERROR: HDCP protection key file missing Missing command line parameter -k <HDCP protection key file>
ERROR: key should be 32 hex digits (e.g. f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff) HDCP protection key file should contain only the HDCP protection key in 32 hexadecimal digits.
ERROR: Please specify the key range Key range is not specified for the given input HDCP production keys file.
ERROR: Invalid key range Key range specified for -hdcp1txkeys or -hdcp1rxkeys or -hdcp2rxkeys is not correct.
ERROR: cannot create <Filename> Check the folder permission from the keyenc.exe is being run.
ERROR: -hdcp1txkeys input is invalid Input key range format for HDCP 1.4 TX production keys is invalid.

Correct format is “-hdcp1txkeys n-m” where n >= 1, m >= n

ERROR: -hdcp1rxkeys input is invalid Input key range format for HDCP 1.4 RX production keys is invalid.

Correct format is “-hdcp1rxkeys n-m” where n >= 1, m >= n

ERROR: -hdcp2rxkeys input is invalid Input key range format for HDCP 2.3 RX production keys is invalid.

Correct format is “-hdcp2rxkeys n-m” where n >= 1, m >= n

ERROR: Invalid file <filename> Invalid HDCP production keys file.
ERROR: file type missing for -o option Command line parameter missing for –o <bin|hex|h>.
ERROR: invalid filename - <filename> <filename> is invalid, please use the valid filename without special characters.

Encrypt Single Key for Single EEPROM

Run the following command line from Windows command prompt to encrypt single key of HDCP 1.4 TX, HDCP 1.4 RX, HDCP 2.3 TX and HDCP 2.3 RX with output file format of header file for single EEPROM:
keyenc.exe -k <HDCP protection key file> -hdcp1tx <HDCP 1.4 TX production keys file> -hdcp1rx <HDCP 1.4 RX production keys file> -hdcp2tx <HDCP 2.3 TX production keys file> -hdcp2rx <HDCP 2.3 RX production keys file> -hdcp1txkeys 1-1 -hdcp1rxkeys 1-1 -hdcp2rxkeys 1-1 -o h

Encrypt N Keys for N EEPROMs

Run the following command line from Windows command prompt to encrypt N keys (starting from key 1) of HDCP 1.4 TX, HDCP 1.4 RX, HDCP 2.3 TX and HDCP 2.3 RX with output file format of hex file for N EEPROMs:
keyenc.exe -k <HDCP protection key file> -hdcp1tx <HDCP 1.4 TX production keys file> -hdcp1rx <HDCP 1.4 RX production keys file> -hdcp2tx <HDCP 2.3 TX production keys file> -hdcp2rx <HDCP 2.3 RX production keys file> -hdcp1txkeys 1-<N> -hdcp1rxkeys 1-<N> -hdcp2rxkeys 1-<N> -o hex 

where N is >= 1 and should match for all the options.