Bug 2227449

Summary: Impossible to use Swedish or unicode characters in cryptsetup passphrases
Product: [Fedora] Fedora Reporter: Stefan Midjich <swehack>
Component: anacondaAssignee: anaconda-maint
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 38CC: agk, anaconda-maint, gmazyland, okozina, vslavik, w
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stefan Midjich 2023-07-29 19:20:48 UTC
Description of problem: Until some Fedora release a few years ago I was able to set a cryptsetup passphrase with Swedish characters, and it worked! But at some point this has been broken and is still broken.


Version-Release number of selected component (if applicable):Not sure.


How reproducible:Yes


Steps to Reproduce:
1. Start fresh install.
2. Select to use English for the install.
3. Edit keyboard layouts.
4. Add Swedish as an additional keyboard layout.
5. Move Swedish up one step.
6. Go into disk management.
7. Select Encrypt my data
8. Set a passphrase with Swedish characters like åäö.
9. Finish install and reboot.
10. When entering the passphrase it always fails.

Actual results:
When entering the passphrase it always fails.

Expected results:
That the passphrase works.

Additional info:
I know the installer warns you that there is no way to switch layout but this has worked for many years. It stopped working sometime after F30 but I can't remember when. I never bothered to report it and just used an English passphrase instead.

But this makes passphrases less creative and easier to guess so it would be nice to have this feature. It is in fact an important security feature for a large part of the world.

I also remember that the cryptsetup screen used to show the current layout as "se", this icon is gone.

Comment 1 Milan Broz 2023-07-29 20:20:03 UTC
Well, cryptsetup supports any passphrase, even binary data. But cryptsetup is not the tool that displays password query/keyboard selection switch, it only gets output of this tool.

TBH, I have no idea who displays that query these days. I'll reassing this to anaconda, but perhaps it is not problem in installer. Anyway, installer should setup boot password query with proper locale input.