Intel® Stratix® 10 Device Security User Guide

ID 683642
Date 7/14/2023
Public
Document Table of Contents

3.3.4. Partial Reconfiguration Bitstream Encryption

You can enable bitstream encryption on some Intel Stratix 10 FPGA designs that use partial reconfiguration.

Partial reconfiguration designs utilizing the Hierarchical Partial Reconfiguration (HPR), or Static Update Partial Reconfiguration (SUPR) do not support the bitstream encryption. You must use the same encryption key to encrypt the static region and all personas unless multi-authority support is enabled. If your design contains multiple PR regions, you must encrypt all personas.

To enable partial reconfiguration bitstream encryption, follow the same procedure in all design revisions.

  1. On the Intel® Quartus® Prime File menu, select Assignments > Device > Device and Pin Options > Security.
  2. Select the desired encryption key storage location.
    Figure 5. Partial Reconfiguration Bitstream Encryption Setting

    Alternatively, you may add the following assignment statement in the Quartus Prime settings file .qsf:

    set_global_assignment -name \
    --ENABLE_PARTIAL_RECONFIGURATION_BITSTREAM_ENCRYPTION on

    After you compile your base design and revisions, the software generates a .sof file and one or more .pmsf files, representing the personas.

  3. Create encrypted and signed programming files from .sof  and .pmsf  files in a similar fashion to designs with no partial reconfiguration enabled.
  4. Convert the compiled persona .pmsf file to a partially encrypted .rbf file:
    quartus_pfg -c -o finalize_encryption_later=ON \ 
    -o sign_later=ON encryption_enabled_persona1.pmsf persona1.rbf
  5. Finalize bitstream encryption using the quartus_encrypt command line tool:
    quartus_encrypt --family=stratix10 \  
    --operation=ENCRYPT --key=aes_root.qek persona1.rbf encrypted_persona1.rbf
  6. Sign the encrypted configuration bitstream using the quartus_sign command line tool:
    quartus_sign --family=stratix10 --operation=SIGN \ 
    --qky=design0_sign_chain.qky \ 
    --pem=design0_sign_private.pem encrypted_persona1.rbf \ signed_encrypted_persona1.rbf 
    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" \
    --qky=design0_sign_chain.qky --keyname=design0_sign encrypted_persona1.rbf \
    signed_encrypted_persona1.rbf