From patchwork Fri Nov 25 12:16:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "tianjia.zhang" X-Patchwork-Id: 13055823 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2211C4332F for ; Fri, 25 Nov 2022 12:17:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229783AbiKYMRE (ORCPT ); Fri, 25 Nov 2022 07:17:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229676AbiKYMRD (ORCPT ); Fri, 25 Nov 2022 07:17:03 -0500 Received: from out30-45.freemail.mail.aliyun.com (out30-45.freemail.mail.aliyun.com [115.124.30.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 341414A079; Fri, 25 Nov 2022 04:16:57 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0VVfOHkY_1669378595; Received: from localhost(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0VVfOHkY_1669378595) by smtp.aliyun-inc.com; Fri, 25 Nov 2022 20:16:36 +0800 From: Tianjia Zhang To: Eric Biggers , "Theodore Y. Ts o" , Jaegeuk Kim , Jonathan Corbet , Jens Axboe , Ard Biesheuvel , linux-fscrypt@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org Cc: Tianjia Zhang Subject: [PATCH v3 0/2] Add SM4 XTS symmetric algorithm for blk-crypto and fscrypt Date: Fri, 25 Nov 2022 20:16:28 +0800 Message-Id: <20221125121630.87793-1-tianjia.zhang@linux.alibaba.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-fscrypt@vger.kernel.org SM4 is widely used in China's data encryption software and hardware. these algoritms are mandatory in many scenarios. This serial of patches enables the SM4-XTS algorithm in blk-crypto and enables the SM4-XTS/CTS algorithm in fscrypt to encrypt file content and filename. v3 change: - update git commit message v2 change: - As Eric said, the new FSCRYPT_MODE is defined for the unused numbers 7 and 8 Tianjia Zhang (2): blk-crypto: Add support for SM4-XTS blk crypto mode fscrypt: Add SM4 XTS/CTS symmetric algorithm support Documentation/filesystems/fscrypt.rst | 1 + block/blk-crypto.c | 6 ++++++ fs/crypto/keysetup.c | 15 +++++++++++++++ fs/crypto/policy.c | 4 ++++ include/linux/blk-crypto.h | 1 + include/uapi/linux/fscrypt.h | 2 ++ 6 files changed, 29 insertions(+)