From patchwork Sun Jan 6 13:36:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vitaly Chikunov X-Patchwork-Id: 10749497 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DA85714E5 for ; Sun, 6 Jan 2019 13:36:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BBCC4288E6 for ; Sun, 6 Jan 2019 13:36:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF63E288E8; Sun, 6 Jan 2019 13:36:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C435288E6 for ; Sun, 6 Jan 2019 13:36:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726410AbfAFNg0 (ORCPT ); Sun, 6 Jan 2019 08:36:26 -0500 Received: from vmicros1.altlinux.org ([194.107.17.57]:52384 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726399AbfAFNg0 (ORCPT ); Sun, 6 Jan 2019 08:36:26 -0500 Received: from imap.altlinux.org (imap.altlinux.org [194.107.17.38]) by vmicros1.altlinux.org (Postfix) with ESMTP id A27E772CC6C; Sun, 6 Jan 2019 16:36:23 +0300 (MSK) Received: from beacon.altlinux.org (unknown [185.6.174.98]) by imap.altlinux.org (Postfix) with ESMTPSA id 0A83E4A4A14; Sun, 6 Jan 2019 16:36:23 +0300 (MSK) From: Vitaly Chikunov To: David Howells , Herbert Xu , Mimi Zohar , Dmitry Kasatkin , linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 0/4] crypto: Add EC-RDSA algorithm Date: Sun, 6 Jan 2019 16:36:04 +0300 Message-Id: <20190106133608.820-1-vt@altlinux.org> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Sender: linux-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patchset changes akcipher api to support ECDSA style signature verification. Augments x509 parser to make it work with EC-RDSA certificates. And finally implements EC-RDSA (GOST 34.10) signature verification. It is intended to use in IMA for appraisal. Tested on x86_64 with openssl+gost-engine generated certificates. Vitaly Chikunov (4): X.509: Parse public key parameters from x509 for akcipher akcipher: Introduce verify2 for public key algorithms KEYS: set correct flags for keyctl if encrypt is not supported crypto: Add EC-RDSA algorithm crypto/Kconfig | 63 ++-- crypto/Makefile | 5 +- crypto/asymmetric_keys/public_key.c | 74 +++-- crypto/asymmetric_keys/x509.asn1 | 2 +- crypto/asymmetric_keys/x509_cert_parser.c | 51 ++- crypto/ecc.c | 421 +++++++++++++++++++++++-- crypto/ecc.h | 162 +++++++++- crypto/ecc_curve_defs.h | 15 - crypto/ecrdsa.c | 494 ++++++++++++++++++++++++++++++ crypto/testmgr.c | 5 + crypto/testmgr.h | 3 + include/crypto/akcipher.h | 87 +++++- include/crypto/public_key.h | 4 + include/linux/oid_registry.h | 18 ++ 14 files changed, 1319 insertions(+), 85 deletions(-) create mode 100644 crypto/ecrdsa.c