linux/include/linux/ecryptfs.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_ECRYPTFS_H
#define _LINUX_ECRYPTFS_H

/* Version verification for shared data structures w/ userspace */
#define ECRYPTFS_VERSION_MAJOR
#define ECRYPTFS_VERSION_MINOR
#define ECRYPTFS_SUPPORTED_FILE_VERSION
/* These flags indicate which features are supported by the kernel
 * module; userspace tools such as the mount helper read the feature
 * bits from a sysfs handle in order to determine how to behave. */
#define ECRYPTFS_VERSIONING_PASSPHRASE
#define ECRYPTFS_VERSIONING_PUBKEY
#define ECRYPTFS_VERSIONING_PLAINTEXT_PASSTHROUGH
#define ECRYPTFS_VERSIONING_POLICY
#define ECRYPTFS_VERSIONING_XATTR
#define ECRYPTFS_VERSIONING_MULTKEY
#define ECRYPTFS_VERSIONING_DEVMISC
#define ECRYPTFS_VERSIONING_HMAC
#define ECRYPTFS_VERSIONING_FILENAME_ENCRYPTION
#define ECRYPTFS_VERSIONING_GCM
#define ECRYPTFS_MAX_PASSWORD_LENGTH
#define ECRYPTFS_MAX_PASSPHRASE_BYTES
#define ECRYPTFS_SALT_SIZE
#define ECRYPTFS_SALT_SIZE_HEX
/* The original signature size is only for what is stored on disk; all
 * in-memory representations are expanded hex, so it better adapted to
 * be passed around or referenced on the command line */
#define ECRYPTFS_SIG_SIZE
#define ECRYPTFS_SIG_SIZE_HEX
#define ECRYPTFS_PASSWORD_SIG_SIZE
#define ECRYPTFS_MAX_KEY_BYTES
#define ECRYPTFS_MAX_ENCRYPTED_KEY_BYTES
#define ECRYPTFS_FILE_VERSION
#define ECRYPTFS_MAX_PKI_NAME_BYTES

#define RFC2440_CIPHER_DES3_EDE
#define RFC2440_CIPHER_CAST_5
#define RFC2440_CIPHER_BLOWFISH
#define RFC2440_CIPHER_AES_128
#define RFC2440_CIPHER_AES_192
#define RFC2440_CIPHER_AES_256
#define RFC2440_CIPHER_TWOFISH
#define RFC2440_CIPHER_CAST_6

#define RFC2440_CIPHER_RSA

/**
 * For convenience, we may need to pass around the encrypted session
 * key between kernel and userspace because the authentication token
 * may not be extractable.  For example, the TPM may not release the
 * private key, instead requiring the encrypted data and returning the
 * decrypted data.
 */
struct ecryptfs_session_key {};

struct ecryptfs_password {};

enum ecryptfs_token_types {};

struct ecryptfs_private_key {};

/* May be a password or a private key */
struct ecryptfs_auth_tok {} __attribute__ ((packed));

#endif /* _LINUX_ECRYPTFS_H */