generic: verify ciphertext of v2 encryption policies with Adiantum
authorEric Biggers <ebiggers@google.com>
Tue, 15 Oct 2019 18:16:43 +0000 (11:16 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sat, 26 Oct 2019 15:43:22 +0000 (23:43 +0800)
Verify ciphertext for v2 encryption policies that use Adiantum to
encrypt file contents and file names.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/584 [new file with mode: 0755]
tests/generic/584.out [new file with mode: 0644]
tests/generic/group

diff --git a/tests/generic/584 b/tests/generic/584
new file mode 100755 (executable)
index 0000000..9326c72
--- /dev/null
@@ -0,0 +1,45 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright 2019 Google LLC
+#
+# FS QA Test No. generic/584
+#
+# Verify ciphertext for v2 encryption policies that use Adiantum to encrypt file
+# contents and file names.
+#
+# This is the same as generic/550, except using v2 policies.
+#
+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
+
+# Test both with and without the DIRECT_KEY flag.
+_verify_ciphertext_for_encryption_policy Adiantum Adiantum v2
+_verify_ciphertext_for_encryption_policy Adiantum Adiantum v2 direct
+
+# success, all done
+status=0
+exit
diff --git a/tests/generic/584.out b/tests/generic/584.out
new file mode 100644 (file)
index 0000000..946c5f0
--- /dev/null
@@ -0,0 +1,11 @@
+QA output created by 584
+
+Verifying ciphertext with parameters:
+       contents_encryption_mode: Adiantum
+       filenames_encryption_mode: Adiantum
+       options: v2
+
+Verifying ciphertext with parameters:
+       contents_encryption_mode: Adiantum
+       filenames_encryption_mode: Adiantum
+       options: v2 direct
index 57689f567a6a78ad39a473d1030cb26c39080c07..42ca2b911a8604b354f89c28c42f954355a61b3c 100644 (file)
 581 auto quick encrypt
 582 auto quick encrypt
 583 auto quick encrypt
+584 auto quick encrypt