Skip to contentSkip to conversation

unlock via password and device

dm-crypt chiasa.men 2 participants 2 messages Nov 10, 2020

lore
Share & tools
lore

chiasa.men

author
#0 lore raw

For the purpose of full disc encryption the tutorials usually suggest to decrypt luks via usbkey.
The keyscript then often waits the key to appear for several seconds, after that they fall back to the password prompt.

If the key appears after the waiting time it is ignored.

Is there a way to "step back" after the password prompt appeared?

The current workaround is another process that loops for the key in the background, decrypts the disk and kills "askpass" several times (resulting in "wrong password" in the main process)

What would be a clean way to implement the wanted behavior?

As I understood, the keyscript has to print the key to stdout.

I would expect the following keyscript construct to work as well:

---
while luksNotOpened
if [ -e key ]
dd if=key
sleep 1
done &

askpass
---
The background process should still print to stdout and I guess askpass would do the same when enter is pressed?
However that does not work

#1 lore raw

What about killing cryptsetup before killing askpass?

Regards,
Arno

Quoted 37 lines · chiasa.men

For the purpose of full disc encryption the tutorials usually suggest to decrypt luks via usbkey.
The keyscript then often waits the key to appear for several seconds, after that they fall back to the password prompt.

If the key appears after the waiting time it is ignored.

Is there a way to "step back" after the password prompt appeared?

The current workaround is another process that loops for the key in the background, decrypts the disk and kills "askpass" several times (resulting in "wrong password" in the main process)

What would be a clean way to implement the wanted behavior?

As I understood, the keyscript has to print the key to stdout.

I would expect the following keyscript construct to work as well:

---
while luksNotOpened
if [ -e key ]
dd if=key
sleep 1
done &

askpass
---
The background process should still print to stdout and I guess askpass would do the same when enter is pressed?
However that does not work

_______________________________________________
dm-crypt mailing list
[email protected]
https://www.saout.de/mailman/listinfo/dm-crypt

Signature · 7 lines
Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: [email protected]
GnuPG: ID: CB5D9718  FP: 12D6 C03B 1B30 33BB 13CF  B774 E35C 5FA1 CB5D 9718
----
A good decision is based on knowledge and not on numbers. -- Plato

If it's in the news, don't worry about it.  The very definition of 
"news" is "something that hardly ever happens." -- Bruce Schneier