Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp306340pxj; Fri, 14 May 2021 04:05:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+CDuX3hMfvfUdY2waecfkLGbKGLyAX/DDAGdOhjDMviHD8SZ+Gzzf94dT4Id4FJt60JYI X-Received: by 2002:a05:6638:1928:: with SMTP id p40mr43706922jal.22.1620990322439; Fri, 14 May 2021 04:05:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620990322; cv=none; d=google.com; s=arc-20160816; b=I7lRLgWncIR4iaRo988uIEmPQofX9WFMSc2IDJFmUl0recAbfJxW1nMiT4cIG6Ny0/ AxTQeC+WSUpJzPQFkES6Tfbxppp7n11bQjTlzuxL0HrX3m2xbfEtBE139lHoTYhzldUi dY6rJiO9Tq2L2pQctKyf6lgrxXslJkIJjTLHJcjFmZ5FhVtKX3Ryv7sqYfpbf8l4+diG 5xn7OSgMJyOjTrcUqpU6wVAEnUYSnlbmpgiYUEFbueOINmDE+hnOfRHXK3WON8Pp4dmk SwEuOIZfp97wgqXV/gW4jHxWNtNZ0UKa4rxlEogPb9ddS8NRq23pyTUI9w7zaIBp3UkN 8DJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Z1r46KphlAz+Ul4PZMMlIsvaijYnyaN/jvSjnnBfACk=; b=L/m2nu9kDp6Wg5Ts/GG33qhKC6ZAT12l9bzn98rm3LZ68MepypkI/TX1A4jXMGyoyt a4nDnJR/OaZWOrWF8AOsfJ2gC3wMFbHTJWp7sbdxmwgSynRlTT1y2R2XhG15ys59rSk2 Mmzmfd6tvMygWoyTltPEu9VqLjuNxLJZCw6tV/vWFRfBuW0zTvmt9Fito92nBT5ZZJJv t7P4kjVF9e5mBR1euzXx3gzSSEBBwyKl6O929iypbW2P1dsXHayiLVwPBldCWNnBK7Ye jRRTH/yE/Z0EdolcG3SLIxFh5Aps3V/6VhTiN4h+9E4fsqOrpRHbPOssbfNrPRzCWCLg aOyQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 15si7371627ilz.158.2021.05.14.04.04.48; Fri, 14 May 2021 04:05:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231967AbhENKrc (ORCPT + 99 others); Fri, 14 May 2021 06:47:32 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:37054 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231600AbhENKrc (ORCPT ); Fri, 14 May 2021 06:47:32 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtp (Exim 4.89 #2 (Debian)) id 1lhVKb-0002FW-O5; Fri, 14 May 2021 18:46:09 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1lhVK3-0006WD-Hm; Fri, 14 May 2021 18:45:35 +0800 Date: Fri, 14 May 2021 18:45:35 +0800 From: Herbert Xu To: Varad Gautam Cc: linux-crypto@vger.kernel.org, dhowells@redhat.com, davem@davemloft.net, vt@altlinux.org, tianjia.zhang@linux.alibaba.com, keyrings@vger.kernel.org, linux-kernel@vger.kernel.org, jarkko@kernel.org Subject: Re: [PATCH v3 13/18] crypto: rsa-psspad: Get signature parameters from a given signature Message-ID: <20210514104535.q4zjtshxroruvoz3@gondor.apana.org.au> References: <20210420114124.9684-1-varad.gautam@suse.com> <20210420114124.9684-14-varad.gautam@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210420114124.9684-14-varad.gautam@suse.com> User-Agent: NeoMutt/20170113 (1.7.2) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, Apr 20, 2021 at 01:41:18PM +0200, Varad Gautam wrote: > > +static int psspad_set_sig_params(struct crypto_akcipher *tfm, > + const void *sig, > + unsigned int siglen) > +{ > + struct akcipher_instance *inst = akcipher_alg_instance(tfm); > + struct rsapad_inst_ctx *ictx = akcipher_instance_ctx(inst); > + const struct public_key_signature *s = sig; > + > + if (!sig) > + return -EINVAL; > + > + ictx->salt_len = s->salt_length; > + ictx->mgf_hash_algo = s->mgf_hash_algo; Is there any reason why this couldn't be embedded into the key instead? Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt