public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Ludvig <mludvig@suse.cz>
To: Michael Halcrow <mahalcro@us.ibm.com>
Cc: CryptoAPI List <cryptoapi@lists.logix.cz>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] /dev/crypto for Linux
Date: Wed, 25 Aug 2004 09:37:32 +0200	[thread overview]
Message-ID: <412C41BC.8020607@suse.cz> (raw)
In-Reply-To: <20040824215351.GA9272@halcrow.us>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Halcrow told me that:
> On Tue, Aug 24, 2004 at 11:37:27PM +0200, Michal Ludvig wrote:
>
>>attached is a driver for OpenBSD-like /dev/crypto device (aka
>>CryptoDev) that makes a way for userspace processes to access
>>ciphers provided by in-kernel CryptoAPI modules.
>
> Cool!  Now if I'm interpreting this right, this is only good for
> working on up to one page worth of data at a time, right?

Of course the userspace can request encrypting any amount of data (well,
multiple of blocksize), but only at most one page at a time is copied
into the kernel, encrypted and returned back to the process' memory.

IMHO It is faster than allocating e.g. 4 MB in the kernel, copying all
of this from userspace, encrypting and returning back. That wouldn't use
the CPU cache too efficiently.

> In cryptfs, I have written some functions that essentially do what
> your FILL_SG() macro does, only it spreads across multiple sg's, if
> necessary.  Do you think this might be appropriate for /dev/crypto?

As I'm currently working only on one kernel page at a time I think
FILL_SG() is sufficient. But I'm definitely interested how to use
multiple sg's at once (although I don't immediately ned it). Where can I
see these functions? Maybe thay could go to some library directly in
linux/crypto/...?

Michal Ludvig
- --
SUSE Labs                    mludvig@suse.cz
(+420) 296.542.396        http://www.suse.cz
Personal homepage http://www.logix.cz/michal
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFBLEGhDDolCcRbIhgRApPrAJ9ghoyWXhxnk+wUQL9evde3o5uDqgCfdde8
OsMo/MlzKifupt1+pbNovYk=
=yKGK
-----END PGP SIGNATURE-----

  parent reply	other threads:[~2004-08-25  7:37 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 [this message]
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

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=412C41BC.8020607@suse.cz \
    --to=mludvig@suse.cz \
    --cc=cryptoapi@lists.logix.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mahalcro@us.ibm.com \
    /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