Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751214AbbEASUy (ORCPT ); Fri, 1 May 2015 14:20:54 -0400 Received: from mga03.intel.com ([134.134.136.65]:11168 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750905AbbEASUv (ORCPT ); Fri, 1 May 2015 14:20:51 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,351,1427785200"; d="scan'208";a="688640775" Message-ID: <5543C348.9060004@intel.com> Date: Fri, 01 May 2015 11:17:44 -0700 From: Tadeusz Struk User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: David Howells CC: Herbert Xu , corbet@lwn.net, keescook@chromium.org, qat-linux@intel.com, jwboyer@redhat.com, richard@nod.at, linux-kernel@vger.kernel.org, steved@redhat.com, vgoyal@redhat.com, james.l.morris@oracle.com, jkosina@suse.cz, zohar@linux.vnet.ibm.com, davem@davemloft.net, linux-crypto@vger.kernel.org Subject: Re: [PATCH RFC 1/2] crypto: add PKE API References: <20150430223652.10157.86151.stgit@tstruk-mobl1> <20150430223647.10157.82156.stgit@tstruk-mobl1> <4227.1430496240@warthog.procyon.org.uk> In-Reply-To: <4227.1430496240@warthog.procyon.org.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1555 Lines: 49 On 05/01/2015 09:04 AM, David Howells wrote: >> +config CRYPTO_PKE > I would prefer CRYPTO_PKEY and pkey rather than pke generally and algo rather > than alg where possible - this will have more consistency with what we have > now. > > I understand, however, that in core crypto code, 'alg' is used. I'm fine with pkey. Herbert do you have preference with regards 'algo' vs 'alg'? >> #define CRYPTO_ALG_TYPE_AHASH 0x0000000a >> > +#define CRYPTO_ALG_TYPE_PKE 0x0000000b >> > #define CRYPTO_ALG_TYPE_RNG 0x0000000c > Will filling a hole cause a problem with something that got obsoleted? I hope not. I checked as far back as 2.6.18 and I don't see any clash. Herbert, what do you think? > >> +struct pke_request { >> > + struct crypto_async_request base; >> > + const struct public_key *pk; >> > + const struct public_key_signature *pks; >> > +}; > I recommend: > > pk -> key or pkey > pks -> sig or signature no problem > >> + u8 pub_mpis; /* Number of MPIs in public key */ >> > + u8 sec_mpis; /* Number of MPIs in secret key */ >> > + u8 sig_mpis; /* Number of MPIs in a signature */ > Keep member names as: > > u8 n_pub_mpi; /* Number of MPIs in public key */ > u8 n_sec_mpi; /* Number of MPIs in secret key */ > u8 n_sig_mpi; /* Number of MPIs in a signature */ same here. thanks -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/