RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1740210 - Anaconda kickstart LUKS no option to set key size / incorrect documentation
Summary: Anaconda kickstart LUKS no option to set key size / incorrect documentation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: python-blivet
Version: 8.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 8.2
Assignee: Vojtech Trefny
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-12 13:28 UTC by Jan Stodola
Modified: 2021-09-06 15:31 UTC (History)
3 users (show)

Fixed In Version: python-blivet-3.2.2-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1716674
Environment:
Last Closed: 2020-11-04 03:22:23 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Stodola 2019-08-12 13:28:29 UTC
+++ This bug was initially created as a clone of Bug #1716674 +++

Description of problem:
There is no option with kickstart to set the key size for a LUKS volume. Only when no "--cipher" option is set the key size defaults to 512 bits, otherwise the default LUKS option is used. Making it impossible to use 512 bits with any cipher other than aes-xts-plain64.

Furthermore the documentation about this is incomplete/incorrect.
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/sec-encryption#sec-Using_LUKS_Disk_Encryption
Says: "The default key size for LUKS is 256 bits. The default key size for LUKS with Anaconda (XTS mode) is 512 bits."
However, when the "--cipher" option is set the key size fals back to the LUKS default. So for example when using serpent (XTS mode) the key size is 256 bits.

How reproducible:
Use a kickstart file to install RHEL and check the partition afterwards with cryptsetup luksDump

Steps to Reproduce:
part ... --encrypted --passphrase=temppass
part ... --encrypted --passphrase=temppass --cipher=aes-xts-plain64
part ... --encrypted --passphrase=temppass --cipher=serpent-xts-plain64
part ... --encrypted --passphrase=temppass --key-size=512
part ... --encrypted --passphrase=temppass --key-size=512 --cipher=serpent-xts-plain64

Expected results:
master key size: 512
master key size: 512
master key size: 512
master key size: 512
master key size: 512

Actual results:
master key size: 512
master key size: 256
master key size: 256
master key size: N/A
master key size: N/A

Additional info:
To make the documentation sound:
https://github.com/storaged-project/blivet/blob/rhel7-branch/blivet/formats/luks.py
This:
        if not self.exists and not self.cipher:
            self.cipher = "aes-xts-plain64"
            if not self.key_size:
                # default to the max (512 bits) for aes-xts
                self.key_size = 512
Should be changed to something like this:
        if not self.exists
            if not self.cipher:
                self.cipher = "aes-xts-plain64"
            if not self.key_size and "xts" in self.cipher:
                # default to the max (512 bits) fot xts
                self.key_size = 512

Comment 1 Vojtech Trefny 2019-09-05 07:15:13 UTC
Upstream PR: https://github.com/storaged-project/blivet/pull/800

Comment 10 errata-xmlrpc 2020-11-04 03:22:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (python-blivet bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4728


Note You need to log in before you can comment on or make changes to this bug.