lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <19247.1537288419@warthog.procyon.org.uk>
Date:   Tue, 18 Sep 2018 17:33:39 +0100
From:   David Howells <dhowells@...hat.com>
To:     David Woodhouse <dwmw2@...radead.org>
Cc:     dhowells@...hat.com, Denis Kenzior <denkenz@...il.com>,
        jmorris@...ei.org, keyrings@...r.kernel.org,
        linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 00/22] KEYS: Support TPM-wrapped key and crypto ops

David Woodhouse <dwmw2@...radead.org> wrote:

> You are passing the raw DER to the kernel in both cases, right?

I haven't put a PEM stripper and base64 decoder into the kernel, though we
certainly could do that.  We could even do the decode in-place in the same
buffer since the resulting data would be smaller than the original.

> And the kernel just happens to know that if it receives a bare OCTET-STRING
> it's supposed to treat it as a TPMv1.2 key?

It passes it to each parser in turn till one says it can parse it.  It's not
ideal, but it seems to work - so far.  Better would be to annotate it in some
way.  I have considered annotating the type field so that the payload doesn't
have to have it added:

	keyctl padd asymmetric.x509 "" @s </tmp/foo.x509
	keyctl padd asymmetric.pkcs#8 ...
	keyctl padd asymmetric.tpm ...

However, this doesn't work with "keyctl update" or "keyctl instantiate".

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ