All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Support for LUKS2 disc encryption
@ 2019-11-02 18:06 Patrick Steinhardt
  2019-11-02 18:06 ` [PATCH 1/6] jsmn: Add JSON parser Patrick Steinhardt
                   ` (11 more replies)
  0 siblings, 12 replies; 87+ messages in thread
From: Patrick Steinhardt @ 2019-11-02 18:06 UTC (permalink / raw)
  To: grub-devel; +Cc: Patrick Steinhardt

Hi,

as you probably know, the cryptsetup project has introduced a new
format LUKS2 in 2017 which is incompatible with the previous
format. GRUB is thus currently not able to boot from disks
encrypted with the newer format.

Both formats do in fact differ quite a lot. While the old one
used a single binary header, LUKS2 one uses a binary header to
identify a JSON header that contains all encryption parameters.
The intent of the cryptsetup project is to be more flexible than
they have previously been with the binary header, but that also
required me to pull in a JSON parser. I hope to have found one
that doesn't generate too much controversy, but let's see.

Anyway. This patch set implements support for key derival via
PBKDF2, only. LUKS2 has also introduced the Argon2i/Argon2id
KDFs, but as libgcrypt does not currently support these I've
decided to first go the simple route of adding PBKDF2, only. GRUB
could probably pull in Argon2i as another dependency, but I
focussed on getting basic support for LUKS2 ready first.

So the result is a new module "luks2" that is able to decrypt and
read LUKS2-encrypted partitions that use PBKDF2 as KDF.

Regards
Patrick

Patrick Steinhardt (6):
  jsmn: Add JSON parser
  jsmn: Add convenience functions
  bootstrap: Add gnulib's base64 module
  afsplitter: Move into its own module
  luks: Move configuration of ciphers into cryptodisk
  disk: Implement support for LUKS2

 Makefile.util.def                             |   1 +
 bootstrap.conf                                |   3 +-
 conf/Makefile.extra-dist                      |   1 +
 docs/grub.texi                                |   2 +-
 grub-core/Makefile.core.def                   |  14 +-
 grub-core/disk/AFSplitter.c                   |   3 +
 grub-core/disk/cryptodisk.c                   | 163 ++++-
 grub-core/disk/luks.c                         | 188 +----
 grub-core/disk/luks2.c                        | 685 ++++++++++++++++++
 grub-core/lib/gnulib-patches/fix-base64.patch |  26 +
 include/grub/cryptodisk.h                     |   3 +
 include/grub/jsmn.h                           | 579 +++++++++++++++
 12 files changed, 1491 insertions(+), 177 deletions(-)
 create mode 100644 grub-core/disk/luks2.c
 create mode 100644 grub-core/lib/gnulib-patches/fix-base64.patch
 create mode 100644 include/grub/jsmn.h

-- 
2.23.0



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

end of thread, other threads:[~2020-01-10 14:32 UTC | newest]

Thread overview: 87+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-02 18:06 [PATCH 0/6] Support for LUKS2 disc encryption Patrick Steinhardt
2019-11-02 18:06 ` [PATCH 1/6] jsmn: Add JSON parser Patrick Steinhardt
2019-11-02 18:06 ` [PATCH 2/6] jsmn: Add convenience functions Patrick Steinhardt
2019-11-04 10:26   ` Max Tottenham
2019-11-04 11:00     ` Patrick Steinhardt
2019-11-04 17:42       ` Daniel Kiper
2019-11-04 18:56         ` Patrick Steinhardt
2019-11-06 11:44           ` Daniel Kiper
2019-11-06 13:08             ` Patrick Steinhardt
2019-11-13 11:16               ` Daniel Kiper
2019-11-02 18:06 ` [PATCH 3/6] bootstrap: Add gnulib's base64 module Patrick Steinhardt
2019-11-04 10:30   ` Max Tottenham
2019-11-04 11:02     ` Patrick Steinhardt
2019-11-02 18:06 ` [PATCH 4/6] afsplitter: Move into its own module Patrick Steinhardt
2019-11-02 18:06 ` [PATCH 5/6] luks: Move configuration of ciphers into cryptodisk Patrick Steinhardt
2019-11-02 18:06 ` [PATCH 6/6] disk: Implement support for LUKS2 Patrick Steinhardt
2019-11-05  6:58 ` [PATCH v2 0/6] Support for LUKS2 disk encryption Patrick Steinhardt
2019-11-05  6:58   ` [PATCH v2 1/6] json: Import upstream jsmn-1.1.0 Patrick Steinhardt
2019-11-05  6:58   ` [PATCH v2 2/6] json: Implement wrapping interface Patrick Steinhardt
2019-11-05  9:54     ` Max Tottenham
2019-11-05  6:58   ` [PATCH v2 3/6] bootstrap: Add gnulib's base64 module Patrick Steinhardt
2019-11-06 12:04     ` Daniel Kiper
2019-11-05  6:58   ` [PATCH v2 4/6] afsplitter: Move into its own module Patrick Steinhardt
2019-11-06 12:06     ` Daniel Kiper
2019-11-05  6:58   ` [PATCH v2 5/6] luks: Move configuration of ciphers into cryptodisk Patrick Steinhardt
2019-11-06 12:22     ` Daniel Kiper
2019-11-05  6:58   ` [PATCH v2 6/6] disk: Implement support for LUKS2 Patrick Steinhardt
2019-11-13 13:22 ` [PATCH v3 0/6] Support for LUKS2 disk encryption Patrick Steinhardt
2019-11-13 13:22   ` [PATCH v3 1/6] json: Import upstream jsmn-1.1.0 Patrick Steinhardt
2019-11-14 10:15     ` Daniel Kiper
2019-11-13 13:22   ` [PATCH v3 2/6] json: Implement wrapping interface Patrick Steinhardt
2019-11-14 12:37     ` Daniel Kiper
2019-11-14 13:12       ` Patrick Steinhardt
2019-11-15 11:56         ` Daniel Kiper
2019-11-15 12:36           ` Patrick Steinhardt
2019-11-18 14:45             ` Daniel Kiper
2019-11-26  6:22               ` Patrick Steinhardt
2019-11-13 13:22   ` [PATCH v3 3/6] bootstrap: Add gnulib's base64 module Patrick Steinhardt
2019-11-13 13:22   ` [PATCH v3 4/6] afsplitter: Move into its own module Patrick Steinhardt
2019-11-13 13:22   ` [PATCH v3 5/6] luks: Move configuration of ciphers into cryptodisk Patrick Steinhardt
2019-11-13 13:22   ` [PATCH v3 6/6] disk: Implement support for LUKS2 Patrick Steinhardt
2019-11-15 12:31     ` Daniel Kiper
2019-11-15 12:55       ` Patrick Steinhardt
2019-11-18  8:45 ` [PATCH v4 0/6] Support for LUKS2 disk encryption Patrick Steinhardt
2019-11-18  8:45   ` [PATCH v4 1/6] json: Import upstream jsmn-1.1.0 Patrick Steinhardt
2019-11-18  8:45   ` [PATCH v4 2/6] json: Implement wrapping interface Patrick Steinhardt
2019-11-18 14:14     ` Daniel Kiper
2019-11-18 15:46       ` Patrick Steinhardt
2019-11-18 16:29         ` Daniel Kiper
2019-11-18  8:45   ` [PATCH v4 3/6] bootstrap: Add gnulib's base64 module Patrick Steinhardt
2019-11-18  8:45   ` [PATCH v4 4/6] afsplitter: Move into its own module Patrick Steinhardt
2019-11-18  8:45   ` [PATCH v4 5/6] luks: Move configuration of ciphers into cryptodisk Patrick Steinhardt
2019-11-18  8:45   ` [PATCH v4 6/6] disk: Implement support for LUKS2 Patrick Steinhardt
2019-11-18 14:33     ` Daniel Kiper
2019-11-29  6:51 ` [PATCH v5 0/6] Support for LUKS2 disk encryption Patrick Steinhardt
2019-11-29  6:51   ` [PATCH v5 1/6] json: Import upstream jsmn-1.1.0 Patrick Steinhardt
2019-11-29  6:51   ` [PATCH v5 2/6] json: Implement wrapping interface Patrick Steinhardt
2019-11-29 15:34     ` Daniel Kiper
2019-12-06 17:24       ` Patrick Steinhardt
2019-12-08 22:49         ` Daniel Kiper
2019-11-29  6:51   ` [PATCH v5 3/6] bootstrap: Add gnulib's base64 module Patrick Steinhardt
2019-11-29  6:51   ` [PATCH v5 4/6] afsplitter: Move into its own module Patrick Steinhardt
2019-11-29  6:51   ` [PATCH v5 5/6] luks: Move configuration of ciphers into cryptodisk Patrick Steinhardt
2019-11-29  6:51   ` [PATCH v5 6/6] disk: Implement support for LUKS2 Patrick Steinhardt
2019-12-10  9:26 ` [PATCH v6 0/6] Support for LUKS2 disk encryption Patrick Steinhardt
2019-12-10  9:26   ` [PATCH v6 1/6] json: Import upstream jsmn-1.1.0 Patrick Steinhardt
2019-12-10  9:26   ` [PATCH v6 2/6] json: Implement wrapping interface Patrick Steinhardt
2019-12-13 18:56     ` Daniel Kiper
2019-12-10  9:26   ` [PATCH v6 3/6] bootstrap: Add gnulib's base64 module Patrick Steinhardt
2019-12-10  9:26   ` [PATCH v6 4/6] afsplitter: Move into its own module Patrick Steinhardt
2019-12-10  9:26   ` [PATCH v6 5/6] luks: Move configuration of ciphers into cryptodisk Patrick Steinhardt
2019-12-10  9:26   ` [PATCH v6 6/6] disk: Implement support for LUKS2 Patrick Steinhardt
2019-12-16 12:25     ` Daniel Kiper
2019-12-16 12:37       ` Patrick Steinhardt
2019-12-16 13:05         ` Daniel Kiper
2019-12-16 13:10           ` Patrick Steinhardt
2019-12-16 13:15             ` Daniel Kiper
2019-12-20 19:33   ` [PATCH v6 0/6] Support for LUKS2 disk encryption Daniel Kiper
2019-12-27 15:08     ` Patrick Steinhardt
2019-12-27 15:18 ` [PATCH v7 " Patrick Steinhardt
2019-12-27 15:18   ` [PATCH v7 1/6] json: Import upstream jsmn-1.1.0 Patrick Steinhardt
2019-12-27 15:18   ` [PATCH v7 2/6] json: Implement wrapping interface Patrick Steinhardt
2019-12-27 15:18   ` [PATCH v7 3/6] bootstrap: Add gnulib's base64 module Patrick Steinhardt
2019-12-27 15:18   ` [PATCH v7 4/6] afsplitter: Move into its own module Patrick Steinhardt
2019-12-27 15:18   ` [PATCH v7 5/6] luks: Move configuration of ciphers into cryptodisk Patrick Steinhardt
2019-12-27 15:18   ` [PATCH v7 6/6] disk: Implement support for LUKS2 Patrick Steinhardt
2020-01-10 14:23   ` [PATCH v7 0/6] Support for LUKS2 disk encryption Daniel Kiper

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.