cryptsetup API
Public cryptsetup API
Loading...
Searching...
No Matches
Modules | Data Structures | Macros | Functions
Cryptsetup on-disk format types

Modules

 HW encryption type
 

Data Structures

struct  crypt_params_plain
 
struct  crypt_params_luks1
 
struct  crypt_params_loopaes
 
struct  crypt_params_verity
 
struct  crypt_params_tcrypt
 
struct  crypt_params_integrity
 
struct  crypt_params_luks2
 
struct  crypt_params_hw_opal
 

Macros

#define CRYPT_PLAIN   "PLAIN"
 
#define CRYPT_LUKS1   "LUKS1"
 
#define CRYPT_LUKS2   "LUKS2"
 
#define CRYPT_LOOPAES   "LOOPAES"
 
#define CRYPT_VERITY   "VERITY"
 
#define CRYPT_TCRYPT   "TCRYPT"
 
#define CRYPT_INTEGRITY   "INTEGRITY"
 
#define CRYPT_BITLK   "BITLK"
 
#define CRYPT_FVAULT2   "FVAULT2"
 
#define CRYPT_LUKS   NULL
 
#define CRYPT_VERITY_NO_HEADER   (UINT32_C(1) << 0)
 
#define CRYPT_VERITY_CHECK_HASH   (UINT32_C(1) << 1)
 
#define CRYPT_VERITY_CREATE_HASH   (UINT32_C(1) << 2)
 
#define CRYPT_VERITY_ROOT_HASH_SIGNATURE   (UINT32_C(1) << 3)
 
#define CRYPT_TCRYPT_LEGACY_MODES   (UINT32_C(1) << 0)
 
#define CRYPT_TCRYPT_HIDDEN_HEADER   (UINT32_C(1) << 1)
 
#define CRYPT_TCRYPT_BACKUP_HEADER   (UINT32_C(1) << 2)
 
#define CRYPT_TCRYPT_SYSTEM_HEADER   (UINT32_C(1) << 3)
 
#define CRYPT_TCRYPT_VERA_MODES   (UINT32_C(1) << 4)
 

Functions

const char * crypt_get_type (struct crypt_device *cd)
 
const char * crypt_get_default_type (void)
 
int crypt_get_hw_encryption_type (struct crypt_device *cd)
 
int crypt_get_hw_encryption_key_size (struct crypt_device *cd)
 

Detailed Description

Set of functions, #defines and structs related to on-disk format types

Macro Definition Documentation

◆ CRYPT_BITLK

#define CRYPT_BITLK   "BITLK"

BITLK (BitLocker-compatible mode)

◆ CRYPT_FVAULT2

#define CRYPT_FVAULT2   "FVAULT2"

FVAULT2 (FileVault2-compatible mode)

◆ CRYPT_INTEGRITY

#define CRYPT_INTEGRITY   "INTEGRITY"

INTEGRITY dm-integrity device

◆ CRYPT_LOOPAES

#define CRYPT_LOOPAES   "LOOPAES"

loop-AES compatibility mode

◆ CRYPT_LUKS

#define CRYPT_LUKS   NULL

LUKS any version

Examples
crypt_luks_usage.c.

◆ CRYPT_LUKS1

#define CRYPT_LUKS1   "LUKS1"

LUKS version 1 header on-disk

◆ CRYPT_LUKS2

#define CRYPT_LUKS2   "LUKS2"

LUKS version 2 header on-disk

Examples
crypt_luks_usage.c.

◆ CRYPT_PLAIN

#define CRYPT_PLAIN   "PLAIN"

plain crypt device, no on-disk header

◆ CRYPT_TCRYPT

#define CRYPT_TCRYPT   "TCRYPT"

TCRYPT (TrueCrypt-compatible and VeraCrypt-compatible) mode

◆ CRYPT_TCRYPT_BACKUP_HEADER

#define CRYPT_TCRYPT_BACKUP_HEADER   (UINT32_C(1) << 2)

Try to load backup header

◆ CRYPT_TCRYPT_HIDDEN_HEADER

#define CRYPT_TCRYPT_HIDDEN_HEADER   (UINT32_C(1) << 1)

Try to load hidden header (describing hidden device)

◆ CRYPT_TCRYPT_LEGACY_MODES

#define CRYPT_TCRYPT_LEGACY_MODES   (UINT32_C(1) << 0)

Include legacy modes when scanning for header

◆ CRYPT_TCRYPT_SYSTEM_HEADER

#define CRYPT_TCRYPT_SYSTEM_HEADER   (UINT32_C(1) << 3)

Device contains encrypted system (with boot loader)

◆ CRYPT_TCRYPT_VERA_MODES

#define CRYPT_TCRYPT_VERA_MODES   (UINT32_C(1) << 4)

Include VeraCrypt modes when scanning for header, all other TCRYPT flags applies as well. VeraCrypt device is reported as TCRYPT type.

◆ CRYPT_VERITY

#define CRYPT_VERITY   "VERITY"

dm-verity mode

◆ CRYPT_VERITY_CHECK_HASH

#define CRYPT_VERITY_CHECK_HASH   (UINT32_C(1) << 1)

Verity hash in userspace before activation

◆ CRYPT_VERITY_CREATE_HASH

#define CRYPT_VERITY_CREATE_HASH   (UINT32_C(1) << 2)

Create hash - format hash device

◆ CRYPT_VERITY_NO_HEADER

#define CRYPT_VERITY_NO_HEADER   (UINT32_C(1) << 0)

No on-disk header (only hashes)

◆ CRYPT_VERITY_ROOT_HASH_SIGNATURE

#define CRYPT_VERITY_ROOT_HASH_SIGNATURE   (UINT32_C(1) << 3)

Root hash signature required for activation

Function Documentation

◆ crypt_get_default_type()

const char * crypt_get_default_type ( void  )

Get device default LUKS type

Returns
string according to device type (CRYPT_LUKS1 or CRYPT_LUKS2).

◆ crypt_get_hw_encryption_key_size()

int crypt_get_hw_encryption_key_size ( struct crypt_device *  cd)

Get HW encryption (like OPAL) key size (in bytes)

Returns
key size or 0 if no HW encryption is used.

◆ crypt_get_hw_encryption_type()

int crypt_get_hw_encryption_type ( struct crypt_device *  cd)

Get HW encryption type

Returns
HW encryption type (see crypt-hw-encryption-types) or negative errno otherwise.

◆ crypt_get_type()

const char * crypt_get_type ( struct crypt_device *  cd)

Get device type

Parameters
cdcrypt device handle
Returns
string according to device type or NULL if not known.
Examples
crypt_luks_usage.c.