Encryption of DFU_Application with NCS and MCUBoot

Hey,
I'm looking for a solution to encypt the DFU_Application.zip and that the nrf52840 MCU can encrpyt it at runtime.
Actually I've read that this not offical supported of nrf.
I've also read that there is a workaround to encrypt the image with the tool imgtool and the sign command with the arugment --encrpytion.

If I execute this command, the error occurs 
Error: Header padding was not requested and image does not start with zeros

Can please anybody help me, maybe with a small example how I can find a solution.

Best regards,
Hinnerk

Related