Message ID | 20221201125819.36932-1-tianjia.zhang@linux.alibaba.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp246963wrr; Thu, 1 Dec 2022 05:02:43 -0800 (PST) X-Google-Smtp-Source: AA0mqf4h7+Jr8KLfXkdb/bs6vHbZrJS1jjOQBlbdzW2lTDVatv3YxT/YxYWei1+DmPcDF23Jpqv6 X-Received: by 2002:a17:90b:4d0b:b0:214:1329:dec7 with SMTP id mw11-20020a17090b4d0b00b002141329dec7mr77036242pjb.91.1669899762837; Thu, 01 Dec 2022 05:02:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669899762; cv=none; d=google.com; s=arc-20160816; b=seJBsFacxh6rOhnS4XxtWpcPwX0E/aydlRv8JKEuWFHE2gz5i2nwfmzciK3Ru1NH8l K+5s8pLaz4W1Vp+N6ismPBeR32AtPSBO1qHb5KAT7jMtEMBbtIGDwVFmpT8JpHxQkqzc LJcFWVvZTXeemP0FPMHUWrF1dQjSCvz/+W2AiT8yxSaa6Rmah3aE3ar3FozDz0mw4x8J /wOS0xYtHvMrm4hh6inGhIgiGZ75Rl8QZuKBEO2oUYwk1Ml+mNP36ikaoJsKYzPJV/yx zPi5t3Et0+ZVbQnmHUeFuoTaoAD3eUcdN60XNYoDFcn93SJTWopYdhh190OuqSVt0OoS 3JHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=3S/BhkvxAPlFsk91Gzmxvq5b/v3VOF/Lixw135wQx9Q=; b=fo+T8sWVPYsnSyR61AEVohaJchNsALnhyjWFOpsnOvYkhvUHMqnxFQk60njIaqjgtw 4kGi6ngPmLKn5y5LXD1CfRGSEES0WVegdaRoz3+OkgxBTB4f5ARfl/p5QwA/K4fhGct/ 2SpleVRDq8BhimHcTNLd/YtdtNpexqwmTYpy/8cK6SqaBJRf3M8W+G5stRxMlmA+vQvx 0IOxFoU7qVln0nyuxNxBQTlKf6BhR+sF+teFLabxxQpHMy6HW8S1uyc8rdUW0C9C/epl qtj3HGABoel2TmKpnvW4dVK/Va/oQv7am4rVOzDb+YF4em2At1yFIR7d62J7508jYxgH L3mw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n2-20020a170902e54200b00188f9534a59si4662696plf.306.2022.12.01.05.02.25; Thu, 01 Dec 2022 05:02:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231245AbiLAM6a (ORCPT <rfc822;heyuhang3455@gmail.com> + 99 others); Thu, 1 Dec 2022 07:58:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229843AbiLAM62 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 1 Dec 2022 07:58:28 -0500 Received: from out30-57.freemail.mail.aliyun.com (out30-57.freemail.mail.aliyun.com [115.124.30.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8875E578ED; Thu, 1 Dec 2022 04:58:25 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=12;SR=0;TI=SMTPD_---0VW8xlPK_1669899500; Received: from localhost(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0VW8xlPK_1669899500) by smtp.aliyun-inc.com; Thu, 01 Dec 2022 20:58:21 +0800 From: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> To: Eric Biggers <ebiggers@kernel.org>, "Theodore Y. Ts o" <tytso@mit.edu>, Jaegeuk Kim <jaegeuk@kernel.org>, Jonathan Corbet <corbet@lwn.net>, Jens Axboe <axboe@kernel.dk>, Ard Biesheuvel <ardb@kernel.org>, Bagas Sanjaya <bagasdotme@gmail.com>, linux-fscrypt@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org Cc: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> Subject: [PATCH v4 0/2] Add SM4 XTS symmetric algorithm for blk-crypto and fscrypt Date: Thu, 1 Dec 2022 20:58:17 +0800 Message-Id: <20221201125819.36932-1-tianjia.zhang@linux.alibaba.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751016813825154360?= X-GMAIL-MSGID: =?utf-8?q?1751016813825154360?= |
Series |
Add SM4 XTS symmetric algorithm for blk-crypto and fscrypt
|
|
Message
Tianjia Zhang
Dec. 1, 2022, 12:58 p.m. UTC
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. v4 changes: - only allow the SM4 XTS/CTS algorithm in policy v2 for fscrypt - update git commit message 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 | 5 +++++ include/linux/blk-crypto.h | 1 + include/uapi/linux/fscrypt.h | 2 ++ 6 files changed, 30 insertions(+)
Comments
On Thu, Dec 01, 2022 at 08:58:17PM +0800, Tianjia Zhang wrote: > 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. > > v4 changes: > - only allow the SM4 XTS/CTS algorithm in policy v2 for fscrypt > - update git commit message > > 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 | 5 +++++ > include/linux/blk-crypto.h | 1 + > include/uapi/linux/fscrypt.h | 2 ++ > 6 files changed, 30 insertions(+) Applied. I don't think anyone should actually use this, but with the SM* algorithms turning up everywhere these days, and people seemingly being totally okay with that for some reason, I don't think it's fair for me to reject this. - Eric
Hi Eric, On 12/2/22 3:29 AM, Eric Biggers wrote: > On Thu, Dec 01, 2022 at 08:58:17PM +0800, Tianjia Zhang wrote: >> 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. >> >> v4 changes: >> - only allow the SM4 XTS/CTS algorithm in policy v2 for fscrypt >> - update git commit message >> >> 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 | 5 +++++ >> include/linux/blk-crypto.h | 1 + >> include/uapi/linux/fscrypt.h | 2 ++ >> 6 files changed, 30 insertions(+) > > Applied. I don't think anyone should actually use this, but with the SM* > algorithms turning up everywhere these days, and people seemingly being totally > okay with that for some reason, I don't think it's fair for me to reject this. > > - Eric Thanks, this is really frustrating, still very grateful for your advice and review. Best regards, Tianjia