Skip to content

crypto: Add new UCLASS_HASH

Chia-Wei Wang u-boot 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4lib/md5: Export progressive APIsinclude/u-boot/md5.h lib/md5.c+7 -31 reply
2/4dm: hash: Add new UCLASS_HASH supportdrivers/crypto/Kconfig drivers/crypto/Makefile drivers/crypto/hash/Kconfig +4 more+196 -09 replies
3/4crypto: hash: Add software hash DM driverdrivers/crypto/hash/Kconfig drivers/crypto/hash/Makefile drivers/crypto/hash/hash_sw.c+313 -03 replies
4/4fit: Use DM hash driver if supportedcommon/image-fit.c+30 -03 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] crypto: Add new UCLASS_HASH

This patch series proposes new UCLASS_HASH for hash devices. Thus the hash drivers (SW or HW-accelerated) can be developed in the DM-based fashion.

A purely software implemented hash driver is also added under the newly added UCLASS_HASH uclass. In addition, the FIT image hash verification is also updated to leverage the UCLASS_HASH driver if configured.

As there is widly spread use of non-DM hash functions (common/hash.c), this patch does not remove them. More patches are needed if UCLASS_HASH is established.

Chia-Wei Wang (4):
lib/md5: Export progressive APIs
dm: hash: Add new UCLASS_HASH support
crypto: hash: Add software hash DM driver
fit: Use DM hash driver if supported

 common/image-fit.c                |  30 +++
 drivers/crypto/Kconfig            |   2 +
 drivers/crypto/Makefile           |   1 +
 drivers/crypto/hash/Kconfig       |  16 ++
 drivers/crypto/hash/Makefile      |   6 +
 drivers/crypto/hash/hash-uclass.c | 121 ++++++++++++
 drivers/crypto/hash/hash_sw.c     | 301 ++++++++++++++++++++++++++++++
 include/dm/uclass-id.h            |   1 +
 include/u-boot/hash.h             |  61 ++++++
 include/u-boot/md5.h              |   4 +
 lib/md5.c                         |   6 +-
 11 files changed, 546 insertions(+), 3 deletions(-)
 create mode 100644 drivers/crypto/hash/Kconfig
 create mode 100644 drivers/crypto/hash/Makefile
 create mode 100644 drivers/crypto/hash/hash-uclass.c
 create mode 100644 drivers/crypto/hash/hash_sw.c
 create mode 100644 include/u-boot/hash.h
Signature · 1 line
2.17.1