Return-Path: Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Fri, 28 Feb 2020 12:19:33 +0100 (CET) Received: by mail-wm1-x32d.google.com with SMTP id t23so2811675wmi.1 for ; Fri, 28 Feb 2020 03:19:33 -0800 (PST) References: <1773679096.296875.1582427305488.ref@mail.yahoo.com> <1773679096.296875.1582427305488@mail.yahoo.com> From: Milan Broz Message-ID: <621f50cd-c01b-f9fe-3db2-2d16fe78dca1@gmail.com> Date: Fri, 28 Feb 2020 12:19:30 +0100 MIME-Version: 1.0 In-Reply-To: <1773679096.296875.1582427305488@mail.yahoo.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dm-crypt] LUKS header and token List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?SlQgTW9yw6ll?= , dm-crypt@saout.de On 23/02/2020 04:08, JT Morée wrote: > Hello all, I am researching the LUKS2 format for a project I am > working on. After reading the LUKS2 spec and searching for > information on the token feature using the JSON header sections I > still have lots of questions. In this post Milan mentions that he > wants to write an article on the token feature > https://marc.info/?l=dm-crypt&m=157235464607551&w=2 > > It's not that long ago and I'm assuming the article is not done. Is > there any other place I can look for examples and info on the token > feature? Currently there is only LUKS2 doc. I had unfortunately some other serious issues so I cannot promise any ETA here. > To get started, I need to make sure that I understand the LUKS > header. It's stored in the clear? Both binary and json data? It is > metadata that includes keyslots that are encrypted data but the > header itself is not encrypted. Read https://gitlab.com/cryptsetup/LUKS2-docs Token is basically just JSON object that user application can process itself, it is stored in clear LUKS header area. Some trivial example is in source code in misc/luks2_keyslot_example. There is a plan to extend this interface in next major version, I expect we have some better examples in that time. > The json sections can store arbitrary data that allows processes to > use the LUKS header to implement other features such as working with > smart cards? That's what I understand from the docs I have read so > far. Partially, it can store these data, but there is no dynamic loading of any extension, so you need to write own application to process these data. So yes, the plan is to use it for TPM or SmartCard data, but keep the hw dependence out of the core cryptsetup library. Sorry for late response, Milan