Hi Tomasz,
Sorry for the delay in response. Although PCA FWU specification allows image compression, TF-M does not implement that feature because the method and place of image compression/decompression is flexible and is up to the target system design and implementation.
Best regards, Anton
From: Tomasz Jastrzębski via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: Friday, January 19, 2024 10:29 AM To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org Subject: [TF-M] Pre-encryption image compression
Hello All,
Does the current TF-M version support image compression before image is encrypted?
Needless to say, compression after the image has been encrypted would not yield reasonable compression ratio.
I am showing that *.bin files, even built with MinSizeRel option, zip-compress with minimum 50% compression ratio so probably this would make sense. Tested with STM32U5 target and GCC.
"PSA Certified Firmware Update APIhttps://arm-software.github.io/psa-api/fwu/1.0/overview/architecture.html#manifest" document in sections 3.1 and 3.2 provides for image compression.
Kind regards,
Tomasz Jastrzębski