Re: [PATCH v5 07/14] crypto: aes: add software-key provider dispatch

Simon Glass <[email protected]>
Newsgroups gmane.comp.boot-loaders.u-boot
Message-ID <CAFLszTjt1kmQOArWZ13Poa_hqw8DsQHfmuDyYjp0b4gmUodFNQ@mail.gmail.com>
On 2026-07-20T04:13:44, James Hilliard <[email protected]> wrote:
> crypto: aes: add software-key provider dispatch
>
> Generic callers which supply an AES key need a provider-owned slot policy,
> since hardware may reserve or preload particular key slots. Selecting only
> UCLASS_AES device zero also prevents a later provider from handling an
> operation unsupported by the first device.
>
> Add a callback through which each provider exposes a slot for
> software-provided keys. Add a CBC decrypt helper which probes providers in
> order, continuing only when a provider explicitly reports an unsupported
> operation and preserving hard probe, setup and decrypt failures.
>
> Use slot zero for the software provider and avoid Tegra's preloaded SBK
> slot. Add sandbox coverage for provider fallback and hard-error
> propagation.
>
> Signed-off-by: James Hilliard <[email protected]>
>
> drivers/crypto/aes/aes-sw.c      |   6 ++
>  drivers/crypto/aes/aes-uclass.c  |  73 +++++++++++++++++++
>  drivers/crypto/tegra/tegra_aes.c |   7 ++
>  include/uboot_aes.h              |  66 +++++++++++++++--
>  test/dm/aes.c                    | 149 +++++++++++++++++++++++++++++++++++++++
>  5 files changed, 297 insertions(+), 4 deletions(-)

Reviewed-by: Simon Glass <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.