Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1905683ybt; Mon, 15 Jun 2020 12:30:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOrcb+MgwOW0ugJ3r9eBAebfXfzUZrQ4Tl6v/NlEYwV4GqPt7AgpPIywlVS3Ix0RYwltdL X-Received: by 2002:a05:6402:1761:: with SMTP id da1mr11194699edb.68.1592249433459; Mon, 15 Jun 2020 12:30:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592249433; cv=none; d=google.com; s=arc-20160816; b=olUipnFroTFpSrByJY9D/Qk5oY5Lm2KSomoKyDVI6XL0Lp8rkuFww/Cox9IZx+AusM YDSwd82o8SBCPNkBkSOdqbUZRGMVBOWPA4UcD/PUJXPrFyCxNY4pDpWyoEs67RPVkkUM SoEhgfQcIm6dhxhezdYJSXBWcBFfefa0rrtV3dEAdZv9jJ0Fhai22yubaDJ12eyCfB5J Qb8+14o0CFO2/0hbpnvDZVGP2thWIiS6JZXDGy9vGsIQevbHkOJhzSaFzt126odyyrRH FoOqSTy6ZeU90Ec8oQoNBFxBqh30YXroQsEolQ9SZ8ArUBQztxKuVys8C0TwD3LZ4sso p45g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wrQTq2V257VK66v6YOYTmaDSMmIDbXHY8G1KxjTD23k=; b=M6t6M4etd+ak41xWWJO7XJWWSzXvKKSI2UNcAZ9K7UbmoksdlvgkaXmDhsDKbllXTA iKluzZhFOtWAXUd02fpLlZVIi0j11lXKMxbgyU06STcj+Kn0FBo8IjkExFF0Mb9rHo5Z aZSxeTaDHk4tJTt/VDFpSrFQTqhkaSTodGwhYwIlltz35opuHmpiwRaMZH8sO39B0fim StQe2lXJq+X30ChFTDhmr4C5AKGt4hIfX56nk1aDbqas/oNkWG9f9estuXRUn3JRDDCK h0IW0sm+Xnq2fyav7zvqlWNIHXzItXnRT9hZtRl2Z8VQ0MGbJWlOJCVDHokOUj0L3oPJ h+Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@chronox.de header.s=strato-dkim-0002 header.b=pFlyRnk7; 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 w27si9326150edi.519.2020.06.15.12.30.00; Mon, 15 Jun 2020 12:30:33 -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; dkim=fail header.i=@chronox.de header.s=strato-dkim-0002 header.b=pFlyRnk7; 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 S1729354AbgFOT0D (ORCPT + 99 others); Mon, 15 Jun 2020 15:26:03 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.161]:35370 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729854AbgFOT0D (ORCPT ); Mon, 15 Jun 2020 15:26:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1592249161; s=strato-dkim-0002; d=chronox.de; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=wrQTq2V257VK66v6YOYTmaDSMmIDbXHY8G1KxjTD23k=; b=pFlyRnk7/UBHyEUCPKzLetgTlbJ5pwCwHo6PuS5n76z6Fsic6HrTU61ZQ93Lri3DeS gdiB9rEX8JB8tQeylGdDwlcLwQdgvYKrDS3mMNVWIt2rAGkadzsctT4+5XeVLpuZPbR7 j2OVrzU30bQzV0nDaLJQouJH+e9QQP/Y1iDEGdduGhZU3WtBLMkZnbhtGjbwLMOWyGsh rmlc/RXROlvGOv4tdaYAM061aij0ryyI+r2AEFZtdNvC917WFN2w88ORi1eQeaHfZdyI fr5NlzlgoPaWCwBVvcEg+cmP5UCUY5OXSW6C7xXnd9lQanKgUkVYTtdsHvLHYHfpfFXU Bmqg== X-RZG-AUTH: ":P2ERcEykfu11Y98lp/T7+hdri+uKZK8TKWEqNyiHySGSa9k9xmwdNnzGHXPaJfSc9CNS" X-RZG-CLASS-ID: mo00 Received: from tauon.chronox.de by smtp.strato.de (RZmta 46.10.4 DYNA|AUTH) with ESMTPSA id U03fedw5FJPwCLn (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 15 Jun 2020 21:25:58 +0200 (CEST) From: Stephan Mueller To: Anshuman Gupta Cc: linux-crypto@vger.kernel.org Subject: Re: [Query] RSA SHA-384 signature verification Date: Mon, 15 Jun 2020 21:25:58 +0200 Message-ID: <1730161.mygNopSbl3@tauon.chronox.de> In-Reply-To: <20200615170413.GF14085@intel.com> References: <20200615170413.GF14085@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Am Montag, 15. Juni 2020, 19:04:14 CEST schrieb Anshuman Gupta: Hi Anshuman, > Hi , > I wanted to verify a RSA SHA-384 signature. > I am using crypto_alloc_shash(), crypto_shash_digest() API to extract > the SHA-384 digest. > I am having public key along with the sha-384 digest extracted from raw data > and signature. AFAIU understand from crypto documentation that i need to > verify the signature by importing public key to akcipher/skcipher API. > Here i am not sure which cipher API to prefer symmetric key cipher or > asymmetric key cipher API. > > There are two types of API to import the key. > crypto_skcipher_setkey() > crypto_akcipher_set_pub_key() > > Also i am not sure exactly which algo to use for RSA-SHA384 signature > verification. > > Any help or inputs from crypto community will highly appreciated. akcipher: asymmetric key crypto skcipher: symmetric key crypto > > Thanks , > Anshuman Gupta. Ciao Stephan