From patchwork Mon May 4 19:26:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tadeusz Struk X-Patchwork-Id: 6329561 Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 49DEDBEEE1 for ; Mon, 4 May 2015 19:30:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 353B4202F2 for ; Mon, 4 May 2015 19:30:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3439B20266 for ; Mon, 4 May 2015 19:30:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751428AbbEDTaR (ORCPT ); Mon, 4 May 2015 15:30:17 -0400 Received: from mga03.intel.com ([134.134.136.65]:17908 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752134AbbEDTaI (ORCPT ); Mon, 4 May 2015 15:30:08 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 04 May 2015 12:29:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,367,1427785200"; d="scan'208";a="720522361" Received: from tstruk-mobl1.jf.intel.com (HELO tstruk-mobl1.intel.com) ([134.134.171.82]) by fmsmga002.fm.intel.com with ESMTP; 04 May 2015 12:29:49 -0700 Message-ID: <5547C7F0.5010905@intel.com> Date: Mon, 04 May 2015 12:26:40 -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: Herbert Xu CC: David Howells , 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> <5543C348.9060004@intel.com> <20150503000744.GB16211@gondor.apana.org.au> In-Reply-To: <20150503000744.GB16211@gondor.apana.org.au> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 05/02/2015 05:07 PM, Herbert Xu wrote: >>>> > >> #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? > Indeed you can't use this hole as it'll make you a hash algorithm. So in this case isn't RNG a hash algorithm as well? Anyway will something like this be ok with you: --- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/crypto.h b/include/linux/crypto.h index ee14140..ac18cd3 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h @@ -41,7 +41,7 @@ /* * Algorithm masks and types. */ -#define CRYPTO_ALG_TYPE_MASK 0x0000000f +#define CRYPTO_ALG_TYPE_MASK 0xf000000f #define CRYPTO_ALG_TYPE_CIPHER 0x00000001 #define CRYPTO_ALG_TYPE_COMPRESS 0x00000002 #define CRYPTO_ALG_TYPE_AEAD 0x00000003 @@ -54,6 +54,7 @@ #define CRYPTO_ALG_TYPE_AHASH 0x0000000a #define CRYPTO_ALG_TYPE_RNG 0x0000000c #define CRYPTO_ALG_TYPE_PCOMPRESS 0x0000000f +#define CRYPTO_ALG_TYPE_PKE 0x10000001 #define CRYPTO_ALG_TYPE_HASH_MASK 0x0000000e #define CRYPTO_ALG_TYPE_AHASH_MASK 0x0000000c