public inbox for dm-crypt@saout.de
 help / color / mirror / Atom feed
* [dm-crypt] unlock via password and device
@ 2020-11-10  9:04 chiasa.men
  2020-11-10 17:34 ` Arno Wagner
  0 siblings, 1 reply; 2+ messages in thread
From: chiasa.men @ 2020-11-10  9:04 UTC (permalink / raw)
  To: dm-crypt

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-10 17:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-10  9:04 [dm-crypt] unlock via password and device chiasa.men
2020-11-10 17:34 ` Arno Wagner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox