From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_NEOMUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03D20C43381 for ; Thu, 28 Feb 2019 07:11:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CFA7321850 for ; Thu, 28 Feb 2019 07:11:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731471AbfB1HLr (ORCPT ); Thu, 28 Feb 2019 02:11:47 -0500 Received: from vmicros1.altlinux.org ([194.107.17.57]:38646 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731467AbfB1HLr (ORCPT ); Thu, 28 Feb 2019 02:11:47 -0500 Received: from imap.altlinux.org (imap.altlinux.org [194.107.17.38]) by vmicros1.altlinux.org (Postfix) with ESMTP id B188372CC53; Thu, 28 Feb 2019 10:11:43 +0300 (MSK) Received: from altlinux.org (sole.flsd.net [185.75.180.6]) by imap.altlinux.org (Postfix) with ESMTPSA id 9C7434A4AE7; Thu, 28 Feb 2019 10:11:43 +0300 (MSK) Date: Thu, 28 Feb 2019 10:11:43 +0300 From: Vitaly Chikunov To: Herbert Xu , David Howells , Mimi Zohar , Dmitry Kasatkin , linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 1/4] X.509: Parse public key parameters from x509 for akcipher Message-ID: <20190228071143.mstflzxozj4bfpix@altlinux.org> Mail-Followup-To: Herbert Xu , David Howells , Mimi Zohar , Dmitry Kasatkin , linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190106133608.820-1-vt@altlinux.org> <20190106133608.820-2-vt@altlinux.org> <20190209214240.56gq7ivn3pw3bssf@altlinux.org> <20190210184628.yupsxgjlaicwbxg6@altlinux.org> <20190219043732.x3sbwzqlz4ikntxo@gondor.apana.org.au> <20190224064840.hii4ccjksjdnewae@altlinux.org> <20190228061444.3escryzoit3idtwg@gondor.apana.org.au> <20190228070449.gjwoq4c2b3x5grie@altlinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20190228070449.gjwoq4c2b3x5grie@altlinux.org> User-Agent: NeoMutt/20171215-106-ac61c7 Sender: linux-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org On Thu, Feb 28, 2019 at 10:04:49AM +0300, Vitaly Chikunov wrote: > Herbert, > > On Thu, Feb 28, 2019 at 02:14:44PM +0800, Herbert Xu wrote: > > On Sun, Feb 24, 2019 at 09:48:40AM +0300, Vitaly Chikunov wrote: > > > > > > If we pass SubjectPublicKeyInfo into set_pub_key itself (making > > > set_params not needed) we will break ABI and compatibility with RSA > > > drivers, because whole SubjectPublicKeyInfo is not expected by the > > > > This compatibility does not matter. We can always add translating > > layers into the crypto API to deal with this. The only ABI that > > matters is the one to user-space. > > It seems that you insist on set_params to be removed and both key and > params to be passed into set_{pub,priv}_key. This means reworking all > existing RSA drivers and callers, right? Can you please confirm that > huge rework to avoid misunderstanding? > > I think to pass SubjectPublicKeyInfo into set_*_key would be overkill, > because TPM drivers may not have it and we would need BER encoder just > for that. > > So, probably, something simple like length, key data, length, params data > will be enough? Or maybe we could just add additional argument to set_{pub,priv}_key? (If you agree to change that ABI anyway). > Thanks,