Add basic TCRYPT library.

This commit is contained in:
Milan Broz
2012-11-12 23:31:32 +01:00
parent db97d3d8c8
commit 3cbb43a73a
8 changed files with 632 additions and 2 deletions

View File

@@ -302,6 +302,8 @@ int crypt_memory_lock(struct crypt_device *cd, int lock);
#define CRYPT_LOOPAES "LOOPAES"
/** dm-verity mode */
#define CRYPT_VERITY "VERITY"
/** TCRYPT mode */
#define CRYPT_TCRYPT "TCRYPT"
/**
* Get device type
@@ -380,6 +382,26 @@ struct crypt_params_verity {
uint32_t flags; /**< CRYPT_VERITY* flags */
};
/**
*
* Structure used as parameter for TCRYPT device type
*
* @see crypt_format
*
*/
/** Try to load hidden header (describing hidden device) */
#define CRYPT_TCRYPT_HIDDEN_HEADER (1 << 0)
struct crypt_params_tcrypt {
const char *passphrase;
size_t passphrase_size;
const char *hash_name; /**< hash function for PBKDF */
const char *cipher[3]; /**< cipher chain */
const char *mode; /**< cipher block mode */
size_t key_size; /**< key size in bytes */
uint32_t flags; /**< CRYPT_TCRYPT* flags */
};
/** @} */
/**