dm-crypt.saout.de archive mirror
 help / color / mirror / Atom feed
* [dm-crypt] inconsistent behavior btw a binary and library call when closing truecrypt volume made up of multiple algorithms
@ 2013-02-18  4:58 .. ink ..
  2013-02-19 11:37 ` Milan Broz
  0 siblings, 1 reply; 3+ messages in thread
From: .. ink .. @ 2013-02-18  4:58 UTC (permalink / raw)
  To: dm-crypt

[-- Attachment #1: Type: text/plain, Size: 867 bytes --]

test:

1. create a truecrypt volume using multiple algorithms,i went with
AES-twofist-serpent
2. open the volume using cryptsetup with "cryptsetup tcryptOpen ttt ttt"
3. ls -l /dev/mapper/ will give:

crw------- 1 root root 10, 236 Feb 17 22:37 /dev/mapper/control
lrwxrwxrwx 1 root root       7 Feb 17 23:45 /dev/mapper/ttt -> ../dm-2
lrwxrwxrwx 1 root root       7 Feb 17 23:45 /dev/mapper/ttt_1 -> ../dm-1
lrwxrwxrwx 1 root root       7 Feb 17 23:45 /dev/mapper/ttt_2 -> ../dm-0

It looks like 3 mapper will be created,each per algorithm.

closing the mapper with " cryptsetup tcryptClose ttt" will remove all three
mappers expected.

closing the mapper through the library "crypt_deactivate( NULL,"ttt" )"
will not remove all 3,just the "ttt" one.With the library call, all 3 seem
to require to be removed individually.

Is this behavior of the library expected?

[-- Attachment #2: Type: text/html, Size: 1023 bytes --]

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

* Re: [dm-crypt] inconsistent behavior btw a binary and library call when closing truecrypt volume made up of multiple algorithms
  2013-02-18  4:58 [dm-crypt] inconsistent behavior btw a binary and library call when closing truecrypt volume made up of multiple algorithms .. ink ..
@ 2013-02-19 11:37 ` Milan Broz
  2013-03-17 18:56   ` Milan Broz
  0 siblings, 1 reply; 3+ messages in thread
From: Milan Broz @ 2013-02-19 11:37 UTC (permalink / raw)
  To: .. ink ..; +Cc: dm-crypt

On 02/18/2013 05:58 AM, .. ink .. wrote:
> 
> test:
> 
> 1. create a truecrypt volume using multiple algorithms,i went with AES-twofist-serpent
> 2. open the volume using cryptsetup with "cryptsetup tcryptOpen ttt ttt"
> 3. ls -l /dev/mapper/ will give:
> 
> crw------- 1 root root 10, 236 Feb 17 22:37 /dev/mapper/control
> lrwxrwxrwx 1 root root       7 Feb 17 23:45 /dev/mapper/ttt -> ../dm-2
> lrwxrwxrwx 1 root root       7 Feb 17 23:45 /dev/mapper/ttt_1 -> ../dm-1
> lrwxrwxrwx 1 root root       7 Feb 17 23:45 /dev/mapper/ttt_2 -> ../dm-0
> 
> It looks like 3 mapper will be created,each per algorithm.
> 
> closing the mapper with " cryptsetup tcryptClose ttt" will remove all three mappers expected.
> 
> closing the mapper through the library "crypt_deactivate( NULL,"ttt"
> )" will not remove all 3,just the "ttt" one.With the library call,
> all 3 seem to require to be removed individually.> 
> Is this behavior of the library expected?

Kind of... if NULL is in context. If you use context (init_by_name) it should work.

Anyway, I filled (and added some comment)
http://code.google.com/p/cryptsetup/issues/detail?id=147
(also for other problems you reported - see issues 146,148)
will update it there once I have time to fix it.

Thanks,
Milan

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

* Re: [dm-crypt] inconsistent behavior btw a binary and library call when closing truecrypt volume made up of multiple algorithms
  2013-02-19 11:37 ` Milan Broz
@ 2013-03-17 18:56   ` Milan Broz
  0 siblings, 0 replies; 3+ messages in thread
From: Milan Broz @ 2013-03-17 18:56 UTC (permalink / raw)
  To: .. ink ..; +Cc: dm-crypt

On 19.2.2013 12:37, Milan Broz wrote:
> On 02/18/2013 05:58 AM, .. ink .. wrote:
>>
>> test:
>>
>> 1. create a truecrypt volume using multiple algorithms,i went with AES-twofist-serpent
>> 2. open the volume using cryptsetup with "cryptsetup tcryptOpen ttt ttt"
>> 3. ls -l /dev/mapper/ will give:
>>
>> crw------- 1 root root 10, 236 Feb 17 22:37 /dev/mapper/control
>> lrwxrwxrwx 1 root root       7 Feb 17 23:45 /dev/mapper/ttt -> ../dm-2
>> lrwxrwxrwx 1 root root       7 Feb 17 23:45 /dev/mapper/ttt_1 -> ../dm-1
>> lrwxrwxrwx 1 root root       7 Feb 17 23:45 /dev/mapper/ttt_2 -> ../dm-0
>>
>> It looks like 3 mapper will be created,each per algorithm.
>>
>> closing the mapper with " cryptsetup tcryptClose ttt" will remove all three mappers expected.
>>
>> closing the mapper through the library "crypt_deactivate( NULL,"ttt"
>> )" will not remove all 3,just the "ttt" one.With the library call,
>> all 3 seem to require to be removed individually.>
>> Is this behavior of the library expected?
>
> Kind of... if NULL is in context. If you use context (init_by_name) it should work.

Fixed in commit
http://code.google.com/p/cryptsetup/source/detail?r=f2521889c2315b8f2bd812a92fa37057fc382877#

Thanks,
Milan

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

end of thread, other threads:[~2013-03-17 18:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-18  4:58 [dm-crypt] inconsistent behavior btw a binary and library call when closing truecrypt volume made up of multiple algorithms .. ink ..
2013-02-19 11:37 ` Milan Broz
2013-03-17 18:56   ` Milan Broz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).