From: David Howells Subject: [RFC][PATCH 00/16] Asymmetric / Public-key cryptography key type Date: Fri, 14 Sep 2012 00:48:02 +0100 Message-ID: <20120913234802.3575.77103.stgit@warthog.procyon.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: linux-crypto@vger.kernel.org, zohar@us.ibm.com, dmitry.kasatkin@intel.com, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org To: herbert@gondor.hengli.com.au, rusty@rustcorp.com.au Return-path: Sender: linux-security-module-owner@vger.kernel.org List-Id: linux-crypto.vger.kernel.org Hi Herbert, Rusty, I've redone my crypto keys patches to be more specific, implementing an asymmetric key type for containing the stuff required for public-key cryptography and anything else one might want an asymmetric key for. This facility can be used for module signing, firmware signing and eCryptfs. The patches can be found here as well as following this covering note: http://git.kernel.org/?p=linux/kernel/git/dhowells/linux-modsign.git;a=shortlog;h=refs/heads/crypto-keys-post-KS I have arranged things such that: (1) Keys of the asymmetric key type are just simple containers. They have three attributes: (a) A subtype. (b) The data for the subtype. This is entirely defined by the subtype. (c) A binary identifier (in addition to the usual text decription) that can also be used to match the key. (2) The asymmetric key subtype provides the mechanism used to operate with the key. The mechanism can be entirely in-kernel, or can be offloaded to hardware. A completely software subtype is provided that can support a multiplicity of public-key algorithms. One such algorithm is currently provided (RSA). (3) Parsers can be registered that can take the instantiation data and turn it into a subtype pointer, appropriate subtype data, a binary identifier and a proposed description (keys can be auto-described). An X.509 certificate parser is provided. It can be given a certificate like this: keyctl padd asymmetric "" @s