From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753290AbcBWKxZ (ORCPT ); Tue, 23 Feb 2016 05:53:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43516 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752700AbcBWKxV convert rfc822-to-8bit (ORCPT ); Tue, 23 Feb 2016 05:53:21 -0500 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <56CB9B34.20902@intel.com> References: <56CB9B34.20902@intel.com> <56CB68A2.50505@intel.com> <20160219171806.17223.91381.stgit@warthog.procyon.org.uk> <20160219171836.17223.9507.stgit@warthog.procyon.org.uk> <1562.1456180090@warthog.procyon.org.uk> To: Tadeusz Struk Cc: dhowells@redhat.com, keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, zohar@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, Linux Crypto Mailing List Subject: Re: [PATCH 4/8] akcipher: Move the RSA DER encoding to the crypto layer MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12558.1456224799.1@warthog.procyon.org.uk> Content-Transfer-Encoding: 8BIT Date: Tue, 23 Feb 2016 10:53:19 +0000 Message-ID: <12559.1456224799@warthog.procyon.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tadeusz Struk wrote: > > Ummm... Possibly. Is that how it's used? > > > > warthog>git grep pkcs1pad -- Documentation > > warthog1> > > Yes, no docs. Sorry. Can I suggest you at least stick a quick usage summary in the banner comment at the top of the file? > > Anyway, the problem I have with this is that I want to get that knowledge > > out of the asymmetric key in-software public key subtype. It knows "rsa", > > "dsa", "ecdsa", ... because that's all the OIDs tell it. > > Rigth, for now the public_key would need to build the full algorithm string as > follows: > > vsprintf(name, "pkcs1pad(%s, %s)", pkey_algo_name[sig->pkey_algo], > hash_algo_name[sig->pkey_hash_algo]); Does this apply to anything other than RSA? > Do you plan to add more padding schemes later? No plans to, but one never knows. I'm *assuming* that OID_rsaEncryption and OID_sha256WithRSAEncryption, for example, must implicitly specify the padding scheme (RFC4055 suggests I'm right in this assumption). We might have to suppose RSASSA-SSP at some point. > Yes, I can start woring on a subsequent patch based on your changes in > http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=keys-rsa > Is that ok with you? Sure. David