Intel® Stratix® 10 Device Security User Guide

ID 683642
Date 12/15/2021
Public
Download
Document Table of Contents

2.2.2. Co-Signing SDM Firmware

You use the quartus_sign tool to extract, sign, and install the applicable SDM firmware .zip file. The co-signed firmware is then included by the programming file generator tool when you convert .sof file into a configuration bitstream .rbf file. You use the following commands to create a new signature chain and sign SDM firmware.

  1. Create a new signing key pair.
    1. Create a new signing key pair on the file system:
      quartus_sign --family=stratix10 --operation=make_private_pem \  
      --curve=secp384r1 firmware1_private.pem 
      quartus_sign --family=stratix10 --operation=make_public_pem \  
      firmware1_private.pem firmware1_public.pem 
    2. Create a new signing key pair in the HSM:
      pkcs11-tool --module=/usr/local/lib/softhsm/libsofthsm2.so \
      --token-label s10-token --login \
      --pin s10-token-pin \
      --keypairgen -–mechanism ECDSA-KEY-PAIR-GEN \
      --key-type EC:secp384r1 \
      --usage-sign --label firmware1 --id 1
  2. Create a new signature chain containing the new public key:
    quartus_sign --family=stratix10 --operation=append_key \ 
    --previous_pem=root_private.pem \
    --previous_qky=root.qky \ 
    --permission=0x1 \
    --cancel=1 \
    --input_pem=firmware1_public.pem firmware1_sign_chain.qky
    quartus_sign --family=stratix10 --operation=append_key \
    --module=softHSM --module_args="--token_label=s10-token \
    --user_pin=s10-token-pin \
    --hsm_lib=/usr/local/lib/softhsm/libsofthsm2.so" \
    --previous_keyname=root \
    --previous_qky=root.qky \
    --permission=1 --cancel=1 \
    --input_keyname=firmware1 firmware1_sign_chain.qky
    
  3. Copy the firmware .zip file from your Intel® Quartus® Prime Pro Edition software installation directory ( <install_dir>/quartus/common/devinfo/programmer/firmware/stratix10.zip ) to the current working directory:
    quartus_sign --family=stratix10 --get_firmware=.
  4. Sign the firmware .zip file. The tool automatically unpacks the .zip file and individually signs all firmware .cmf files, then rebuilds the .zip file for use by the tools in the following sections:
    quartus_sign --family=stratix10 --operation=sign \
    --qky=firmware1_sign_chain.qky \  
    --pem=firmware1_private.pem stratix10.zip signed_stratix10.zip
    quartus_sign --family=stratix10 --operation=sign --module=softHSM \
    --module_args="--token_label=s10-token \
    --user_pin=s10-token-pin \
    --hsm_lib=/usr/local/lib/softhsm/libsofthsm2.so" \
    --keyname=firmware1 \
    --qky=firmware1_sign_chain.qky stratix10.zip signed_stratix10.zip