/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * fscrypt user API * * These ioctls can be used on filesystems that support fscrypt. See the * "User API" section of Documentation/filesystems/fscrypt.rst.
*/ #ifndef _UAPI_LINUX_FSCRYPT_H #define _UAPI_LINUX_FSCRYPT_H
/* * Legacy policy version; ad-hoc KDF and no key verification. * For new encrypted directories, use fscrypt_policy_v2 instead. * * Careful: the .version field for this is actually 0, not 1.
*/ #define FSCRYPT_POLICY_V1 0 #define FSCRYPT_KEY_DESCRIPTOR_SIZE 8 struct fscrypt_policy_v1 {
__u8 version;
__u8 contents_encryption_mode;
__u8 filenames_encryption_mode;
__u8 flags;
__u8 master_key_descriptor[FSCRYPT_KEY_DESCRIPTOR_SIZE];
};
/* * v1 policy keys are specified by an arbitrary 8-byte key "descriptor", * matching fscrypt_policy_v1::master_key_descriptor.
*/ #define FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR 1
/* * v2 policy keys are specified by a 16-byte key "identifier" which the kernel * calculates as a cryptographic hash of the key itself, * matching fscrypt_policy_v2::master_key_identifier.
*/ #define FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER 2
/* * Specifies a key, either for v1 or v2 policies. This doesn't contain the * actual key itself; this is just the "name" of the key.
*/ struct fscrypt_key_specifier {
__u32 type; /* one of FSCRYPT_KEY_SPEC_TYPE_* */
__u32 __reserved; union {
__u8 __reserved[32]; /* reserve some extra space */
__u8 descriptor[FSCRYPT_KEY_DESCRIPTOR_SIZE];
__u8 identifier[FSCRYPT_KEY_IDENTIFIER_SIZE];
} u;
};
/* * Payload of Linux keyring key of type "fscrypt-provisioning", referenced by * fscrypt_add_key_arg::key_id as an alternative to fscrypt_add_key_arg::raw.
*/ struct fscrypt_provisioning_key_payload {
__u32 type;
__u32 flags;
__u8 raw[];
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.