Re: [PATCH v4 2/2] luks2: Fix decoding of digests and salts with escaped chars

2022-07-11 Thread Patrick Steinhardt
On Thu, Jun 30, 2022 at 06:05:12PM +0200, Daniel Kiper wrote: > On Mon, Jun 06, 2022 at 07:29:00AM +0200, Patrick Steinhardt wrote: > > It was reported in the #grub IRC channel on Libera that decryption of > > LUKS2 partitions fails with errors about invalid digests and/or salts. > > In all of thes

[PATCH v5 0/2] luks2: Fix decoding of digests and salts with escaped chars

2022-07-11 Thread Patrick Steinhardt
Hi, this is the fifth version of my patch series which fixes decoding of digests and salts in LUKS2 headers in case they happen to contain escaped characters. While modern cryptsetup versions in fact don't escape any characters part of the Base64 alphabet, old versions of cryptsetup did this until

[PATCH v5 1/2] json: Add function to unescape JSON-encoded strings

2022-07-11 Thread Patrick Steinhardt
JSON strings require certain characters to be encoded, either by using a single reverse solidus character "\" for a set of popular characters, or by using a Unicode representation of "\uX". The jsmn library doesn't handle unescaping for us, so we must implement this functionality for ourselves.

[PATCH v5 2/2] luks2: Fix decoding of digests and salts with escaped chars

2022-07-11 Thread Patrick Steinhardt
It was reported in the #grub IRC channel on Libera that decryption of LUKS2 partitions fails with errors about invalid digests and/or salts. In all of these cases, what failed was decoding the Base64 representation of these, where the encoded data contained invalid characters. As it turns out, the

Re: [PATCH v5 1/2] json: Add function to unescape JSON-encoded strings

2022-07-11 Thread Nicholas Vinson
On 7/11/22 06:44, Patrick Steinhardt wrote: JSON strings require certain characters to be encoded, either by using a single reverse solidus character "\" for a set of popular characters, or by using a Unicode representation of "\uX". The jsmn library doesn't handle unescaping for us, so we mu

[PATCH v4 1/1] plainmount: Support plain encryption mode

2022-07-11 Thread Maxim Fomin
--- Original Message --- On Sunday, July 10th, 2022 at 9:07 PM, Glenn Washburn wrote: > > + > > +plainmount hd0,gpt1 -o 1048576 > > + > > + > > +both create virtual devices with 1MiB offset on top of the specified > > partition. The > > +option @option{-o} is useful to specify offset wh