From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756185AbcBVW2R (ORCPT ); Mon, 22 Feb 2016 17:28:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35193 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755745AbcBVW2N convert rfc822-to-8bit (ORCPT ); Mon, 22 Feb 2016 17:28:13 -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: <56CB68A2.50505@intel.com> References: <56CB68A2.50505@intel.com> <20160219171806.17223.91381.stgit@warthog.procyon.org.uk> <20160219171836.17223.9507.stgit@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: <1561.1456180090.1@warthog.procyon.org.uk> Content-Transfer-Encoding: 8BIT Date: Mon, 22 Feb 2016 22:28:10 +0000 Message-ID: <1562.1456180090@warthog.procyon.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tadeusz Struk wrote: > I wonder if this should be merged with the crypto/rsa-pkcs1pad.c template > that we already have. Looks like the two do the same padding now. > Should we merge then and pass the hash param as a separate template param, > e.g the public_key would allocate "pkcs1pad(rsa, sha1)"? Ummm... Possibly. Is that how it's used? warthog>git grep pkcs1pad -- Documentation warthog1> 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. I guess if I have to, I can stoop to converting "rsa" to "pkcs1pad(rsa, sha1)". Can you do me a really quick merge? -rc5 is already out, and I want to get it to James pronto - plus I have things that are pending on this change being made. Oh - and how does the padding template find the algorithm DER encoding string to use? I have wondered whether it should be stored in with the hash algorithm, but it probably makes more sense to keep it with the rsa module. David