blob: 1f3250d545dc2900809980799a710ed2184ff847 [file] [log] [blame]
#! /bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright 2022 Google LLC
#
# FS QA Test No. 693
#
# Verify ciphertext for v2 encryption policies that use AES-256-XTS to encrypt
# file contents and AES-256-HCTR2 to encrypt file names.
#
# HCTR2 was introduced in kernel commit 6b2a51ff03bf ("fscrypt: Add HCTR2
# support for filename encryption")
#
. ./common/preamble
_begin_fstest auto quick encrypt
# Import common functions.
. ./common/filter
. ./common/encrypt
_verify_ciphertext_for_encryption_policy AES-256-XTS AES-256-HCTR2 v2
_verify_ciphertext_for_encryption_policy AES-256-XTS AES-256-HCTR2 \
v2 iv_ino_lblk_32
_verify_ciphertext_for_encryption_policy AES-256-XTS AES-256-HCTR2 \
v2 iv_ino_lblk_64
# success, all done
status=0
exit