From patchwork Mon Aug 12 17:56:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 11090343 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 D47311395 for ; Mon, 12 Aug 2019 17:57:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C52C42855C for ; Mon, 12 Aug 2019 17:57:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B980F28564; Mon, 12 Aug 2019 17:57:16 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 7346E28567 for ; Mon, 12 Aug 2019 17:57:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726842AbfHLR5Q (ORCPT ); Mon, 12 Aug 2019 13:57:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:53490 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726551AbfHLR5P (ORCPT ); Mon, 12 Aug 2019 13:57:15 -0400 Received: from ebiggers-linuxstation.mtv.corp.google.com (unknown [104.132.1.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5578320842; Mon, 12 Aug 2019 17:57:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565632634; bh=vsCEhR6Yea5ciaelGsZTFgcWllOw6bWfgsk3zHX6fEk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RCe6WFyL7H+wMnNtECERo8PidBkduw5N9bZo1q9zDobsL08k7Rs9rB5bWyaaxRhuC AjrzFbYaNauQN4Dqi+dhHYknJQ9NJAEMX0WZoOhDFTHvPD1ylVHLRlZ2NGc9IOg3Zf Hv7+qxo1Rtvn2UAQqdHj5Jfn0y1p8KXEhXv5C7t8= From: Eric Biggers To: linux-xfs@vger.kernel.org Cc: fstests@vger.kernel.org, linux-fscrypt@vger.kernel.org Subject: [RFC PATCH 3/8] xfs_io/encrypt: add new encryption modes Date: Mon, 12 Aug 2019 10:56:29 -0700 Message-Id: <20190812175635.34186-4-ebiggers@kernel.org> X-Mailer: git-send-email 2.23.0.rc1.153.gdeed80330f-goog In-Reply-To: <20190812175635.34186-1-ebiggers@kernel.org> References: <20190812175635.34186-1-ebiggers@kernel.org> MIME-Version: 1.0 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Eric Biggers Add new encryption modes: AES-128-CBC and AES-128-CTS (supported since Linux v4.11), and Adiantum (supported since Linux v5.0). Signed-off-by: Eric Biggers --- io/encrypt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/io/encrypt.c b/io/encrypt.c index ac473ed7..11eb4a3e 100644 --- a/io/encrypt.c +++ b/io/encrypt.c @@ -156,7 +156,7 @@ set_encpolicy_help(void) " -v VERSION -- version of policy structure\n" "\n" " MODE can be numeric or one of the following predefined values:\n" -" AES-256-XTS, AES-256-CTS\n" +" AES-256-XTS, AES-256-CTS, AES-128-CBC, AES-128-CTS, Adiantum\n" " FLAGS and VERSION must be numeric.\n" "\n" " Note that it's only possible to set an encryption policy on an empty\n" @@ -170,6 +170,9 @@ static const struct { } available_modes[] = { {FSCRYPT_MODE_AES_256_XTS, "AES-256-XTS"}, {FSCRYPT_MODE_AES_256_CTS, "AES-256-CTS"}, + {FSCRYPT_MODE_AES_128_CBC, "AES-128-CBC"}, + {FSCRYPT_MODE_AES_128_CTS, "AES-128-CTS"}, + {FSCRYPT_MODE_ADIANTUM, "Adiantum"}, }; static bool