Update LUKS default hash and kernel crypto api hash check.

This commit is contained in:
Milan Broz
2015-11-02 21:07:49 +01:00
parent 8ae62715a8
commit 2aa0bb7eac
2 changed files with 2 additions and 2 deletions

View File

@@ -77,7 +77,7 @@ int crypt_backend_init(struct crypt_device *ctx)
struct sockaddr_alg sa = {
.salg_family = AF_ALG,
.salg_type = "hash",
.salg_name = "sha1",
.salg_name = "sha256",
};
int tfmfd = -1, opfd = -1;

View File

@@ -1074,7 +1074,7 @@ static int _crypt_format_luks1(struct crypt_device *cd,
&alignment_offset, DEFAULT_DISK_ALIGNMENT);
r = LUKS_generate_phdr(&cd->u.luks1.hdr, cd->volume_key, cipher, cipher_mode,
(params && params->hash) ? params->hash : "sha1",
(params && params->hash) ? params->hash : DEFAULT_LUKS1_HASH,
uuid, LUKS_STRIPES,
required_alignment / SECTOR_SIZE,
alignment_offset / SECTOR_SIZE,