Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1079889yba; Fri, 26 Apr 2019 13:46:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqxm+986jzOs/sShz7BAhPwkl38uQcm2gFE8W4sEPfzR/N8boAetmHqf8Jm0alrsJdgt/0l1 X-Received: by 2002:a63:5b58:: with SMTP id l24mr44203531pgm.139.1556311573009; Fri, 26 Apr 2019 13:46:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556311573; cv=none; d=google.com; s=arc-20160816; b=QfMw0mWqvPnpSYc/jMjoN7AxwhDvIR6pxPeEraEKrLibBbvQnJLAX9MCWC26p6NWO1 sq5SwPOa7zdHubcSUHerAVuVB1ImgvkOtSRFwMNdozTM7xcJkG6b9RNlUdxqxHEqtwka fhYI96iaALk71Putdk8PSRru4hga6LoddcRfHxh9UVVI3KwVeGdO/+NXYuiew1W1yH2x 2Cv0bG3qgLmActK+BAuldu42Z2Z0BAV0R2CHvhkIg9+PFzbiXKKHSXrUTXZwrtLPNt9p KIb/p7AfQQhpOQv6nJOXbr1aB36KbcclEJ8c4iRhSFi4RcCqleTOgCtjgBMQ22JGD0D6 DvGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZpxBTErN4Gffxwb72zSE5rPKpn0ipYp8xsidl9DAUQg=; b=mgxqTL84tW5V8y11LCqwDQFOZL6Si+JTedwaMd63641IBsglCyaAx8PTW+/zrx1ss1 or7ccfKprgYi5JW3gEF7bbvtu+XycjisjSFscTPuk0mU3lzLhxuoMb1aPkrJQ7aMspPJ rlrQcRrVQFmiy2Qh+wRDyG5zja8qsRpaYBAHWvCD+/FVsjWEr86OyUXnpp8Hjwftf6mr DLdrPwLwfAAcW/Wl88lRElIl3fuMgqU0a47c5cJ4PV4bcPo9y0dCDbxouxUWIrz5AiFl qpRyEbkQKtvOhYfIUWusbnYVgaKIEi0oGujO4EhTkp9lroEwQ5f0X7XNukvJIkp7jC2N FrqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oasqwd20; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 6si13108220pgt.259.2019.04.26.13.45.53; Fri, 26 Apr 2019 13:46:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oasqwd20; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726991AbfDZUpo (ORCPT + 99 others); Fri, 26 Apr 2019 16:45:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:45090 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726952AbfDZUpl (ORCPT ); Fri, 26 Apr 2019 16:45:41 -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 C1E93212F5; Fri, 26 Apr 2019 20:45:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556311540; bh=CnKErDIgL4RgiM3oogFTCx63ShOp8IiiW7HKXUlGGa4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oasqwd2034//aFBNufrm6dyswg1UjfhaEKZJ+9u58hnlkz/FB0bztpW7pBJ67vCOB Gv4n3dv2JQIVGNBjR1EdKhj0d3dI6rBQkwCY93o5qITUp0RbmeSF5Dg1tMPitlZASD yJiavbGETNQFY+bjAjuBuCBUm2LGwwpZCd04zUcI= From: Eric Biggers To: fstests@vger.kernel.org Cc: linux-fscrypt@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: [RFC PATCH 6/7] generic: verify ciphertext of v1 encryption policies with AES-128 Date: Fri, 26 Apr 2019 13:41:52 -0700 Message-Id: <20190426204153.101861-7-ebiggers@kernel.org> X-Mailer: git-send-email 2.21.0.593.g511ec345e18-goog In-Reply-To: <20190426204153.101861-1-ebiggers@kernel.org> References: <20190426204153.101861-1-ebiggers@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Eric Biggers Verify ciphertext for v1 encryption policies that use AES-128-CBC-ESSIV to encrypt file contents and AES-128-CTS-CBC to encrypt file names. Signed-off-by: Eric Biggers --- tests/generic/701 | 41 +++++++++++++++++++++++++++++++++++++++++ tests/generic/701.out | 5 +++++ tests/generic/group | 1 + 3 files changed, 47 insertions(+) create mode 100755 tests/generic/701 create mode 100644 tests/generic/701.out diff --git a/tests/generic/701 b/tests/generic/701 new file mode 100755 index 00000000..d477f5bd --- /dev/null +++ b/tests/generic/701 @@ -0,0 +1,41 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright 2019 Google LLC +# +# FS QA Test generic/701 +# +# Verify ciphertext for v1 encryption policies that use AES-128-CBC-ESSIV to +# encrypt file contents and AES-128-CTS-CBC to encrypt file names. +# +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -f $tmp.* +} + +# get standard environment, filters and checks +. ./common/rc +. ./common/filter +. ./common/encrypt + +# remove previous $seqres.full before test +rm -f $seqres.full + +# real QA test starts here +_supported_fs generic +_supported_os Linux + +_verify_ciphertext_for_encryption_policy AES-128-CBC-ESSIV AES-128-CTS-CBC + +# success, all done +status=0 +exit diff --git a/tests/generic/701.out b/tests/generic/701.out new file mode 100644 index 00000000..cfb6c924 --- /dev/null +++ b/tests/generic/701.out @@ -0,0 +1,5 @@ +QA output created by 701 + +Verifying ciphertext with parameters: + contents_encryption_mode: AES-128-CBC-ESSIV + filenames_encryption_mode: AES-128-CTS-CBC diff --git a/tests/generic/group b/tests/generic/group index 22e5c028..6bb793cb 100644 --- a/tests/generic/group +++ b/tests/generic/group @@ -548,3 +548,4 @@ 543 auto quick clone 544 auto quick clone 700 auto quick encrypt +701 auto quick encrypt -- 2.21.0.593.g511ec345e18-goog