All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/7] common: Introduce crypt-style password support
@ 2021-05-10  6:19 Steffen Jaeckel
  2021-05-10  6:19 ` [PATCH v2 1/7] lib: add crypt subsystem Steffen Jaeckel
                   ` (6 more replies)
  0 siblings, 7 replies; 23+ messages in thread
From: Steffen Jaeckel @ 2021-05-10  6:19 UTC (permalink / raw)
  To: u-boot


This patchset introduces support for crypt-style passwords to unlock
the console in autoboot mode.

The implementation of crypt-sha256 and crypt-sha512 originate from
libxcrypt at https://github.com/besser82/libxcrypt.git
Version v4.4.17
Git commit hash 6b110bc

I didn't re-format those two files to make diffing to the original
versions from libxcrypt easier, which leads to a huge load of
checkpatch.pl warnings&errors. Please advise on whether they should be
re-formatted or can be kept as is.

The remaining warnings from checkpatch.pl are intentional resp. open for
discussion.

A sandbox defconfig with password entry has been added. I'm not sure
whether this should be kept or not, it's just there as an example.

Cheers,
Steffen

Changes in v2:
Update Kconfig way of enabling, setting hashes etc.

Changes in v1:
Added unit-tests of crypt_compare()
Wrapped crypt functions to encapsulate errno

Steffen Jaeckel (7):
  lib: add crypt subsystem
  lib: wrap crypt API to hide errno usage
  common: integrate crypt-based passwords
  common: Rename macro appropriately
  cmd: allow disabling of timeout for password entry
  configs: add new values to bcm963158 defconfig
  configs: add new sandbox with crypt-based password

 common/Kconfig.boot                 |  45 +++-
 common/autoboot.c                   | 104 +++++++--
 configs/bcm963158_ram_defconfig     |   8 +
 configs/sandbox_cryptpass_defconfig | 296 +++++++++++++++++++++++
 include/crypt.h                     |  14 ++
 lib/Kconfig                         |   1 +
 lib/Makefile                        |   1 +
 lib/crypt/Kconfig                   |  28 +++
 lib/crypt/Makefile                  |  10 +
 lib/crypt/alg-sha256.h              |  11 +
 lib/crypt/alg-sha512.h              |  11 +
 lib/crypt/crypt-port.h              |  30 +++
 lib/crypt/crypt-sha256.c            | 335 ++++++++++++++++++++++++++
 lib/crypt/crypt-sha512.c            | 350 ++++++++++++++++++++++++++++
 lib/crypt/crypt.c                   |  76 ++++++
 test/Kconfig                        |   9 +
 test/lib/Makefile                   |   1 +
 test/lib/test_crypt.c               |  64 +++++
 18 files changed, 1373 insertions(+), 21 deletions(-)
 create mode 100644 configs/sandbox_cryptpass_defconfig
 create mode 100644 include/crypt.h
 create mode 100644 lib/crypt/Kconfig
 create mode 100644 lib/crypt/Makefile
 create mode 100644 lib/crypt/alg-sha256.h
 create mode 100644 lib/crypt/alg-sha512.h
 create mode 100644 lib/crypt/crypt-port.h
 create mode 100644 lib/crypt/crypt-sha256.c
 create mode 100644 lib/crypt/crypt-sha512.c
 create mode 100644 lib/crypt/crypt.c
 create mode 100644 test/lib/test_crypt.c

-- 
2.31.1

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2021-05-12 16:17 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-10  6:19 [PATCH v2 0/7] common: Introduce crypt-style password support Steffen Jaeckel
2021-05-10  6:19 ` [PATCH v2 1/7] lib: add crypt subsystem Steffen Jaeckel
2021-05-10  6:19 ` [PATCH v2 2/7] lib: wrap crypt API to hide errno usage Steffen Jaeckel
2021-05-10 16:27   ` Simon Glass
2021-05-10 17:05     ` Steffen Jaeckel
2021-05-10  6:19 ` [PATCH v2 3/7] common: integrate crypt-based passwords Steffen Jaeckel
2021-05-10 16:27   ` Simon Glass
2021-05-10 17:05     ` Steffen Jaeckel
2021-05-10 19:19       ` Simon Glass
2021-05-10 20:05         ` Steffen Jaeckel
2021-05-10 20:24           ` Simon Glass
2021-05-10 20:36             ` Steffen Jaeckel
2021-05-10 20:45               ` Simon Glass
2021-05-11 15:02                 ` Steffen Jaeckel
2021-05-11 15:27                   ` Simon Glass
2021-05-11 18:29                     ` Steffen Jaeckel
2021-05-12 16:17                       ` Simon Glass
2021-05-10  6:19 ` [PATCH v2 4/7] common: Rename macro appropriately Steffen Jaeckel
2021-05-10  6:19 ` [PATCH v2 5/7] cmd: allow disabling of timeout for password entry Steffen Jaeckel
2021-05-10  6:19 ` [PATCH v2 6/7] configs: add new values to bcm963158 defconfig Steffen Jaeckel
2021-05-10  6:19 ` [PATCH v2 7/7] configs: add new sandbox with crypt-based password Steffen Jaeckel
2021-05-10 16:28   ` Simon Glass
2021-05-10 17:04     ` Steffen Jaeckel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.