[0/5] Support for dm-crypt LUKS devices
mbox series

Message ID 20190215003603.16285-1-sam@mendozajonas.com
Headers show
Series
  • Support for dm-crypt LUKS devices
Related show

Message

Samuel Mendoza-Jonas Feb. 15, 2019, 12:35 a.m. UTC
In this series Petitboot gets support for handling and opening
LUKS-encrypted devices with the cryptsetup utility.
If an encrypted device is discovered Petitboot takes note of it and
presents it in the UI. If selected the user is prompted for a password.
This password is passed to cryptsetup which opens the device and will
result in a new device with a name of the form "luks_xdaX" appearing and
replacing the source device.
On reinit the opened device is closed and removed and must be reopened
by entering the password for the source device again.

Obviously this does not yet support autobooting from encrypted devices
since the password must be manually entered; something to look at next!


Samuel Mendoza-Jonas (5):
  lib/system: Add cryptsetup utility
  lib/process: Add option to pipe to process stdin
  lib: Add AUTH_MSG_DECRYPT
  discover: Recognise and open LUKS encrypted partitions
  ui/ncurses: Add prompt for LUKS device password

 configure.ac                  |   1 +
 discover/device-handler.c     | 134 ++++++++++++++++++++++++++-
 discover/device-handler.h     |   8 ++
 discover/discover-server.c    |  18 +++-
 discover/udev.c               |  33 ++++++-
 lib/pb-protocol/pb-protocol.c |  17 ++++
 lib/pb-protocol/pb-protocol.h |   5 +
 lib/process/process.c         |  33 +++++++
 lib/process/process.h         |   1 +
 lib/system/system.c           |   1 +
 lib/system/system.h           |   1 +
 lib/types/types.c             |   6 ++
 lib/types/types.h             |   1 +
 ui/common/discover-client.c   |  25 +++++
 ui/common/discover-client.h   |   3 +
 ui/ncurses/nc-auth.c          |  30 +++++-
 ui/ncurses/nc-auth.h          |   1 +
 ui/ncurses/nc-cui.c           | 166 +++++++++++++++++++++++++++++++++-
 ui/ncurses/nc-cui.h           |   3 +
 ui/test/discover-test.c       |   2 +
 20 files changed, 474 insertions(+), 15 deletions(-)

Comments

Samuel Mendoza-Jonas March 26, 2019, 5:53 a.m. UTC | #1
On Fri, 2019-02-15 at 11:35 +1100, Samuel Mendoza-Jonas wrote:
> In this series Petitboot gets support for handling and opening
> LUKS-encrypted devices with the cryptsetup utility.
> If an encrypted device is discovered Petitboot takes note of it and
> presents it in the UI. If selected the user is prompted for a password.
> This password is passed to cryptsetup which opens the device and will
> result in a new device with a name of the form "luks_xdaX" appearing and
> replacing the source device.
> On reinit the opened device is closed and removed and must be reopened
> by entering the password for the source device again.
> 
> Obviously this does not yet support autobooting from encrypted devices
> since the password must be manually entered; something to look at next!
> 
> 
> Samuel Mendoza-Jonas (5):
>   lib/system: Add cryptsetup utility
>   lib/process: Add option to pipe to process stdin
>   lib: Add AUTH_MSG_DECRYPT
>   discover: Recognise and open LUKS encrypted partitions
>   ui/ncurses: Add prompt for LUKS device password

Merged as 1ad18bf1, with a fixup to the cryptsetup failure case.

> 
>  configure.ac                  |   1 +
>  discover/device-handler.c     | 134 ++++++++++++++++++++++++++-
>  discover/device-handler.h     |   8 ++
>  discover/discover-server.c    |  18 +++-
>  discover/udev.c               |  33 ++++++-
>  lib/pb-protocol/pb-protocol.c |  17 ++++
>  lib/pb-protocol/pb-protocol.h |   5 +
>  lib/process/process.c         |  33 +++++++
>  lib/process/process.h         |   1 +
>  lib/system/system.c           |   1 +
>  lib/system/system.h           |   1 +
>  lib/types/types.c             |   6 ++
>  lib/types/types.h             |   1 +
>  ui/common/discover-client.c   |  25 +++++
>  ui/common/discover-client.h   |   3 +
>  ui/ncurses/nc-auth.c          |  30 +++++-
>  ui/ncurses/nc-auth.h          |   1 +
>  ui/ncurses/nc-cui.c           | 166 +++++++++++++++++++++++++++++++++-
>  ui/ncurses/nc-cui.h           |   3 +
>  ui/test/discover-test.c       |   2 +
>  20 files changed, 474 insertions(+), 15 deletions(-)
>