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] [day] [month] [year] [list]
Message-ID: <5232.1452941513@warthog.procyon.org.uk>
Date:	Sat, 16 Jan 2016 10:51:53 +0000
From:	David Howells <dhowells@...hat.com>
To:	Tadeusz Struk <tadeusz.struk@...el.com>
Cc:	dhowells@...hat.com, David Woodhouse <dwmw2@...radead.org>,
	Tadeusz Struk <tstruk@...il.com>, herbert@...dor.apana.org.au,
	smueller@...onox.de, linux-api@...r.kernel.org,
	marcel@...tmann.org, linux-kernel@...r.kernel.org,
	keyrings@...r.kernel.org, linux-crypto@...r.kernel.org,
	zohar@...ux.vnet.ibm.com
Subject: Re: [PATCH v2] crypto: AF_ALG - add support for keys/asymmetric-type

Tadeusz Struk <tadeusz.struk@...el.com> wrote:

> I think the coupling of an algorithm to its key is the problem here.
> Usually an algorithm should be able to work with any (valid) key.

A key stored in hardware and used through that hardware won't necessarily
support all crypto operations - it may be restricted to just signing or just
encrypting for example.

> The solution to this can be implemented on the crypto API. 
> If the TMP driver would register its supported algorithms on the crypto API
> and in the setkey function it would check if a key is a real key or this
> "something" (probably a ptr to TMP dev instance?) then in the first
> case it would fallback to an implementation that takes a key data.
> In the second case it can do its thing whatever it is.

>From what Herbert has said, he won't go for that since the TPM keys are
restricted in the operations one can use the key for.

I think the crypto API is what we use when the key data is available to us in
the kernel - but it should be driven through the asymmetric key API.  You ask
the asymmetric key API to verify a key, say, then that will switch to the TPM
driver or to the software public key implementation.  The latter will then
load the appropriate crypto layer akcipher algorithm (eg. RSA) and use that -
where the akcipher implementation will either be a software one or will get
offloaded to some hardware that can do it - but that doesn't itself securely
hold the key.

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ