Lines Matching refs:encryption
2 Filesystem-level encryption (fscrypt)
9 transparent encryption of files and directories.
15 use encryption, see the documentation for the userspace tool `fscrypt
20 <https://source.android.com/security/encryption/file-based>`_, over
56 Provided that userspace chooses a strong encryption key, fscrypt
72 fscrypt (and storage encryption in general) can only provide limited
83 After an encryption key has been provided, fscrypt is not designed to
88 Also note that as long as the encryption keys are *anywhere* in
99 some of the encryption keys as well. (Since Linux v4.12, all
116 encryption modes being used. For example, if AES-256-XTS is used for
117 contents encryption, the master key must be 64 bytes (512 bits). Note
142 contents encryption and as a CTS-CBC key for filenames encryption
145 for contents encryption. Without per-file keys, to ensure IV
151 - Per-file keys strengthen the encryption of filenames, where IVs are
159 key for each file because it reduces the size of the encryption xattr,
174 those use the CTS-CBC encryption mode which requires a key half as
175 long as that required by the XTS encryption mode.
187 fscrypt allows one encryption mode to be specified for file contents
188 and one encryption mode to be specified for filenames. Different
189 directory trees are permitted to use different encryption modes.
190 Currently, the following pairs of encryption modes are supported:
196 It is strongly recommended to use AES-256-XTS for contents encryption.
203 it would not otherwise be feasible to use encryption at all. It is
209 New encryption modes can be added relatively easily, without changes
210 to individual filesystems. However, authenticated encryption (AE)
221 the SHA-256 hash of the inode's data encryption key.
228 the context of CTS-CBC encryption means that when the original
232 the future by switching to an encryption mode that is a strong
256 Setting an encryption policy
259 The FS_IOC_SET_ENCRYPTION_POLICY ioctl sets an encryption policy on an
261 has the specified encryption policy. It takes in a pointer to a
280 encryption modes to use. If unsure, use
300 encryption policy is assigned to the directory, turning it into an
304 directory will be encrypted, inheriting the same encryption policy.
308 FS_IOC_SET_ENCRYPTION_POLICY validates that the specified encryption
322 - ``EEXIST``: the file is already encrypted with an encryption policy
324 - ``EINVAL``: an invalid encryption policy was specified (invalid
329 - ``ENOTTY``: this type of filesystem does not implement encryption
330 - ``EOPNOTSUPP``: the kernel was not configured with encryption
332 had encryption enabled on it. (For example, to use encryption on an
341 Getting an encryption policy
352 encryption context format
354 - ``ENOTTY``: this type of filesystem does not implement encryption
355 - ``EOPNOTSUPP``: the kernel was not configured with encryption
369 value is intended to used as a salt when deriving an encryption key
384 ``master_key_descriptor`` that was set in the encryption policy. The
404 There are several different types of keyrings in which encryption keys
431 With the encryption key, encrypted regular files, directories, and
433 after all, the encryption is intended to be transparent. However,
436 - Unencrypted files, or files encrypted with a different encryption
477 files, directories, and symlinks even before their encryption key has
514 without the encryption key. This would require special APIs which
520 After an encryption policy has been set on a directory, all regular
522 (recursively) will inherit that encryption policy. Special files ---
527 files, or files encrypted with a different encryption policy, in an
531 attacks that try to disable or downgrade encryption in known locations
534 this by validating all top-level encryption policies prior to access.
542 An encryption policy is represented on-disk by a :c:type:`struct
547 semantics of the encryption xattr. (In particular, there would be
548 much confusion if an encryption policy were to be added to or removed
566 encryption policy`_), except that :c:type:`struct fscrypt_context`
568 and is used to derive the inode's encryption key as described in
584 buffers regardless of encryption. Other filesystems, such as ext4 and
585 F2FS, have to allocate bounce pages specially for encryption.
596 With encryption, lookups must be supported and efficient both with and
597 without the encryption key. Clearly, it would not work to hash the