* [dm-crypt] some explanations would be welcome
@ 2016-07-28 16:32 Pascal
2016-08-02 11:32 ` Lars Winterfeld
2016-08-03 2:52 ` David Christensen
0 siblings, 2 replies; 3+ messages in thread
From: Pascal @ 2016-07-28 16:32 UTC (permalink / raw)
To: dm-crypt
[-- Attachment #1: Type: text/plain, Size: 841 bytes --]
hi,
I've a large file (some Gb) that I want to encrypt without copying it, so I
do this :
# md5sum myfile
d2e539a1ff722e9f8f8f97605ca4ec1e -
# cryptsetup --type plain open myfile enc
Enter passphrase:
# dd bs=4M < myfile > /dev/mapper/enc
w+1 records in
w+1 records out
x bytes copied, y s, z MB/s
# md5sum < /dev/mapper/enc
d2e539a1ff722e9f8f8f97605ca4ec1e -
and all is ok for encryption.
now, I want to decrypt my encrypted file in the same way, so I do this :
# dd bs=4M < /dev/mapper/enc | md5sum
d2e539a1ff722e9f8f8f97605ca4ec1e -
it starts well but the result does not go as desired :
# dd bs=4M < /dev/mapper/enc > myfile
w+1 records in
w+1 records out
x bytes copied, y s, z MB/s
# md5sum myfile
120f0695aa0c2c0940f8a5a4c0bbd18f -
I tried increasing the bs (32M) but the result is the same :-(
what is my problem ?
regards.
[-- Attachment #2: Type: text/html, Size: 1435 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dm-crypt] some explanations would be welcome
2016-07-28 16:32 [dm-crypt] some explanations would be welcome Pascal
@ 2016-08-02 11:32 ` Lars Winterfeld
2016-08-03 2:52 ` David Christensen
1 sibling, 0 replies; 3+ messages in thread
From: Lars Winterfeld @ 2016-08-02 11:32 UTC (permalink / raw)
To: dm-crypt
Hi.
Try using the if= and of= arguments for dd. Does that make a difference?
Cheers.
Am 28.07.2016 um 18:32 schrieb Pascal:
> hi,
>
> I've a large file (some Gb) that I want to encrypt without copying it,
> so I do this :
>
> # md5sum myfile
> d2e539a1ff722e9f8f8f97605ca4ec1e -
> # cryptsetup --type plain open myfile enc
> Enter passphrase:
> # dd bs=4M < myfile > /dev/mapper/enc
> w+1 records in
> w+1 records out
> x bytes copied, y s, z MB/s
> # md5sum < /dev/mapper/enc
> d2e539a1ff722e9f8f8f97605ca4ec1e -
>
> and all is ok for encryption.
> now, I want to decrypt my encrypted file in the same way, so I do this :
>
> # dd bs=4M < /dev/mapper/enc | md5sum
> d2e539a1ff722e9f8f8f97605ca4ec1e -
>
> it starts well but the result does not go as desired :
>
> # dd bs=4M < /dev/mapper/enc > myfile
> w+1 records in
> w+1 records out
> x bytes copied, y s, z MB/s
> # md5sum myfile
> 120f0695aa0c2c0940f8a5a4c0bbd18f -
>
> I tried increasing the bs (32M) but the result is the same :-(
>
> what is my problem ?
>
> regards.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dm-crypt] some explanations would be welcome
2016-07-28 16:32 [dm-crypt] some explanations would be welcome Pascal
2016-08-02 11:32 ` Lars Winterfeld
@ 2016-08-03 2:52 ` David Christensen
1 sibling, 0 replies; 3+ messages in thread
From: David Christensen @ 2016-08-03 2:52 UTC (permalink / raw)
To: dm-crypt
On 07/28/2016 09:32 AM, Pascal wrote:
> I've a large file (some Gb) that I want to encrypt without copying it, so I
> do this :
>
> # md5sum myfile
> d2e539a1ff722e9f8f8f97605ca4ec1e -
> # cryptsetup --type plain open myfile enc
> Enter passphrase:
> # dd bs=4M < myfile > /dev/mapper/enc
> w+1 records in
> w+1 records out
> x bytes copied, y s, z MB/s
> # md5sum < /dev/mapper/enc
> d2e539a1ff722e9f8f8f97605ca4ec1e -
>
> and all is ok for encryption.
> now, I want to decrypt my encrypted file in the same way, so I do this :
>
> # dd bs=4M < /dev/mapper/enc | md5sum
> d2e539a1ff722e9f8f8f97605ca4ec1e -
>
> it starts well but the result does not go as desired :
>
> # dd bs=4M < /dev/mapper/enc > myfile
> w+1 records in
> w+1 records out
> x bytes copied, y s, z MB/s
> # md5sum myfile
> 120f0695aa0c2c0940f8a5a4c0bbd18f -
>
> I tried increasing the bs (32M) but the result is the same :-(
>
> what is my problem ?
Is that redacted console output? It would be better if you posted
complete and accurate console output.
What operating system (name, architecture, version, etc.) are you using?
Please provide a URL to the manual page for your cryptsetup.
David
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-03 4:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-28 16:32 [dm-crypt] some explanations would be welcome Pascal
2016-08-02 11:32 ` Lars Winterfeld
2016-08-03 2:52 ` David Christensen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.