From d70875aaa970e9d62f3b188c874da229636325dd Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Tue, 24 Aug 2021 13:50:07 +0200 Subject: [PATCH] tests/example_filesystems: add deterministic-names and xchacha --- .../example_filesystems_test.go | 44 ++++++++++++++++++ .../5rnuPVh7zU9h5w36GgJfsQ | 1 + .../YAqFj7_ODPtY1Xsfjfq3Zw | 1 + .../v2.2-deterministic-names/gocryptfs.conf | 19 ++++++++ ...9wUjJnqtKvC6jtS8ZAIUYWeMH8VITllPeJjlfSkNZo | Bin 0 -> 60 bytes ...nqtKvC6jtS8ZAIUYWeMH8VITllPeJjlfSkNZo.name | 1 + .../vqRhou1QUaSPxnmdCPFa5Q | Bin 0 -> 60 bytes .../v2.2-xchacha/-d6B3-vXduk3KfmLhIOD_Q | 1 + .../v2.2-xchacha/0FzVVSsqaL3FgoloAfeuaQ | Bin 0 -> 68 bytes .../v2.2-xchacha/Y4Z6p3_XZ2yoqHuuJX4l6w | 1 + .../v2.2-xchacha/gocryptfs.conf | 20 ++++++++ .../v2.2-xchacha/gocryptfs.diriv | 1 + ...SRpxavAZGa8XtbJOHutnI3ystvwDkintgk1h5E__Ts | Bin 0 -> 68 bytes ...vAZGa8XtbJOHutnI3ystvwDkintgk1h5E__Ts.name | 1 + 14 files changed, 90 insertions(+) create mode 120000 tests/example_filesystems/v2.2-deterministic-names/5rnuPVh7zU9h5w36GgJfsQ create mode 120000 tests/example_filesystems/v2.2-deterministic-names/YAqFj7_ODPtY1Xsfjfq3Zw create mode 100644 tests/example_filesystems/v2.2-deterministic-names/gocryptfs.conf create mode 100644 tests/example_filesystems/v2.2-deterministic-names/gocryptfs.longname.i9wUjJnqtKvC6jtS8ZAIUYWeMH8VITllPeJjlfSkNZo create mode 100644 tests/example_filesystems/v2.2-deterministic-names/gocryptfs.longname.i9wUjJnqtKvC6jtS8ZAIUYWeMH8VITllPeJjlfSkNZo.name create mode 100644 tests/example_filesystems/v2.2-deterministic-names/vqRhou1QUaSPxnmdCPFa5Q create mode 120000 tests/example_filesystems/v2.2-xchacha/-d6B3-vXduk3KfmLhIOD_Q create mode 100644 tests/example_filesystems/v2.2-xchacha/0FzVVSsqaL3FgoloAfeuaQ create mode 120000 tests/example_filesystems/v2.2-xchacha/Y4Z6p3_XZ2yoqHuuJX4l6w create mode 100644 tests/example_filesystems/v2.2-xchacha/gocryptfs.conf create mode 100644 tests/example_filesystems/v2.2-xchacha/gocryptfs.diriv create mode 100644 tests/example_filesystems/v2.2-xchacha/gocryptfs.longname.LSRpxavAZGa8XtbJOHutnI3ystvwDkintgk1h5E__Ts create mode 100644 tests/example_filesystems/v2.2-xchacha/gocryptfs.longname.LSRpxavAZGa8XtbJOHutnI3ystvwDkintgk1h5E__Ts.name diff --git a/tests/example_filesystems/example_filesystems_test.go b/tests/example_filesystems/example_filesystems_test.go index b07b5f3..7ecae81 100644 --- a/tests/example_filesystems/example_filesystems_test.go +++ b/tests/example_filesystems/example_filesystems_test.go @@ -382,3 +382,47 @@ func TestExampleFSv13reverse(t *testing.T) { test_helpers.UnmountPanic(dirC) test_helpers.UnmountPanic(dirB) } + +// gocryptfs v2.2 introduced -deterministic-names +func TestExampleFSv22deterministicNames(t *testing.T) { + cDir := "v2.2-deterministic-names" + pDir := test_helpers.TmpDir + "/" + cDir + cDir = tmpFsPath + cDir + err := os.Mkdir(pDir, 0777) + if err != nil { + t.Fatal(err) + } + test_helpers.MountOrFatal(t, cDir, pDir, "-extpass", "echo test", opensslOpt) + checkExampleFSLongnames(t, pDir) + test_helpers.UnmountPanic(pDir) + + pDir = pDir + "_m" + test_helpers.MountOrFatal(t, cDir, pDir, "-deterministic-names", "-masterkey", + "722733f5-b0f399f5-5465ad7a-f0bed125-"+ + "e82de7b4-045e7608-a5e5c78e-04a1a61e", + opensslOpt) + checkExampleFSLongnames(t, pDir) + test_helpers.UnmountPanic(pDir) +} + +// gocryptfs v2.2 introduced -xchacha +func TestExampleFSv22xchacha(t *testing.T) { + cDir := "v2.2-xchacha" + pDir := test_helpers.TmpDir + "/" + cDir + cDir = tmpFsPath + cDir + err := os.Mkdir(pDir, 0777) + if err != nil { + t.Fatal(err) + } + test_helpers.MountOrFatal(t, cDir, pDir, "-extpass", "echo test", opensslOpt) + checkExampleFSLongnames(t, pDir) + test_helpers.UnmountPanic(pDir) + + pDir = pDir + "_m" + test_helpers.MountOrFatal(t, cDir, pDir, "-xchacha", "-masterkey", + "44670e7e-32475bfc-bdfb8a8c-be17a767-"+ + "0679cac0-be705d8c-af41c411-28c40f26", + opensslOpt) + checkExampleFSLongnames(t, pDir) + test_helpers.UnmountPanic(pDir) +} diff --git a/tests/example_filesystems/v2.2-deterministic-names/5rnuPVh7zU9h5w36GgJfsQ b/tests/example_filesystems/v2.2-deterministic-names/5rnuPVh7zU9h5w36GgJfsQ new file mode 120000 index 0000000..17ab1e5 --- /dev/null +++ b/tests/example_filesystems/v2.2-deterministic-names/5rnuPVh7zU9h5w36GgJfsQ @@ -0,0 +1 @@ +-G4ErcfZuyo50LjLiEyJ3AAf4YP5UtwWWfvk9wZw4_SdQZoKYgoi9ZBh \ No newline at end of file diff --git a/tests/example_filesystems/v2.2-deterministic-names/YAqFj7_ODPtY1Xsfjfq3Zw b/tests/example_filesystems/v2.2-deterministic-names/YAqFj7_ODPtY1Xsfjfq3Zw new file mode 120000 index 0000000..a4da7a8 --- /dev/null +++ b/tests/example_filesystems/v2.2-deterministic-names/YAqFj7_ODPtY1Xsfjfq3Zw @@ -0,0 +1 @@ +KhXaRw-75Nq9gID4wqfU6CJ_kk-3RSSUiWxuhTFnlM6cjbBmRzcJlw \ No newline at end of file diff --git a/tests/example_filesystems/v2.2-deterministic-names/gocryptfs.conf b/tests/example_filesystems/v2.2-deterministic-names/gocryptfs.conf new file mode 100644 index 0000000..6a91dfe --- /dev/null +++ b/tests/example_filesystems/v2.2-deterministic-names/gocryptfs.conf @@ -0,0 +1,19 @@ +{ + "Creator": "gocryptfs v2.1-27-gabaa129-dirty.xchacha", + "EncryptedKey": "RnoIHKZ0FW4hGgovIbo6ictZt6eISBCFAVQjIelO1In5GdWE3j6svtOirIg2xHpT9hwOSplVg8MgV0Y5Qw0TyQ==", + "ScryptObject": { + "Salt": "yzBcjuwLGUjscVFL01kZAAfCk+9LpSl1CqDhavxOt+Y=", + "N": 1024, + "R": 8, + "P": 1, + "KeyLen": 32 + }, + "Version": 2, + "FeatureFlags": [ + "HKDF", + "GCMIV128", + "EMENames", + "LongNames", + "Raw64" + ] +} diff --git a/tests/example_filesystems/v2.2-deterministic-names/gocryptfs.longname.i9wUjJnqtKvC6jtS8ZAIUYWeMH8VITllPeJjlfSkNZo b/tests/example_filesystems/v2.2-deterministic-names/gocryptfs.longname.i9wUjJnqtKvC6jtS8ZAIUYWeMH8VITllPeJjlfSkNZo new file mode 100644 index 0000000000000000000000000000000000000000..5124052d1daecf1b2aa593ad0c582a44202d1c60 GIT binary patch literal 60 zcmV-C0K@+P0;?V(ZfjNvAhQI2Igchgpx)i-Pa6H;2RILOauujM!~jesjZ(|m3LN|p SpWnjoSFPRa`ujP=x{wad%o~aT literal 0 HcmV?d00001 diff --git a/tests/example_filesystems/v2.2-deterministic-names/gocryptfs.longname.i9wUjJnqtKvC6jtS8ZAIUYWeMH8VITllPeJjlfSkNZo.name b/tests/example_filesystems/v2.2-deterministic-names/gocryptfs.longname.i9wUjJnqtKvC6jtS8ZAIUYWeMH8VITllPeJjlfSkNZo.name new file mode 100644 index 0000000..55b86be --- /dev/null +++ b/tests/example_filesystems/v2.2-deterministic-names/gocryptfs.longname.i9wUjJnqtKvC6jtS8ZAIUYWeMH8VITllPeJjlfSkNZo.name @@ -0,0 +1 @@ +tMYO1CJjvdz5B37Kt5EKHCnq41xnN7iNWJPLLUOiQanOQN8UF6t-fOWcK-qF9PiYrhojc-7kQ41QqMTut9LpqwMa_Oc2S4C4CqVzK-ct6WHt-eZNSUWBt54EcxAbpzvm4Z_2_OFWhaPtkw2L7i4XozCOS33SMHn2rp4hX2ySOsStQX3C6AWiNWzTByk6VEeak6DDEYQPMiT0qmJkapYZ3dD7KNEh7ae1-yX1oX8DHhhKWf5OUgDU_UzDZ_fbD-_qMAV0mhFfoJ97oaskNrw1uXdX70ph3Qcb1psRynh5gQC7WaN6yX7bVJYUZKnulrp7spo04f7Neel5tENhQ3anpQ \ No newline at end of file diff --git a/tests/example_filesystems/v2.2-deterministic-names/vqRhou1QUaSPxnmdCPFa5Q b/tests/example_filesystems/v2.2-deterministic-names/vqRhou1QUaSPxnmdCPFa5Q new file mode 100644 index 0000000000000000000000000000000000000000..fcd52f6bd1445f6443e1bd05760ad448e68aa59c GIT binary patch literal 60 zcmV-C0K@+P0=vA5DQVy@-f;+)#oPDCg9L1%@wz(Nr-k!2w;7`HJ$nO}?uFI^%5pry St{4x@!U#sgG%Cod!U2e`NFHPW literal 0 HcmV?d00001 diff --git a/tests/example_filesystems/v2.2-xchacha/-d6B3-vXduk3KfmLhIOD_Q b/tests/example_filesystems/v2.2-xchacha/-d6B3-vXduk3KfmLhIOD_Q new file mode 120000 index 0000000..06f46b6 --- /dev/null +++ b/tests/example_filesystems/v2.2-xchacha/-d6B3-vXduk3KfmLhIOD_Q @@ -0,0 +1 @@ +G4op4SX2D3wVUDQedEsz6n3fm8ry2-EFQRx3HUp5kLyNKr2hA3N3iuDWhRxilY77 \ No newline at end of file diff --git a/tests/example_filesystems/v2.2-xchacha/0FzVVSsqaL3FgoloAfeuaQ b/tests/example_filesystems/v2.2-xchacha/0FzVVSsqaL3FgoloAfeuaQ new file mode 100644 index 0000000000000000000000000000000000000000..d41ac60d65a7f5a9067c50297235ae501e2b41bd GIT binary patch literal 68 zcmV-K0K5MH0x=NtUNURv<1Eg|m)z-cbeqK;_$slp3r@7PC ar`%HOdKz^_LaOf2d{3R(mnSdWz0?o{VI~p) literal 0 HcmV?d00001 diff --git a/tests/example_filesystems/v2.2-xchacha/Y4Z6p3_XZ2yoqHuuJX4l6w b/tests/example_filesystems/v2.2-xchacha/Y4Z6p3_XZ2yoqHuuJX4l6w new file mode 120000 index 0000000..6eddb24 --- /dev/null +++ b/tests/example_filesystems/v2.2-xchacha/Y4Z6p3_XZ2yoqHuuJX4l6w @@ -0,0 +1 @@ +ymrBbzzB60kz8FNY78U7GmHlZmjUIS7iyoJsI3oQ1ISm10w6xDu6lL4eE2iYOBYJv7o \ No newline at end of file diff --git a/tests/example_filesystems/v2.2-xchacha/gocryptfs.conf b/tests/example_filesystems/v2.2-xchacha/gocryptfs.conf new file mode 100644 index 0000000..a4ac3c2 --- /dev/null +++ b/tests/example_filesystems/v2.2-xchacha/gocryptfs.conf @@ -0,0 +1,20 @@ +{ + "Creator": "gocryptfs v2.1-27-gabaa129-dirty.xchacha", + "EncryptedKey": "6pVNGTIq5c4uXu90ZBjg2jKPvSqYc6gEfQ3/dEaMqKhd0CnaEYEm6+4oyrIfQkn0X7/hkW/HaCAqK0G0rcv1nw==", + "ScryptObject": { + "Salt": "AjIc6CkWvrd4/41pei15ulBKIcptIzvvJuCI+YB8pkA=", + "N": 1024, + "R": 8, + "P": 1, + "KeyLen": 32 + }, + "Version": 2, + "FeatureFlags": [ + "HKDF", + "XChaCha20Poly1305", + "DirIV", + "EMENames", + "LongNames", + "Raw64" + ] +} diff --git a/tests/example_filesystems/v2.2-xchacha/gocryptfs.diriv b/tests/example_filesystems/v2.2-xchacha/gocryptfs.diriv new file mode 100644 index 0000000..42b180e --- /dev/null +++ b/tests/example_filesystems/v2.2-xchacha/gocryptfs.diriv @@ -0,0 +1 @@ +„ #¾UÒÇ·ÉA‹öVt \ No newline at end of file diff --git a/tests/example_filesystems/v2.2-xchacha/gocryptfs.longname.LSRpxavAZGa8XtbJOHutnI3ystvwDkintgk1h5E__Ts b/tests/example_filesystems/v2.2-xchacha/gocryptfs.longname.LSRpxavAZGa8XtbJOHutnI3ystvwDkintgk1h5E__Ts new file mode 100644 index 0000000000000000000000000000000000000000..f693b9c16d7ed5e21ed2d6a90860b4fa64bd5625 GIT binary patch literal 68 zcmV-K0K5MH0{