Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2348404imu; Tue, 6 Nov 2018 13:03:57 -0800 (PST) X-Google-Smtp-Source: AJdET5cL1Zwd3l4vfOn+kuYyZtt6W7gT/FtMm4GdRW1dzd1WQ2Q04kuOqtXe0u9goxkxdGxPBEtM X-Received: by 2002:a17:902:5a2:: with SMTP id f31-v6mr27573112plf.320.1541538237634; Tue, 06 Nov 2018 13:03:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541538237; cv=none; d=google.com; s=arc-20160816; b=Zy3RNlNMup2yS0+jNAzlDAGNENzpKe+w3RPsznqBkWDbjWiSiLap4tco1Lwz6Cz/WE pGRwY3PUkLnz0rjoMYiLQvlwtd1ttkVuVEu+ULtEEbxQu9RNBhA4xffGEFgaVX0mUiXU U2fdxmYi22fVB08HIHqcZCsi6CB/z2D+HU0jsykYSN0aheqliBTEHXHm9Hm9fQNjeH/x p4iafZlUrgZIys9vO9rWxJ39d8TJUrrLNa6CJcZzGmHoN1yLYlAtBO5d5HsaoVMSqzKK MfQpiCJQGzOEbWnYzCJx0u8G6TK3+5Z/7tJ/sb6JLigIWtB8i3ii6FnLv0LYdR0wQg0x oPZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=A760sB1NnLLhOIXV0ox2gb8GtrSCE/OF0YT4IG7XNFM=; b=fUQD8iPOfPF7yv2Qr2OPy5gl4DiPc+DqXl9MRFDAEP1FjHjgblD6jcGpax1XPDwf0R zPHNcQFEiT4PAg7PYSDPQYmyr/agoklSfs6A3vmmjQs+2FCZ1dnp4FeTrJfdyUTdhMfr iWogpSCIqBGlqs7kQpR0xkgcX3T0Np5Wn1HEem3dX50tUswjrKSSUHiN6ZTmq2GpqHA7 3/MwplL+rzsF3NqEqCTA0eRU4nVeEjuTLBD0t4fcDFenk+rTqbC6iHj7z+qzFnN7EaWI lgTI/8NR1RWnt/O7wLCfYoknA57jyfk32cFjAnYgmIU7hNjneSbErbrlci/pqkBtij3m eiBw== 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 62-v6si25573961pla.217.2018.11.06.13.03.41; Tue, 06 Nov 2018 13:03:57 -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 S2388611AbeKGG2c (ORCPT + 99 others); Wed, 7 Nov 2018 01:28:32 -0500 Received: from vmicros1.altlinux.org ([194.107.17.57]:53762 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726724AbeKGG2c (ORCPT ); Wed, 7 Nov 2018 01:28:32 -0500 Received: from imap.altlinux.org (imap.altlinux.org [194.107.17.38]) by vmicros1.altlinux.org (Postfix) with ESMTP id 79E7172CC62; Wed, 7 Nov 2018 00:01:22 +0300 (MSK) Received: from beacon.altlinux.org (unknown [185.6.174.98]) by imap.altlinux.org (Postfix) with ESMTPSA id D3B2B4A4A29; Wed, 7 Nov 2018 00:01:21 +0300 (MSK) From: Vitaly Chikunov To: Herbert Xu , "David S. Miller" , Mimi Zohar , Vitaly Chikunov , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Cc: linux-integrity@vger.kernel.org Subject: [PATCH v4 0/3] crypto: streebog - add Streebog hash function Date: Wed, 7 Nov 2018 00:00:00 +0300 Message-Id: <20181106210008.11241-1-vt@altlinux.org> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add GOST/IETF Streebog hash function (GOST R 34.11-2012, RFC 6986) generic hash transformation with appropriate testmgr and tcrypt tests and vectors. Streebog Hash Function (GOST R 34.11-2012, RFC 6986) is one of the Russian cryptographic standard algorithms (called GOST algorithms). Intended user is the IMA subsystem, which does not need any particular patching besides adding the hash names into Hash Info arrays, this is also done in this patchset. References: https://tc26.ru/upload/iblock/fed/feddbb4d26b685903faa2ba11aea43f6.pdf https://tools.ietf.org/html/rfc6986 Tested using testmgr and tcrypt on (LE) x86_64, arm, arm64, and (BE) s390x in qemu. Changes from v1: - Fix of big-endian problem in add512. - More architectures are tested, including big-endian and 32-bit. Changes from v2: - Register hash in Hash Info for use by IMA. - Add hmac() tests. Changes from v3: - Remove not needed includes, and register, inline, const, ULL, and __aligned specifiers. - Covert define macros into functions. - Use block size define instead of a number. - Rename algorithm names sb256, sb512 to streebog256, streebog512. - Rename bufsize to a more meaningful name (fillsize). - Prefix all static functions names with streebog_. Vitaly Chikunov (3): crypto: streebog - add Streebog hash function crypto: streebog - register Streebog in hash info for IMA crypto: streebog - add Streebog test vectors crypto/Kconfig | 12 + crypto/Makefile | 1 + crypto/hash_info.c | 4 + crypto/streebog_generic.c | 1140 ++++++++++++++++++++++++++++++++++++++++ crypto/tcrypt.c | 37 ++ crypto/testmgr.c | 24 + crypto/testmgr.h | 116 ++++ include/crypto/hash_info.h | 1 + include/crypto/streebog.h | 34 ++ include/uapi/linux/hash_info.h | 2 + 10 files changed, 1371 insertions(+) create mode 100644 crypto/streebog_generic.c create mode 100644 include/crypto/streebog.h -- 2.11.0