DM-Crypt Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] cryptsetup with Python subprocess + pipes
@ 2016-06-23 21:37 Police Terror
  2016-06-24  5:42 ` [dm-crypt] cryptsetup with Python subprocess + pipes (saout: to exclusive) Diagon
  2016-06-24  5:42 ` [dm-crypt] cryptsetup with Python subprocess + pipes Milan Broz
  0 siblings, 2 replies; 15+ messages in thread
From: Police Terror @ 2016-06-23 21:37 UTC (permalink / raw)
  To: dm-crypt

Hello,

I'm trying to make a plausible deniability encryption wrapper around
cryptsetup.

Basically it uses a hash table to first lookup an offset (encrypted with
the password), then uses that offset to load a hidden volume within a
contiguous file (within which other volumes may or may not exist).

The theory is solid, and everything is mostly working. The only problem
I'm having is doing the communication in Python:

    # Format the volume
    pipe = subprocess.Popen(["cryptsetup", "luksFormat", loop_device],
                            stdout=subprocess.PIPE,
                            stdin=subprocess.PIPE)
    out = pipe.communicate(input=b"YES\n" + password)
    if pipe.returncode:
        error("Problem formatting volume.")
        return pipe.returncode

For some reason, this does not give any output! But the volume gets
created, but I cannot decrypt it with the password.

I don't want to save the password to disk, so I cannot use --key-file.

For some reason, this works with other commands, just not cryptsetup. I
think it is suppressing output and stopping me doing this. Why?

Any help?

Thanks.

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

end of thread, other threads:[~2016-06-29 17:28 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-23 21:37 [dm-crypt] cryptsetup with Python subprocess + pipes Police Terror
2016-06-24  5:42 ` [dm-crypt] cryptsetup with Python subprocess + pipes (saout: to exclusive) Diagon
2016-06-24  9:58   ` Police Terror
2016-06-24  5:42 ` [dm-crypt] cryptsetup with Python subprocess + pipes Milan Broz
2016-06-24  9:56   ` Police Terror
2016-06-24 10:45     ` Milan Broz
2016-06-24 12:16       ` Police Terror
2016-06-24 15:28         ` Arno Wagner
2016-06-24 16:33           ` Police Terror
2016-06-24 16:58             ` Arno Wagner
2016-06-29  0:02               ` Arno Wagner
2016-06-29  8:47                 ` Police Terror
2016-06-29  9:58                   ` Arno Wagner
2016-06-29 11:47                     ` Police Terror
2016-06-29 17:28                       ` Arno Wagner

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