mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Make CRYPT_WIPE_ENCRYPTED_ZERO obsolete.
It was never implemented (the idea was to speed up wipe), but with the recent RNG performance changes it makes no longer sense.
This commit is contained in:
@@ -1996,7 +1996,7 @@ int crypt_keyfile_read(struct crypt_device *cd,
|
||||
typedef enum {
|
||||
CRYPT_WIPE_ZERO, /**< Fill with zeroes */
|
||||
CRYPT_WIPE_RANDOM, /**< Use RNG to fill data */
|
||||
CRYPT_WIPE_ENCRYPTED_ZERO, /**< Add encryption and fill with zeroes as plaintext */
|
||||
CRYPT_WIPE_ENCRYPTED_ZERO, /**< Obsolete, same as CRYPT_WIPE_RANDOM */
|
||||
CRYPT_WIPE_SPECIAL, /**< Compatibility only, do not use (Gutmann method) */
|
||||
} crypt_wipe_pattern;
|
||||
|
||||
|
||||
@@ -135,12 +135,8 @@ static int wipe_block(struct crypt_device *cd, int devfd, crypt_wipe_pattern pat
|
||||
memset(sf, 0, wipe_block_size);
|
||||
*need_block_init = false;
|
||||
r = 0;
|
||||
} else if (pattern == CRYPT_WIPE_RANDOM) {
|
||||
r = crypt_random_get(cd, sf, wipe_block_size,
|
||||
CRYPT_RND_NORMAL) ? -EIO : 0;
|
||||
*need_block_init = true;
|
||||
} else if (pattern == CRYPT_WIPE_ENCRYPTED_ZERO) {
|
||||
// FIXME
|
||||
} else if (pattern == CRYPT_WIPE_RANDOM ||
|
||||
pattern == CRYPT_WIPE_ENCRYPTED_ZERO) {
|
||||
r = crypt_random_get(cd, sf, wipe_block_size,
|
||||
CRYPT_RND_NORMAL) ? -EIO : 0;
|
||||
*need_block_init = true;
|
||||
|
||||
Reference in New Issue
Block a user