You are not logged in.

#1 2023-09-27 22:17:27

Enum
Member
Registered: 2023-09-27
Posts: 4

[SOLVED] LUKS: "No key with this passphrase" for a valid passphrase

Lately I have been getting passphrase not found errors randomly on my encrypted drive /dev/nvme0n1p3.

I decided to backup all relevant data, wipe the entire drive and tried reinstalling arch from scratch with full disk encryption using LUKS:
1. # cryptsetup -y -v luksFormat /dev/nvme0n1p3
2. # cryptsetup open /dev/nvme0n1p3 cryptroot

This is the approach recommended by https://wiki.archlinux.org/title/dm-cry … _partition.
However I get a passphrase not found error when trying to open the partition in step 2, no matter what passphrase i decide on during step 1.
Hard to tell whether this is an issue with arch, dm-crypt or an issue with the nvme drive itself. Does anyone have any clues on what it could be?

Last edited by Enum (2023-09-29 21:23:25)

Offline

#2 2023-09-28 00:43:31

mpan
Member
Registered: 2012-08-01
Posts: 1,600
Website

Re: [SOLVED] LUKS: "No key with this passphrase" for a valid passphrase

Please do not paraphrase messages. Post the actual error you are receiving.

Also include:

  • The complete output of step 1.

  • sudo cryptsetup luksDump /dev/devicename

Last edited by mpan (2023-09-28 00:47:30)


Paperclips in avatars? | Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#3 2023-09-28 01:26:16

Enum
Member
Registered: 2023-09-27
Posts: 4

Re: [SOLVED] LUKS: "No key with this passphrase" for a valid passphrase

Error is:

No key with this passphrase.

Output step 1:

root@archiso~ # cryptsetup -y -v luksFormat /dev/nvme0n1p3
WARNING!
This will overwrite data on /dev/nvme@n1p3 irrevocably.
Are you sure? (Type 'yes' in capital letters): YES
Enter passphrase for /dev/nvme0n1p3:
Verify passphrase:
Key slot 0 created.
Command successful.
cryptsetup -y -v luksFormat /dev/nvme0n1p3 18.23s user 0.31s system 119% cpu 15.572 total

luksDump:

root@archiso" # cryptsetup luksDump /dev/nvme0n1p3
LUKS header information
Version: 2
Epoch: 3
Metadata area: 16384 [bytes]
Keyslots area: 16744448 [bytes]
UUID: 16cb9ed4-9d71-4292-96fa-0fd915bb3dbd
Label: (no label)
Subsystem: (no subsystem)
Flags: (no flags)

Data segments:
0: crypt
	offset: 16777216 [bytes]
	length: (whole device)
	cipher: aes-xts-plain64
	sector: 512 [bytes]

Keyslots:
  0: luks2
		Key: 512 bits
		Priority: normal
		Cipher: aes-xts-plain64
		Cipher key: 512 bits
		PBKDF: argon2id
		Time cost: 15
		Memory: 1048576
		Threads: 4
		Salt: 1b cd 02 b1 77 24 be 6d f5 54 5b 06 50 3a fe 43 6d 04 a4 78 d1 50 ad 87 5b 12 5e d9 43 8e 2e 79
		AF stripes: 4000
		AF hash: sha256
		Area offset:32768 [bytes]
		Area length:258048 [bytes] Digest ID: 0
		Iterations: 463971

Tokens:
Digests:
	0: pbkdf2
		Hash: sha256
		Salt: Od 1d fb 2c dd 9b 2d 97 fc da 21 d5 2a бe 18 87 5d a0 bf Of f3 b4 dc b7 60 32 74 59 46 5a 28 22
		Digest: 1a 46 00 35 03 fa ea 97 bc 52 c8 54 cc b0 76 31 c1 6e 9c be 1d 03 2d a5 b0 95 4b 3a 55 f3 58 9b

Offline

#4 2023-09-28 05:36:40

frostschutz
Member
Registered: 2013-11-15
Posts: 1,647

Re: [SOLVED] LUKS: "No key with this passphrase" for a valid passphrase

luks2 / argon2id is sensitive to bad memory... run a memtest

Offline

#5 2023-09-28 16:30:09

Enum
Member
Registered: 2023-09-27
Posts: 4

Re: [SOLVED] LUKS: "No key with this passphrase" for a valid passphrase

Right on.
Replacing argon2id with pbkdf2 solved the issue:

cryptsetup luksFormat --type luks2 --cipher aes-xts-plain64 --key-size 512 --hash sha256 --iter-time 5000 --pbkdf pbkdf2 /dev/nvme0n1p3

Since I have no clue how to run a memtest, I`ll leave it at that.

Offline

#6 2023-09-28 16:54:48

frostschutz
Member
Registered: 2013-11-15
Posts: 1,647

Re: [SOLVED] LUKS: "No key with this passphrase" for a valid passphrase

Up to you, however if you have bad ram, then all your programs and storage will likely suffer data corruption.

You can run `memtester` in userspace (as root) or boot `memtest86+` which you can simply install. Many LiveCDs also provide this in their boot menus.

You can also add memtest=17 kernel parameter for the kernel itself to run a simplistic memtest on boot, check dmesg for results. (early_memtest: and following messages)

Last edited by frostschutz (2023-09-28 17:15:05)

Offline

#7 2023-09-29 19:09:25

Enum
Member
Registered: 2023-09-27
Posts: 4

Re: [SOLVED] LUKS: "No key with this passphrase" for a valid passphrase

Yea I opened up my case and saw that the ram stick on DIMM4 somehow popped halfway out of its slot.
Memtester returned no errors after some reseating.
Thanks for the help.

Offline

#8 2023-09-29 20:26:24

mpan
Member
Registered: 2012-08-01
Posts: 1,600
Website

Re: [SOLVED] LUKS: "No key with this passphrase" for a valid passphrase

May I ask for changing the topic to include the actual message? It will help others to find the topic. Thanks! Also remember to mark with [SOLVED].

E.g. “[SOLVED] LUKS: "No key with this passphrase" for a valid passphrase”.


Paperclips in avatars? | Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

Board footer

Powered by FluxBB