Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp277799img; Wed, 27 Feb 2019 22:17:48 -0800 (PST) X-Google-Smtp-Source: AHgI3IZrT26CFzg0eb6f4PT3fvYtbi2qiGh2UzHC80QLh9cr11c8bFH3BlLpZ02P7jeG1GmSp5n9 X-Received: by 2002:a17:902:20e2:: with SMTP id v31mr6349824plg.307.1551334668711; Wed, 27 Feb 2019 22:17:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551334668; cv=none; d=google.com; s=arc-20160816; b=MzVBPLql1NgU5duH3UMaX71TVEu0KCy88Sx1WLj55R4iaXtg3pVZFH31Vpwsv4FE1q OmgGBdGazJS6zEEhnLr4dzWhd7aMQ0+DgtCid1Mqgb1wQvGtaXA7HJTujtY0GtVslsyu Lhaas8ohCwSs/oP7X3O/wUrJB149df7xSZw+coko1tpgb/V/mw5a7VCBvCUbgn7LvIUW b3PuHWZu57h8t4qImwwpm2FJ4IJiOxDVtb9n5suZb6Z2NobGYfZzp233PJyAKPaFrTmX XoVOkLzWhpbmdBH/M+72+nH7M95TypKLyq4XXxz0mlOS85owE7ClO/GRXDa0aPRwJfeo EzHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date; bh=+Am9Vz7QCsXp/rpZiZ1XOje3HPLo5mLCS0xiZ56CGjc=; b=iFTERY+iUbM/sxAdYn94liiZfszV5097KXvZZnwWr0oCx9GJIVpcFmusn4O6s4NEDD i8uVcRsqR3UpawBmKFpBrIpR6n8gsko1ntlKFKNwsWyTbLk55PqWWjmgziZYCDw8RYAV gzXW8DSvwyD36MFVMyWDIl75sd7dYSMO9LOQk5viOhHlbpXW5YXkX8bC/lMIBHioSBl7 Sto4BT3XWI1q+gPCpItKKPAI6PR/ZLZSnkJ+mE/3PMVm2qVycon7UC6IrsqPlFx2VNE6 xC7iP6bfhF6IpNcdnPqIZAjkm28growt1B7vHdLjjJaAdme7hVZXXufLnnprsnGJnVpV X2Vw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g12si17180518plt.98.2019.02.27.22.17.33; Wed, 27 Feb 2019 22:17:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730733AbfB1FhL (ORCPT + 99 others); Thu, 28 Feb 2019 00:37:11 -0500 Received: from vmicros1.altlinux.org ([194.107.17.57]:43504 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725862AbfB1FhK (ORCPT ); Thu, 28 Feb 2019 00:37:10 -0500 Received: from imap.altlinux.org (imap.altlinux.org [194.107.17.38]) by vmicros1.altlinux.org (Postfix) with ESMTP id 5545A72CC53; Thu, 28 Feb 2019 08:37:07 +0300 (MSK) Received: from altlinux.org (sole.flsd.net [185.75.180.6]) by imap.altlinux.org (Postfix) with ESMTPSA id 370A64A4AE7; Thu, 28 Feb 2019 08:37:07 +0300 (MSK) Date: Thu, 28 Feb 2019 08:37:07 +0300 From: Vitaly Chikunov To: Mimi Zohar Cc: Herbert Xu , David Howells , linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 04/10] crypto: akcipher - new verify API for public key algorithms Message-ID: <20190228053707.xdod46ohnobtyt4g@altlinux.org> Mail-Followup-To: Mimi Zohar , Herbert Xu , David Howells , linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190224060828.2527-1-vt@altlinux.org> <20190224060828.2527-5-vt@altlinux.org> <1551310117.10911.108.camel@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1551310117.10911.108.camel@linux.ibm.com> User-Agent: NeoMutt/20171215-106-ac61c7 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 27, 2019 at 06:28:37PM -0500, Mimi Zohar wrote: > > On Sun, 2019-02-24 at 09:08 +0300, Vitaly Chikunov wrote: > > Previous akcipher .verify() just `decrypts' (using RSA encrypt which is > > using public key) signature to uncover message hash, which was then > > compared in upper level public_key_verify_signature() with the expected > > hash value, which itself was never passed into verify(). > > > > This approach was incompatible with EC-DSA family of algorithms, > > because, to verify a signature EC-DSA algorithm also needs a hash value > > as input; then it's used (together with a signature divided into halves > > `r||s') to produce a witness value, which is then compared with `r' to > > determine if the signature is correct. Thus, for EC-DSA, nor > > requirements of .verify() itself, nor its output expectations in > > public_key_verify_signature() wasn't sufficient. > > > > Make improved .verify() call which gets hash value as input and produce > > complete signature check without any output besides status. > > > > Now for the top level verification only crypto_akcipher_verify() needs > > to be called. > > All but this patch apply. ?Which branch is this patch based against? This patchest is over 920d7f7215d87005beb4aa2b90b9cb0b74b36947 in cryptodev/master. > > Mimi