Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1824357ybt; Mon, 15 Jun 2020 10:17:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFHce5g5rqPRyjRKhy8/Q3ykiUOuwsTlOsdV8VClIb/iTU2ZdjXvsaK2M/jCfa/diA68WN X-Received: by 2002:a17:906:5e08:: with SMTP id n8mr26642557eju.132.1592241447015; Mon, 15 Jun 2020 10:17:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592241447; cv=none; d=google.com; s=arc-20160816; b=TdhJtWCY3JsXhko6AgWETeJbvEQWvk6OWpmSS/H3n6kRurNBqNpZfDX3b1QdrOd7rn lzc2cYNFNUJWkO7w61vnjdHYc/49Ur63+7t+Ge95V7AuqxjE7gLvjMj+Ahw5lcFeyg/0 COl+dwyoqj3tPX7X9Yp9g0+EthfzJexhANRljZcl6L3qP8XE8GHaryXVXpDxtcIuVr12 pb1u1W01cVD1tSCq5TJXy4VIjeE+jls1zQqUPOp8tIAAuBIgB9CcvXCMYvqMOI4CzHFd lEWvIjbKn3SlakNJ7kew9xdoNyHsfmpFd2IMFmcFLoxggTseDauNSYf2nc8BZYhL5RIi si9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:ironport-sdr :ironport-sdr; bh=QASv7f6F+9iSqJlgaWyeh5lYOHrSYJira6dNluCruDE=; b=anPbPDBpH1hwEoaiUvi8FnegCrsmJo2FeB39RZEZlL3dAWtPhQVqMYWs6RMD9JtsmK TVWjMgO8sGhNByN/0sK0Ff4dYOZ+1YS20CRvXEKQh3C3lqwiLRwnXO3xJ44cbxwBaQJ7 SKL8aoxIc3+MvDqkhbufTi5zXPYQ0+CBKtd5+DgPPU+MUTVxe6Bi6Jwft5feOSdYBUh4 A1GeyDgHgQssqYof5F6jQeM5dIC76wKXe3xBlh3TvbuAjpTpcjHiiYPIAaEHS7uBLoOp xJ54LpQgV9V+uA+ftchkvWgtDaMI8FNPLBm0Sw7jSsyW9dP3lU+aclWT17CGO6VV8Yga geQw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x15si9360243edj.153.2020.06.15.10.16.55; Mon, 15 Jun 2020 10:17:27 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730713AbgFOROx (ORCPT + 99 others); Mon, 15 Jun 2020 13:14:53 -0400 Received: from mga18.intel.com ([134.134.136.126]:16574 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729354AbgFOROx (ORCPT ); Mon, 15 Jun 2020 13:14:53 -0400 IronPort-SDR: stWnO0CeM5z61j9X8GOLhtCtFD91mYqB+cMk+gY2rcYhL8HHrMc9QxGoiKco/X2rdanTf2Pvyu +2xidEoqxDEg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2020 10:14:52 -0700 IronPort-SDR: fNW3/ouO37kjjqkWXJCp8LdVCrVW2sPfqqy1rCKVv9UQ1jSw6YxSeXCor/1RN9U75g010v1MpG FZZZqwi02gPQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,515,1583222400"; d="scan'208";a="476106548" Received: from unknown (HELO intel.com) ([10.223.74.178]) by fmsmga005.fm.intel.com with ESMTP; 15 Jun 2020 10:14:51 -0700 Date: Mon, 15 Jun 2020 22:34:14 +0530 From: Anshuman Gupta To: linux-crypto@vger.kernel.org Cc: anshuman.gupta@intel.com Subject: [Query] RSA SHA-384 signature verification Message-ID: <20200615170413.GF14085@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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. Thanks , Anshuman Gupta.