fit: cipher: aes: allow to store the IV in the FIT image
authorPhilippe Reynes <philippe.reynes@softathome.com>
Thu, 17 Sep 2020 13:01:46 +0000 (15:01 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 13 Oct 2020 01:30:37 +0000 (21:30 -0400)
commita6982a6f768bdcf4bd0848ff4dbe68c2fd6599fb
treee50accdcee18fc7e01b2df722022a2d4ed64d7e9
parent34ca77c1e113d42a63f8ae21b41ec7f9f356c1de
fit: cipher: aes: allow to store the IV in the FIT image

Binaries may be encrypted in a FIT image with AES. This
algo needs a key and an IV (Initialization Vector). The
IV is provided in a file (pointer by iv-name-hint in the
ITS file) when building the ITB file.

This commits adds provide an alternative way to manage
the IV. If the property iv-name-hint is not provided in
the ITS file, the tool mkimage will generate an random
IV and store it in the FIT image.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
include/image.h
include/u-boot/aes.h
lib/aes/aes-encrypt.c
tools/image-host.c