public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bill Davidsen <davidsen@tmr.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] /dev/crypto for Linux
Date: Wed, 25 Aug 2004 17:28:00 -0400	[thread overview]
Message-ID: <cgivru$306$1@gatekeeper.tmr.com> (raw)
In-Reply-To: <Xine.LNX.4.44.0408251025120.25396-100000@thoron.boston.redhat.com>

James Morris wrote:
> On Tue, 24 Aug 2004, Michal Ludvig wrote:
> 
> 
>>How does it work?
>>- - Process opens /dev/crypto and with a set of ioctl() commands does what
>>it wants to. I.e. obtains a crypto session, does the {enc,dec}ryption
>>and finally closes the session. The sessions are bound to "struct file"
>>of the open /dev/crypto and thus are automatically removed even if the
>>process dies unexpectedly.
> 
> 
> I don't think this is the way forward for the user crypto API.  Rather 
> than using the openbsd device as a starting point, we need to look at what 
> is the best for Linux and work from there.
> 
> In any case, the openbsd device is the wrong model.  An ioctl() based 
> interface is just a set of backdoor syscalls, but with weak semantics, and 
> a potential maintenance nightmare.
> 
> At this stage, the only real use for the device is to make it easier to 
> test and benchmark the crypto modules, and I'm not sure if this is enough 
> justification for integration with the kernel at this stage.  Currently, 
> the tcrypt module provides a convienient way to test modules on whatever 
> architecture you can boot a kernel on, without the need for external 
> userspace packages.  It also tests some specific scatterlist cases.  So, 
> your crypto dev would not likely be considered a full replacement for 
> tcrypt at this stage.

The use of this would be to provide some access to crypto for portable 
programs which might be usefully run on systems which have not installed 
the big libs needed for usermode crypto. And it also addresses the 
reality that many people update their kernel more often than their libs, 
and new methods are more likely to be available there. For a low-volume 
task like encoding a key or other small chunk of data it might be that 
the overhead of the system call would be no more than the memory 
footprint of loading a lib to do a single operation.

And every time I see a new method in the kernel, I wonder why it's there 
is users can't access it?

Don't take this as a stand to include this, I'm just being devil's 
advocate and bringing up the benefits since multiple people are bringing 
up the drawbacks. If this was actually going to happen it *might* be 
done with a totally different interface and happen in a kernel thread or 
some such. One feature of MULTICS we don't have is the ability to 
execute kernel code in user mode, sort of like a shared library.

-- 
    -bill davidsen (davidsen@tmr.com)
"The secret to procrastination is to put things off until the
  last possible moment - but no longer"  -me

      reply	other threads:[~2004-08-25 21:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-24 21:37 [PATCH] /dev/crypto for Linux Michal Ludvig
     [not found] ` <20040824215351.GA9272@halcrow.us>
2004-08-25  7:37   ` Michal Ludvig
2004-08-25 14:17     ` Jeff Garzik
2004-08-25 14:41       ` Michal Ludvig
2004-08-25 14:26 ` Christoph Hellwig
2004-08-25 15:44   ` Michal Ludvig
2004-08-25 14:42 ` Christoph Hellwig
2004-08-25 14:44 ` James Morris
2004-08-25 21:28   ` Bill Davidsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='cgivru$306$1@gatekeeper.tmr.com' \
    --to=davidsen@tmr.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox