Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package cryptsetup for openSUSE:Factory checked in at 2026-11-20 14:44:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cryptsetup (Old) and /work/SRC/openSUSE:Factory/.cryptsetup.new.1251 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cryptsetup" Fri Nov 20 14:44:04 2026 rev:141 rq:1398598 version:2.8.8 Changes: -------- --- /work/SRC/openSUSE:Factory/cryptsetup/cryptsetup.changes 2026-09-17 15:16:06.860647192 +0200 +++ /work/SRC/openSUSE:Factory/.cryptsetup.new.1251/cryptsetup.changes 2026-11-20 14:44:56.599859422 +0100 @@ -1,0 +2,15 @@ +Thu Sep 24 11:41:08 UTC 2026 - Pedro Monreal <[email protected]> + +- Changes to add CNSA 1.0 and 2.0 compliance: (jsc#PED-16991) + * Use sha512 and AES-256 by default. + * Build with --with-luks1-hash=sha512 (PBKDF2, AF and digest hash + for new LUKS1 and LUKS2 keyslots), --with-plain-hash=sha512, + --with-plain-keybits=512 (AES-256-XTS in plain mode) and + --with-verity-hash=sha512. + * Use sha512 for the LUKS2 header checksum and the LUKS2 + reencryption checksum resilience hash. + * Add cryptsetup-cnsa-default-sha512.patch + * NOTE: plain mode devices created with the previous defaults + must now be opened with explicit --hash sha256 --key-size 256. + +------------------------------------------------------------------- New: ---- cryptsetup-cnsa-default-sha512.patch ----------(New B)---------- New: reencryption checksum resilience hash. * Add cryptsetup-cnsa-default-sha512.patch * NOTE: plain mode devices created with the previous defaults ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cryptsetup.spec ++++++ --- /var/tmp/diff_new_pack.OwRt7R/_old 2026-11-20 14:44:59.139967014 +0100 +++ /var/tmp/diff_new_pack.OwRt7R/_new 2026-11-20 14:44:59.142967141 +0100 @@ -30,6 +30,8 @@ Source2: baselibs.conf Source3: cryptsetup.keyring Patch0: cryptsetup-fips140-3.patch +# PATCH-FIX-SUSE: Changes to add CNSA 1.0 and 2.0 compliance: (jsc#PED-16991) +Patch1: cryptsetup-cnsa-default-sha512.patch # 2.6.38 has the required if_alg.h BuildRequires: linux-glibc-devel >= 2.6.38 BuildRequires: fdupes @@ -129,11 +131,16 @@ --enable-gcrypt-pbkdf2 \ --enable-libargon2 \ --with-luks2-pbkdf=pbkdf2 \ + --with-luks1-hash=sha512 \ + --with-plain-hash=sha512 \ + --with-plain-keybits=512 \ + --with-verity-hash=sha512 \ %if %{?suse_version} < 1550 --with-default-luks-format=LUKS1 \ %endif --with-luks2-lock-path=/run/cryptsetup \ --with-tmpfilesdir='%{_tmpfilesdir}' + %make_build %install ++++++ cryptsetup-cnsa-default-sha512.patch ++++++ CNSA 1.0: use SHA-512 instead of hardcoded SHA-256 defaults for the LUKS2 header checksum and the LUKS2 reencryption checksum resilience hash. Index: cryptsetup-2.8.8/lib/luks2/luks2_json_format.c =================================================================== --- cryptsetup-2.8.8.orig/lib/luks2/luks2_json_format.c +++ cryptsetup-2.8.8/lib/luks2/luks2_json_format.c @@ -223,7 +223,7 @@ int LUKS2_generate_hdr( hdr->seqid = 1; hdr->version = 2; memset(hdr->label, 0, LUKS2_LABEL_L); - strcpy(hdr->checksum_alg, "sha256"); + strcpy(hdr->checksum_alg, "sha512"); r = crypt_random_get(cd, (char*)hdr->salt1, LUKS2_SALT_L, CRYPT_RND_SALT); if (r < 0) { Index: cryptsetup-2.8.8/lib/luks2/luks2_luks1_convert.c =================================================================== --- cryptsetup-2.8.8.orig/lib/luks2/luks2_luks1_convert.c +++ cryptsetup-2.8.8/lib/luks2/luks2_luks1_convert.c @@ -599,7 +599,7 @@ int LUKS2_luks1_to_luks2(struct crypt_de hdr2->hdr_size = LUKS2_HDR_16K_LEN; hdr2->seqid = 1; hdr2->version = 2; - strncpy(hdr2->checksum_alg, "sha256", LUKS2_CHECKSUM_ALG_L); + strncpy(hdr2->checksum_alg, "sha512", LUKS2_CHECKSUM_ALG_L); r = crypt_random_get(cd, (char*)hdr2->salt1, sizeof(hdr2->salt1), CRYPT_RND_SALT); if (r < 0) { log_dbg(cd, "Cannot generate header salt."); Index: cryptsetup-2.8.8/man/common_options.adoc =================================================================== --- cryptsetup-2.8.8.orig/man/common_options.adoc +++ cryptsetup-2.8.8/man/common_options.adoc @@ -917,7 +917,7 @@ endif::[] ifdef::ACTION_REENCRYPT[] *--resilience-hash* _hash_ (LUKS2 only):: The _hash_ algorithm is used with "--resilience checksum" only. -The default hash is sha256. +The default hash is sha512. With other resilience modes, the hash parameter is ignored. endif::[] Index: cryptsetup-2.8.8/src/utils_reencrypt.c =================================================================== --- cryptsetup-2.8.8.orig/src/utils_reencrypt.c +++ cryptsetup-2.8.8/src/utils_reencrypt.c @@ -220,7 +220,7 @@ static int reencrypt_verify_and_update_p if (!params->hash && !ARG_SET(OPT_RESILIENCE_HASH_ID) && (!strcmp(params->resilience, "checksum") || !strcmp(params->resilience, "datashift-checksum"))) - params->hash = "sha256"; + params->hash = "sha512"; if (ARG_SET(OPT_RESILIENCE_HASH_ID)) params->hash = ARG_STR(OPT_RESILIENCE_HASH_ID); @@ -662,7 +662,7 @@ static int encrypt_luks2_init(struct cry .mode = CRYPT_REENCRYPT_ENCRYPT, .direction = data_shift < 0 ? CRYPT_REENCRYPT_BACKWARD : CRYPT_REENCRYPT_FORWARD, .resilience = ARG_STR(OPT_RESILIENCE_ID) ?: "checksum", - .hash = ARG_STR(OPT_RESILIENCE_HASH_ID) ?: "sha256", + .hash = ARG_STR(OPT_RESILIENCE_HASH_ID) ?: "sha512", .max_hotzone_size = ARG_UINT64(OPT_HOTZONE_SIZE_ID) / SECTOR_SIZE, .device_size = ARG_UINT64(OPT_DEVICE_SIZE_ID) / SECTOR_SIZE, .luks2 = &luks2_params, @@ -901,7 +901,7 @@ static int decrypt_luks2_datashift_init( .mode = CRYPT_REENCRYPT_DECRYPT, .direction = CRYPT_REENCRYPT_FORWARD, .resilience = "datashift-checksum", - .hash = ARG_STR(OPT_RESILIENCE_HASH_ID) ?: "sha256", + .hash = ARG_STR(OPT_RESILIENCE_HASH_ID) ?: "sha512", .device_size = ARG_UINT64(OPT_DEVICE_SIZE_ID) / SECTOR_SIZE, .max_hotzone_size = ARG_UINT64(OPT_HOTZONE_SIZE_ID) / SECTOR_SIZE, .flags = CRYPT_REENCRYPT_MOVE_FIRST_SEGMENT @@ -1030,7 +1030,7 @@ static int decrypt_luks2_init(struct cry .mode = CRYPT_REENCRYPT_DECRYPT, .direction = data_shift > 0 ? CRYPT_REENCRYPT_FORWARD : CRYPT_REENCRYPT_BACKWARD, .resilience = data_shift ? "datashift" : (ARG_STR(OPT_RESILIENCE_ID) ?: "checksum"), - .hash = ARG_STR(OPT_RESILIENCE_HASH_ID) ?: "sha256", + .hash = ARG_STR(OPT_RESILIENCE_HASH_ID) ?: "sha512", .data_shift = imaxabs(data_shift) / SECTOR_SIZE, .device_size = ARG_UINT64(OPT_DEVICE_SIZE_ID) / SECTOR_SIZE, .max_hotzone_size = ARG_UINT64(OPT_HOTZONE_SIZE_ID) / SECTOR_SIZE, @@ -1886,7 +1886,7 @@ static int reencrypt_luks2_init(struct c .mode = CRYPT_REENCRYPT_REENCRYPT, .direction = data_shift < 0 ? CRYPT_REENCRYPT_BACKWARD : CRYPT_REENCRYPT_FORWARD, .resilience = data_shift ? "datashift" : (ARG_STR(OPT_RESILIENCE_ID) ?: "checksum"), - .hash = ARG_STR(OPT_RESILIENCE_HASH_ID) ?: "sha256", + .hash = ARG_STR(OPT_RESILIENCE_HASH_ID) ?: "sha512", .data_shift = imaxabs(data_shift) / SECTOR_SIZE, .max_hotzone_size = ARG_UINT64(OPT_HOTZONE_SIZE_ID) / SECTOR_SIZE, .device_size = ARG_UINT64(OPT_DEVICE_SIZE_ID) / SECTOR_SIZE,
