Skip to content

Enhancement: Encrypted scratch area #1942

@taltenbach

Description

@taltenbach

Currently, when using swap-scratch upgrade strategy with encrypted firmware images, the scratch area has to be placed in internal flash memory, even when BOOT_SWAP_SAVE_ENCTLV is enabled, since MCUboot is decrypting when copying the image data from the secondary slot to the scratch area. However, in order to save some internal flash memory and also potentially to increase the size of the scratch area, it could be interesting to be able to put that area in external flash memory. This would be especially valuable for MCUs having large internal flash memory sectors, like e.g. the STM32F413, which has 128 KiB flash sectors.

I was able with minor changes to perform the decryption when copying image data from the scratch area to the primary slot instead, and it seems to work fine. I haven't performed extensive testing though, so I might have missed something. Is there any good reason explaining why MCUboot is decrypting when writing to the scratch area? If not, would you be interested by these changes?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions