On 2026-07-09T22:46:22, James Hilliard <[email protected]> wrote:
> spl: fit: support encrypted payloads
>
> Add SPL_FIT_CIPHER and decrypt FIT image data before post-processing,
> decompression or moving it to the final load address.
>
> SPL cannot always allocate a new output buffer while loading FIT images,
> so use the caller-provided decrypt-to-buffer helper. External encrypted
> images are read into scratch memory first, then decrypted in place before
> the existing copy or decompression path consumes them. Embedded encrypted
> images decrypt into the final load buffer, or into scratch memory when
> decompression is still required.
>
> Use IMAGE_ENABLE_DECRYPT in the common FIT image-load path so FIT cipher
> support is selected by phase. Keep that path disabled for host tools,
> since the target-side decrypt helper depends on the U-Boot control FDT
> and runtime crypto providers.
>
> Signed-off-by: James Hilliard <[email protected]>
>
> boot/Kconfig         |  8 ++++++
>  boot/image-fit.c     |  2 +-
>  common/spl/spl_fit.c | 75 
> +++++++++++++++++++++++++++++++++++++++++++++++-----
>  3 files changed, 77 insertions(+), 8 deletions(-)

Reviewed-by: Simon Glass <[email protected]>

Reply via email to