From: git@andred.net (André Draszik)
To: linux-security-module@vger.kernel.org
Subject: [PATCH 3/3] encrypted-keys: document new fscrypt key format
Date: Wed, 17 Jan 2018 14:38:59 +0000 [thread overview]
Message-ID: <1516199939.28972.101.camel@andred.net> (raw)
In-Reply-To: <20180111044801.GB943@zzz.localdomain>
Hi Eric,
On Wed, 2018-01-10 at 20:48 -0800, Eric Biggers wrote:
> Hi Andr?,
>
> On Wed, Jan 10, 2018 at 12:44:18PM +0000, Andr? Draszik wrote:
> > diff --git a/Documentation/security/keys/fscrypt.rst
> > b/Documentation/security/keys/fscrypt.rst
> > new file mode 100644
> > index 000000000000..e4a29592513e
> > --- /dev/null
> > +++ b/Documentation/security/keys/fscrypt.rst
> > @@ -0,0 +1,67 @@
> > +========================================
> > +Encrypted keys for the fscrypt subsystem
> > +========================================
>
> There is now documentation for fscrypt in
> Documentation/filesystems/fscrypt.rst;
> see in particular the "Adding keys" section. The documentation for any
> new ways
> to add keys should go in there.
Done.
>
> > +
> > +fscrypt allows file systems to implement transparent encryption and
> > decryption
> > +of files, similar to eCryptfs, using keys derived from a master key
> > descriptor.
>
> Note that the master key *descriptor* refers to the hex string used in the
> keyring key description. It is not the same as the master key itself,
> which is
> stored in the payload. The cryptography is done with the master key, not
> with
> the master key *descriptor*.
Ups, thanks.
> > [...]
>
> Please be very clear about exactly what security properties are achieved
> by
> using encrypted-keys.
I've left out all of this in the updated documentation, as any such
information should probably be in Documentation/security/keys/trusted-
encrypted.rst in the first place.
>
[...]
> > +
> > +Example of encrypted key usage with the fscrypt subsystem:
> > +
> > +Create an encrypted key "1234567890123456" of length 64 bytes with
> > format
> > +'fscrypt' and save it using a previously loaded user key "test"::
> > +
> > + $ keyctl add encrypted fscrypt:1234567890123456 "new fscrypt
> > user:test 64" @u
> > + 1023935199
> > +
> > + $ keyctl print 1023935199
> > + fscrypt user:test 64
> > e5606689fdc25d78a787249f4069fb3b007e992f4b21d0eda60
> > + c97986fc2e3326b5542e2b32216fc5007d9fd19cd3cb6668fa9850e954d2ba25e1b
> > 8a331
> > + 1b0c1f20666c
> > +
> > + $ keyctl pipe 1023935199 > fscrypt.blob
>
> What is the point of having the kernel wrap a key with the "user" key
> type? It
> seems pointless; userspace could just do it instead.
Yes... My real reasoning is being able to use an encrypted key, backed by a
trusted TPM key.
I've updated the examples.
>
[...]
> I think it's really only "trusted" wrapping keys where this new feature
> would
> have any useful security properties. So the documentation needs to
> explain
> that, and use that in the examples.
You're right. Done.
Cheers,
Andr?
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2018-01-17 14:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-10 12:44 [PATCH 1/3] encrypted-keys: add fscrypt format support André Draszik
2018-01-10 12:44 ` [PATCH 2/3] fscrypt: add support for the encrypted key type André Draszik
2018-01-10 12:44 ` [PATCH 3/3] encrypted-keys: document new fscrypt key format André Draszik
2018-01-11 4:48 ` Eric Biggers
2018-01-17 14:38 ` André Draszik [this message]
2018-01-17 18:05 ` Theodore Ts'o
2018-01-19 9:16 ` André Draszik
2018-01-11 4:00 ` [PATCH 1/3] encrypted-keys: add fscrypt format support Eric Biggers
2018-01-17 14:29 ` André Draszik
2018-01-18 0:18 ` Eric Biggers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1516199939.28972.101.camel@andred.net \
--to=git@andred.net \
--cc=linux-security-module@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).