All of lore.kernel.org
 help / color / mirror / Atom feed
* 2.6.0-test2+Util-linux/cryptoapi
@ 2003-07-31  3:45 Frank v Waveren
  2003-07-31  4:39 ` 2.6.0-test2+Util-linux/cryptoapi James Morris
  0 siblings, 1 reply; 10+ messages in thread
From: Frank v Waveren @ 2003-07-31  3:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andries.Brouwer, linux-crypto

I was giving 2.6.0-test2 a spin, and run into a few issues with
loopback crypto:

First of all, in util-linux 2.12 the keybits option is gone, and the
number of keybits is fixed to 256 (even though some algorithms in the
kernel support more). Is this a temporary thing or a design decision?

Moving to the slightly more ontopic stuff for lk@vger: Is access to
the cryptoapi algorithms exposed to userspace yet? I wanted to have
losetup/mount hash the passphrase before passing it to the kernel, and
it seems silly to actually put a separate hashing algorithm in
util-linux when they're there in the kernel anyway.

Thirdly, has the encryption setup changed again since 2.4.x with hvr's
testing cryptoapi stuff? I have a filesystem encrypted with 256 bits
serpent, yet it won't decrypt using 2.6.0-test2 and util-linux 2.12.

Lastly: Why the move from a /proc/crypto directory containing files
for all the algorithms to one monolithic /proc/crypto file? Isn't the
former a lot nicer from the userspace programmer's point of view?


-- 
Frank v Waveren                                      Fingerprint: 21A7 C7F3
fvw@[var.cx|stack.nl|chello.nl] ICQ#10074100            1FF3 47FF 545C CB53
Public key: hkp://wwwkeys.pgp.net/fvw@var.cx            7BD9 09C0 3AC1 6DF2

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: 2.6.0-test2+Util-linux/cryptoapi
@ 2003-07-31  9:41 Andries.Brouwer
  2003-08-01 18:45 ` 2.6.0-test2+Util-linux/cryptoapi Ben Slusky
  2003-08-13 14:42 ` 2.6.0-test2+Util-linux/cryptoapi Bill Davidsen
  0 siblings, 2 replies; 10+ messages in thread
From: Andries.Brouwer @ 2003-07-31  9:41 UTC (permalink / raw)
  To: fvw, linux-kernel; +Cc: Andries.Brouwer, linux-crypto

> First of all, in util-linux 2.12 the keybits option is gone
> I wanted to have losetup/mount hash the passphrase

The patches I got were maximal, too much junk.
So I went for a minimal version instead.

It is usable (when the kernel part is stable, which it isn't today)
but mount/losetup may well acquire a few options before it is
conveniently usable.

(I do not read crypto lists, and see only a very small fraction of
what passes by on lk, so if you want to influence util-linux
an explicit cc is a good idea.)

> has the encryption setup changed again since 2.4.x with hvr's
> testing cryptoapi stuff?

cryptoloop as it went in is essentially hvr's.

Andries

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: 2.6.0-test2+Util-linux/cryptoapi
@ 2003-08-01 21:00 Andries.Brouwer
  0 siblings, 0 replies; 10+ messages in thread
From: Andries.Brouwer @ 2003-08-01 21:00 UTC (permalink / raw)
  To: Andries.Brouwer, sluskyb; +Cc: fvw, linux-crypto, linux-kernel

    From: Ben Slusky <sluskyb@paranoiacs.org>

    > The patches I got were maximal, too much junk.
    > So I went for a minimal version instead.
    > 
    > It is usable (when the kernel part is stable, which it isn't today)
    > but mount/losetup may well acquire a few options before it is
    > conveniently usable.

    Can we discuss those options now? I find the latest losetup to be
    completely unusable, tho' I appreciate the effort that's gone into it
    so far.

    Firstly, are the other key size choices (128-bit, 192-bit) gone for
    good? If so then I'll need to redo this entire hard disk (which currently
    uses 128-bit AES) before I can test 2.6 on my laptop.

We need some discussion - there is no hurry.

Consider:
Crypto users are a small minority. On the other hand, every Linux user
needs mount. Also in emergency situations. Possibly from a rescue floppy.

Consider:
mount is suid root.

Both reasons imply that it is undesirable to add a lot of messy code
to mount, quite apart from maintainability.

If the messy code is in an external program of which the path name
is given as a -o option, then the correctness of the external program
is the invokers responsibility, and it doesnt take space on the rescue
floppies of non crypto users.

Consider:
Most people want to invoke losetup from mount. But we just concluded
that it is desirable to try and prevent bloating mount. Yes, it is
full of garbage already, but that is no reason to add even more.

You want key size choices. OK. I don't like to add another option
to mount. Probably all encryption stuff can be part of the -o encryption=
option. How is stuff coded? Well, everybody can invent some suitable
syntax. The one I like best wins. Proposals complete with (nice, readable)
code get bonus points.

    Secondly, there's the issue of passphrase hashing. I agree with the
    decision to cut it out of losetup, but where do we put it now? Andries
    has suggested an external program, but this isn't as simple as it sounds.
    To get this working would require a new way of reading the passphrase,
    since the hashed passphrase might contain a newline, or a null. Maybe
    change the semantics of the -p option, so that:

        losetup -e aes /dev/loop/10 /home/sluskyb/testloop

    will work when I give it the passphrase "foobar", but also

        pwhash -h sha1 | losetup -e aes -k 128 -p 0 /dev/loop/0 \
            /dev/discs/disc0/part3

    will read exactly 16 bytes of (probably) non-printable chars and use
    that as the key.

Sounds entirely reasonable. This is good for doing things "by hand".
But people also want to have crypto mounts described in /etc/fstab.
The option column there should contain all information needed to do
the losetup and mount.

I would be most happy if people on crypto lists would discuss details.
I do not think this belongs on linux-kernel.

Andries

[I see that this is cc-ed to linux-crypto@nl.linux.org - maybe that
is an appropriate list.]

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: 2.6.0-test2+Util-linux/cryptoapi
@ 2003-08-13 16:42 Andries.Brouwer
  0 siblings, 0 replies; 10+ messages in thread
From: Andries.Brouwer @ 2003-08-13 16:42 UTC (permalink / raw)
  To: Andries.Brouwer, davidsen; +Cc: fvw, linux-crypto, linux-kernel

> I hope we can get the control of key length back

Maybe you didnt see earlier mail about this.

Look: half a year ago there was nothing in vanilla kernel and
util-linux, and one had to use outside patches. Today there
is some support in vanilla kernel and util-linux, but nobody
stops you from continued use of outside patches.

In case you would prefer kernel and util-linux to improve,
don't say "I want improvements", but say very precisely
what syntax you would prefer and why.
Think first about things mounted from /etc/fstab.
Implementing stuff is trivial, but after things have been
implemented they won't be changed, so it is better to do
things right at once.

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

end of thread, other threads:[~2003-08-13 16:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-31  3:45 2.6.0-test2+Util-linux/cryptoapi Frank v Waveren
2003-07-31  4:39 ` 2.6.0-test2+Util-linux/cryptoapi James Morris
2003-07-31  5:04   ` 2.6.0-test2+Util-linux/cryptoapi Frank v Waveren
2003-07-31  5:20     ` 2.6.0-test2+Util-linux/cryptoapi James Morris
2003-07-31 16:37       ` 2.6.0-test2+Util-linux/cryptoapi Frank v Waveren
  -- strict thread matches above, loose matches on Subject: below --
2003-07-31  9:41 2.6.0-test2+Util-linux/cryptoapi Andries.Brouwer
2003-08-01 18:45 ` 2.6.0-test2+Util-linux/cryptoapi Ben Slusky
2003-08-13 14:42 ` 2.6.0-test2+Util-linux/cryptoapi Bill Davidsen
2003-08-01 21:00 2.6.0-test2+Util-linux/cryptoapi Andries.Brouwer
2003-08-13 16:42 2.6.0-test2+Util-linux/cryptoapi Andries.Brouwer

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.