blob: f6e97f11a0fff52b80b0f2f0b9fc07dd4d857697 [file] [log] [blame]
Paul Lawrence377cd192015-04-28 22:13:04 +00001/*
Paul Crowley8d53b962016-04-27 10:24:40 -07002 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
Paul Lawrence377cd192015-04-28 22:13:04 +000015 */
16
Eric Biggersb46c3592018-10-23 13:39:07 -070017#include "fscrypt/fscrypt.h"
Paul Lawrence92da49d2015-02-25 15:11:13 -080018
Eric Biggersb9015082019-09-05 12:18:30 -070019#include <android-base/file.h>
20#include <android-base/logging.h>
Paul Crowley47212f02020-02-18 21:30:03 -080021#include <android-base/properties.h>
Paul Crowleyf6ca2c32019-10-24 14:51:44 -070022#include <android-base/strings.h>
Eric Biggersb9015082019-09-05 12:18:30 -070023#include <android-base/unique_fd.h>
Tao Bao06ca8112016-10-05 12:44:18 -070024#include <asm/ioctl.h>
Eric Biggersb9015082019-09-05 12:18:30 -070025#include <cutils/properties.h>
Paul Lawrence4818b732016-05-23 22:03:40 +000026#include <errno.h>
Paul Lawrence4818b732016-05-23 22:03:40 +000027#include <fcntl.h>
Eric Biggers9b14aa32019-12-16 16:02:23 -080028#include <linux/fscrypt.h>
Eric Biggersb9015082019-09-05 12:18:30 -070029#include <logwrap/logwrap.h>
Tao Bao06ca8112016-10-05 12:44:18 -070030#include <string.h>
Paul Lawrence4818b732016-05-23 22:03:40 +000031#include <sys/stat.h>
32#include <sys/types.h>
Tao Bao06ca8112016-10-05 12:44:18 -070033#include <unistd.h>
Paul Crowleyc4547882018-05-16 13:41:01 -070034#include <utils/misc.h>
Paul Lawrence92da49d2015-02-25 15:11:13 -080035
Eric Biggersb9015082019-09-05 12:18:30 -070036#include <array>
Paul Crowleyf6ca2c32019-10-24 14:51:44 -070037#include <string>
38#include <vector>
39
40using namespace std::string_literals;
Eric Biggersb9015082019-09-05 12:18:30 -070041
Eric Biggers9b14aa32019-12-16 16:02:23 -080042/* modes not supported by upstream kernel, so not in <linux/fscrypt.h> */
43#define FSCRYPT_MODE_AES_256_HEH 126
44#define FSCRYPT_MODE_PRIVATE 127
Paul Lawrence4818b732016-05-23 22:03:40 +000045
Paul Lawrence4818b732016-05-23 22:03:40 +000046#define HEX_LOOKUP "0123456789abcdef"
47
Paul Crowleyf6ca2c32019-10-24 14:51:44 -070048struct ModeLookupEntry {
49 std::string name;
50 int id;
51};
52
53static const auto contents_modes = std::vector<ModeLookupEntry>{
Eric Biggers9b14aa32019-12-16 16:02:23 -080054 {"aes-256-xts"s, FSCRYPT_MODE_AES_256_XTS},
55 {"software"s, FSCRYPT_MODE_AES_256_XTS},
56 {"adiantum"s, FSCRYPT_MODE_ADIANTUM},
57 {"ice"s, FSCRYPT_MODE_PRIVATE},
Paul Crowleyf6ca2c32019-10-24 14:51:44 -070058};
59
60static const auto filenames_modes = std::vector<ModeLookupEntry>{
Eric Biggers9b14aa32019-12-16 16:02:23 -080061 {"aes-256-cts"s, FSCRYPT_MODE_AES_256_CTS},
62 {"aes-256-heh"s, FSCRYPT_MODE_AES_256_HEH},
63 {"adiantum"s, FSCRYPT_MODE_ADIANTUM},
Paul Crowleyf6ca2c32019-10-24 14:51:44 -070064};
65
66static bool LookupModeByName(const std::vector<struct ModeLookupEntry>& modes,
67 const std::string& name, int* result) {
68 for (const auto& e : modes) {
69 if (e.name == name) {
70 *result = e.id;
71 return true;
72 }
73 }
74 return false;
75}
76
77static bool LookupModeById(const std::vector<struct ModeLookupEntry>& modes, int id,
78 std::string* result) {
79 for (const auto& e : modes) {
80 if (e.id == id) {
81 *result = e.name;
82 return true;
83 }
84 }
85 return false;
86}
87
Eric Biggersb46c3592018-10-23 13:39:07 -070088bool fscrypt_is_native() {
Paul Crowley8d53b962016-04-27 10:24:40 -070089 char value[PROPERTY_VALUE_MAX];
90 property_get("ro.crypto.type", value, "none");
91 return !strcmp(value, "file");
92}
Paul Lawrence4818b732016-05-23 22:03:40 +000093
Paul Crowleyf6ca2c32019-10-24 14:51:44 -070094namespace android {
95namespace fscrypt {
96
Paul Crowleye1f6ad42018-05-22 15:58:38 -070097static void log_ls(const char* dirname) {
98 std::array<const char*, 3> argv = {"ls", "-laZ", dirname};
Paul Crowleyc4547882018-05-16 13:41:01 -070099 int status = 0;
100 auto res =
ThiƩbaud Weksteenc54df902020-10-26 15:33:21 +0100101 logwrap_fork_execvp(argv.size(), argv.data(), &status, false, LOG_ALOG, false, nullptr);
Paul Crowleyc4547882018-05-16 13:41:01 -0700102 if (res != 0) {
Paul Crowleye1f6ad42018-05-22 15:58:38 -0700103 PLOG(ERROR) << argv[0] << " " << argv[1] << " " << argv[2] << "failed";
Paul Crowleyc4547882018-05-16 13:41:01 -0700104 return;
105 }
106 if (!WIFEXITED(status)) {
Paul Crowleye1f6ad42018-05-22 15:58:38 -0700107 LOG(ERROR) << argv[0] << " " << argv[1] << " " << argv[2]
108 << " did not exit normally, status: " << status;
Paul Crowleyc4547882018-05-16 13:41:01 -0700109 return;
110 }
111 if (WEXITSTATUS(status) != 0) {
Paul Crowleye1f6ad42018-05-22 15:58:38 -0700112 LOG(ERROR) << argv[0] << " " << argv[1] << " " << argv[2]
113 << " returned failure: " << WEXITSTATUS(status);
Paul Crowleyc4547882018-05-16 13:41:01 -0700114 return;
115 }
116}
117
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700118void BytesToHex(const std::string& bytes, std::string* hex) {
119 hex->clear();
120 for (char c : bytes) {
121 *hex += HEX_LOOKUP[(c & 0xF0) >> 4];
122 *hex += HEX_LOOKUP[c & 0x0F];
Paul Lawrence4818b732016-05-23 22:03:40 +0000123 }
Paul Lawrence4818b732016-05-23 22:03:40 +0000124}
125
Eric Biggersb9015082019-09-05 12:18:30 -0700126static bool fscrypt_is_encrypted(int fd) {
Eric Biggers17115c72019-09-13 11:07:42 -0700127 fscrypt_policy_v1 policy;
128
129 // success => encrypted with v1 policy
130 // EINVAL => encrypted with v2 policy
131 // ENODATA => not encrypted
132 return ioctl(fd, FS_IOC_GET_ENCRYPTION_POLICY, &policy) == 0 || errno == EINVAL;
Paul Lawrence4818b732016-05-23 22:03:40 +0000133}
134
Paul Crowley47212f02020-02-18 21:30:03 -0800135unsigned int GetFirstApiLevel() {
136 return android::base::GetUintProperty<unsigned int>("ro.product.first_api_level", 0);
137}
138
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700139bool OptionsToString(const EncryptionOptions& options, std::string* options_string) {
Paul Crowley47212f02020-02-18 21:30:03 -0800140 return OptionsToStringForApiLevel(GetFirstApiLevel(), options, options_string);
141}
142
143bool OptionsToStringForApiLevel(unsigned int first_api_level, const EncryptionOptions& options,
144 std::string* options_string) {
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700145 std::string contents_mode, filenames_mode;
146 if (!LookupModeById(contents_modes, options.contents_mode, &contents_mode)) {
147 return false;
148 }
149 if (!LookupModeById(filenames_modes, options.filenames_mode, &filenames_mode)) {
150 return false;
151 }
152 *options_string = contents_mode + ":" + filenames_mode + ":v" + std::to_string(options.version);
Paul Crowley3c78d412019-10-25 17:09:03 -0700153 if ((options.flags & FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64)) {
154 *options_string += "+inlinecrypt_optimized";
155 }
Paul Crowley476ce0a2020-05-20 16:05:41 -0700156 if ((options.flags & FSCRYPT_POLICY_FLAG_IV_INO_LBLK_32)) {
157 *options_string += "+emmc_optimized";
158 }
Barani Muthukumaran35602672020-01-23 17:40:01 -0800159 if (options.use_hw_wrapped_key) {
160 *options_string += "+wrappedkey_v0";
161 }
Paul Crowley47212f02020-02-18 21:30:03 -0800162
Paul Crowley5e2fbc42019-10-24 23:27:50 -0700163 EncryptionOptions options_check;
Paul Crowley47212f02020-02-18 21:30:03 -0800164 if (!ParseOptionsForApiLevel(first_api_level, *options_string, &options_check)) {
Paul Crowley5e2fbc42019-10-24 23:27:50 -0700165 LOG(ERROR) << "Internal error serializing options as string: " << *options_string;
166 return false;
167 }
Barani Muthukumaran35602672020-01-23 17:40:01 -0800168 if (options != options_check) {
Paul Crowley5e2fbc42019-10-24 23:27:50 -0700169 LOG(ERROR) << "Internal error serializing options as string, round trip failed: "
170 << *options_string;
171 return false;
172 }
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700173 return true;
174}
Eric Biggersa9fa6052017-02-02 14:37:05 -0800175
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700176bool ParseOptions(const std::string& options_string, EncryptionOptions* options) {
Paul Crowley47212f02020-02-18 21:30:03 -0800177 return ParseOptionsForApiLevel(GetFirstApiLevel(), options_string, options);
178}
179
180bool ParseOptionsForApiLevel(unsigned int first_api_level, const std::string& options_string,
181 EncryptionOptions* options) {
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700182 auto parts = android::base::Split(options_string, ":");
Paul Crowley47212f02020-02-18 21:30:03 -0800183 if (parts.size() > 3) {
184 LOG(ERROR) << "Invalid encryption options: " << options;
Paul Crowley5e2fbc42019-10-24 23:27:50 -0700185 return false;
186 }
Paul Crowley47212f02020-02-18 21:30:03 -0800187 options->contents_mode = FSCRYPT_MODE_AES_256_XTS;
188 if (parts.size() > 0 && !parts[0].empty()) {
189 if (!LookupModeByName(contents_modes, parts[0], &options->contents_mode)) {
190 LOG(ERROR) << "Invalid file contents encryption mode: " << parts[0];
Paul Crowleybe2aeea2019-10-25 10:19:10 -0700191 return false;
Paul Crowley5e2fbc42019-10-24 23:27:50 -0700192 }
Paul Crowley47212f02020-02-18 21:30:03 -0800193 }
194 if (options->contents_mode == FSCRYPT_MODE_ADIANTUM) {
Eric Biggers9b14aa32019-12-16 16:02:23 -0800195 options->filenames_mode = FSCRYPT_MODE_ADIANTUM;
Paul Lawrencec096c9c2016-05-24 04:57:23 -0700196 } else {
Eric Biggers9b14aa32019-12-16 16:02:23 -0800197 options->filenames_mode = FSCRYPT_MODE_AES_256_CTS;
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700198 }
ThiƩbaud Weksteenc54df902020-10-26 15:33:21 +0100199 if (parts.size() > 1 && !parts[1].empty()) {
Paul Crowley47212f02020-02-18 21:30:03 -0800200 if (!LookupModeByName(filenames_modes, parts[1], &options->filenames_mode)) {
201 LOG(ERROR) << "Invalid file names encryption mode: " << parts[1];
202 return false;
203 }
204 }
205 // Default to v2 after Q
Eric Biggers1cb56292020-08-10 11:19:06 -0700206 options->version = first_api_level > __ANDROID_API_Q__ ? 2 : 1;
Paul Crowley22eb1d42019-10-25 10:28:53 -0700207 options->flags = 0;
Paul Crowley47212f02020-02-18 21:30:03 -0800208 options->use_hw_wrapped_key = false;
209 if (parts.size() > 2 && !parts[2].empty()) {
Paul Crowley3c78d412019-10-25 17:09:03 -0700210 auto flags = android::base::Split(parts[2], "+");
211 for (const auto& flag : flags) {
212 if (flag == "v1") {
213 options->version = 1;
214 } else if (flag == "v2") {
215 options->version = 2;
216 } else if (flag == "inlinecrypt_optimized") {
217 options->flags |= FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64;
Paul Crowley476ce0a2020-05-20 16:05:41 -0700218 } else if (flag == "emmc_optimized") {
219 options->flags |= FSCRYPT_POLICY_FLAG_IV_INO_LBLK_32;
Barani Muthukumaran35602672020-01-23 17:40:01 -0800220 } else if (flag == "wrappedkey_v0") {
221 options->use_hw_wrapped_key = true;
Paul Crowley3c78d412019-10-25 17:09:03 -0700222 } else {
223 LOG(ERROR) << "Unknown flag: " << flag;
224 return false;
225 }
226 }
227 }
Paul Crowley22eb1d42019-10-25 10:28:53 -0700228
229 // In the original setting of v1 policies and AES-256-CTS we used 4-byte
Paul Crowley47212f02020-02-18 21:30:03 -0800230 // padding of filenames, so retain that on old first_api_levels.
Paul Crowley22eb1d42019-10-25 10:28:53 -0700231 //
232 // For everything else, use 16-byte padding. This is more secure (it helps
233 // hide the length of filenames), and it makes the inputs evenly divisible
234 // into cipher blocks which is more efficient for encryption and decryption.
Eric Biggers1cb56292020-08-10 11:19:06 -0700235 if (first_api_level <= __ANDROID_API_Q__ && options->version == 1 &&
236 options->filenames_mode == FSCRYPT_MODE_AES_256_CTS) {
Eric Biggers9b14aa32019-12-16 16:02:23 -0800237 options->flags |= FSCRYPT_POLICY_FLAGS_PAD_4;
Paul Crowley22eb1d42019-10-25 10:28:53 -0700238 } else {
Eric Biggers9b14aa32019-12-16 16:02:23 -0800239 options->flags |= FSCRYPT_POLICY_FLAGS_PAD_16;
Paul Crowley22eb1d42019-10-25 10:28:53 -0700240 }
241
242 // Use DIRECT_KEY for Adiantum, since it's much more efficient but just as
243 // secure since Android doesn't reuse the same master key for multiple
244 // encryption modes.
Paul Crowley47212f02020-02-18 21:30:03 -0800245 if (options->contents_mode == FSCRYPT_MODE_ADIANTUM) {
246 if (options->filenames_mode != FSCRYPT_MODE_ADIANTUM) {
ThiƩbaud Weksteenc54df902020-10-26 15:33:21 +0100247 LOG(ERROR) << "Adiantum must be both contents and filenames mode or neither, invalid "
248 "options: "
249 << options_string;
Paul Crowley47212f02020-02-18 21:30:03 -0800250 return false;
251 }
Eric Biggers9b14aa32019-12-16 16:02:23 -0800252 options->flags |= FSCRYPT_POLICY_FLAG_DIRECT_KEY;
Paul Crowley47212f02020-02-18 21:30:03 -0800253 } else if (options->filenames_mode == FSCRYPT_MODE_ADIANTUM) {
ThiƩbaud Weksteenc54df902020-10-26 15:33:21 +0100254 LOG(ERROR)
255 << "Adiantum must be both contents and filenames mode or neither, invalid options: "
256 << options_string;
Paul Crowley47212f02020-02-18 21:30:03 -0800257 return false;
Paul Crowley22eb1d42019-10-25 10:28:53 -0700258 }
Paul Crowley476ce0a2020-05-20 16:05:41 -0700259
260 // IV generation methods are mutually exclusive
261 int iv_methods = 0;
262 iv_methods += !!(options->flags & FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64);
263 iv_methods += !!(options->flags & FSCRYPT_POLICY_FLAG_IV_INO_LBLK_32);
264 iv_methods += !!(options->flags & FSCRYPT_POLICY_FLAG_DIRECT_KEY);
265 if (iv_methods > 1) {
266 LOG(ERROR) << "At most one IV generation method can be set, invalid options: "
267 << options_string;
268 return false;
269 }
270
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700271 return true;
272}
Paul Lawrencec096c9c2016-05-24 04:57:23 -0700273
Paul Crowley9444d622019-10-24 22:51:20 -0700274static std::string PolicyDebugString(const EncryptionPolicy& policy) {
275 std::stringstream ss;
276 std::string ref_hex;
277 BytesToHex(policy.key_raw_ref, &ref_hex);
278 ss << ref_hex;
279 ss << " v" << policy.options.version;
280 ss << " modes " << policy.options.contents_mode << "/" << policy.options.filenames_mode;
Paul Crowley22eb1d42019-10-25 10:28:53 -0700281 ss << std::hex << " flags 0x" << policy.options.flags;
Paul Crowley9444d622019-10-24 22:51:20 -0700282 return ss.str();
283}
284
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700285bool EnsurePolicy(const EncryptionPolicy& policy, const std::string& directory) {
Eric Biggers17115c72019-09-13 11:07:42 -0700286 union {
287 fscrypt_policy_v1 v1;
288 fscrypt_policy_v2 v2;
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700289 } kern_policy;
290 memset(&kern_policy, 0, sizeof(kern_policy));
Eric Biggersb9015082019-09-05 12:18:30 -0700291
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700292 switch (policy.options.version) {
Eric Biggers17115c72019-09-13 11:07:42 -0700293 case 1:
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700294 if (policy.key_raw_ref.size() != FSCRYPT_KEY_DESCRIPTOR_SIZE) {
295 LOG(ERROR) << "Invalid key descriptor length for v1 policy: "
296 << policy.key_raw_ref.size();
297 return false;
Eric Biggers17115c72019-09-13 11:07:42 -0700298 }
299 // Careful: FSCRYPT_POLICY_V1 is actually 0 in the API, so make sure
300 // to use it here instead of a literal 1.
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700301 kern_policy.v1.version = FSCRYPT_POLICY_V1;
302 kern_policy.v1.contents_encryption_mode = policy.options.contents_mode;
303 kern_policy.v1.filenames_encryption_mode = policy.options.filenames_mode;
Paul Crowley22eb1d42019-10-25 10:28:53 -0700304 kern_policy.v1.flags = policy.options.flags;
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700305 policy.key_raw_ref.copy(reinterpret_cast<char*>(kern_policy.v1.master_key_descriptor),
306 FSCRYPT_KEY_DESCRIPTOR_SIZE);
Eric Biggers17115c72019-09-13 11:07:42 -0700307 break;
308 case 2:
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700309 if (policy.key_raw_ref.size() != FSCRYPT_KEY_IDENTIFIER_SIZE) {
310 LOG(ERROR) << "Invalid key identifier length for v2 policy: "
311 << policy.key_raw_ref.size();
312 return false;
Eric Biggers17115c72019-09-13 11:07:42 -0700313 }
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700314 kern_policy.v2.version = FSCRYPT_POLICY_V2;
315 kern_policy.v2.contents_encryption_mode = policy.options.contents_mode;
316 kern_policy.v2.filenames_encryption_mode = policy.options.filenames_mode;
Paul Crowley22eb1d42019-10-25 10:28:53 -0700317 kern_policy.v2.flags = policy.options.flags;
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700318 policy.key_raw_ref.copy(reinterpret_cast<char*>(kern_policy.v2.master_key_identifier),
319 FSCRYPT_KEY_IDENTIFIER_SIZE);
Eric Biggers17115c72019-09-13 11:07:42 -0700320 break;
321 default:
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700322 LOG(ERROR) << "Invalid encryption policy version: " << policy.options.version;
323 return false;
Eric Biggers17115c72019-09-13 11:07:42 -0700324 }
325
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700326 android::base::unique_fd fd(open(directory.c_str(), O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC));
Eric Biggersb9015082019-09-05 12:18:30 -0700327 if (fd == -1) {
328 PLOG(ERROR) << "Failed to open directory " << directory;
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700329 return false;
Eric Biggersb9015082019-09-05 12:18:30 -0700330 }
331
332 bool already_encrypted = fscrypt_is_encrypted(fd);
333
334 // FS_IOC_SET_ENCRYPTION_POLICY will set the policy if the directory is
335 // unencrypted; otherwise it will verify that the existing policy matches.
336 // Setting the policy will fail if the directory is already nonempty.
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700337 if (ioctl(fd, FS_IOC_SET_ENCRYPTION_POLICY, &kern_policy) != 0) {
Eric Biggersb9015082019-09-05 12:18:30 -0700338 std::string reason;
339 switch (errno) {
340 case EEXIST:
341 reason = "The directory already has a different encryption policy.";
342 break;
343 default:
344 reason = strerror(errno);
345 break;
346 }
Paul Crowley9444d622019-10-24 22:51:20 -0700347 LOG(ERROR) << "Failed to set encryption policy of " << directory << " to "
348 << PolicyDebugString(policy) << ": " << reason;
Eric Biggersb9015082019-09-05 12:18:30 -0700349 if (errno == ENOTEMPTY) {
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700350 log_ls(directory.c_str());
Eric Biggersb9015082019-09-05 12:18:30 -0700351 }
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700352 return false;
Eric Biggersb9015082019-09-05 12:18:30 -0700353 }
354
355 if (already_encrypted) {
Paul Crowley9444d622019-10-24 22:51:20 -0700356 LOG(INFO) << "Verified that " << directory << " has the encryption policy "
357 << PolicyDebugString(policy);
Paul Lawrence4818b732016-05-23 22:03:40 +0000358 } else {
Paul Crowley9444d622019-10-24 22:51:20 -0700359 LOG(INFO) << "Encryption policy of " << directory << " set to "
360 << PolicyDebugString(policy);
Paul Lawrence4818b732016-05-23 22:03:40 +0000361 }
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700362 return true;
Paul Lawrence4818b732016-05-23 22:03:40 +0000363}
Paul Crowleyf6ca2c32019-10-24 14:51:44 -0700364
365} // namespace fscrypt
366} // namespace android