mbox series

[RFC,0/3] fpga: Add encrypted Bitstream loading support

Message ID 20231122054404.3764288-1-nava.kishore.manne@amd.com (mailing list archive)
Headers show
Series fpga: Add encrypted Bitstream loading support | expand

Message

Manne, Nava kishore Nov. 22, 2023, 5:44 a.m. UTC
For user-key encrypted bitstream loading use case, users can encrypt
FPGA configuration Images with their own key.While decrypting the
configuration Image the user needs to provide the same key.To support
this use case with the existing FPGA manager framework is not possible
because it doesn’t have a mechanism to get the required inputs from
the user. So this patch series adds the required changes to the FPGA
manager framework to support user-key encrypted bitstream image loading
use case.

Please take a look at the changes and let us know if any improvements
are required.

Nava kishore Manne (3):
  dt-bindings: fpga: Add support for user-key encrypted bitstream
    loading
  drivers: fpga: Add user-key encrypted FPGA Image loading support
  fpga: zynqmp: Add encrypted Bitstream loading support

 .../devicetree/bindings/fpga/fpga-region.txt  | 32 +++++++
 drivers/fpga/fpga-mgr.c                       | 86 +++++++++++++++++--
 drivers/fpga/of-fpga-region.c                 | 10 +++
 drivers/fpga/zynqmp-fpga.c                    | 53 +++++++++++-
 include/linux/firmware/xlnx-zynqmp.h          |  2 +
 include/linux/fpga/fpga-mgr.h                 |  8 ++
 6 files changed, 181 insertions(+), 10 deletions(-)

Comments

Krzysztof Kozlowski Nov. 24, 2023, 3:49 p.m. UTC | #1
On 22/11/2023 06:44, Nava kishore Manne wrote:
> For user-key encrypted bitstream loading use case, users can encrypt
> FPGA configuration Images with their own key.While decrypting the
> configuration Image the user needs to provide the same key.To support
> this use case with the existing FPGA manager framework is not possible
> because it doesn’t have a mechanism to get the required inputs from
> the user. So this patch series adds the required changes to the FPGA
> manager framework to support user-key encrypted bitstream image loading

Wasn't the entire point of encrypted FPGA bistreams that the key is
fused into the FPGA and the FPGA does the decrypting? Otherwise it's
like security through obscurity - the only trouble for attacker is to
decode DTB to find the filename of key, so actually not even really
obscure. Then the attacker retrieves the key and bitstream from
filesystem (by taking out the Zynq-based SoM out or booting from own
system or just accessing storage pins directly) and voila: encrypted key
is available.

Best regards,
Krzysztof