All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Mackall <mpm@selenic.com>
To: dean gaudet <dean-list-linux-kernel@arctic.org>
Cc: Erlend Aasland <erlend-a@ux.his.no>,
	Steven French <sfrench@us.ibm.com>,
	James Morris <jmorris@intercode.com.au>,
	Samba Technical Mailing List <samba-technical@samba.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH CIFS] use CryptoAPI MD4/MD5
Date: Sat, 4 Oct 2003 19:08:57 -0500	[thread overview]
Message-ID: <20031005000857.GE13573@waste.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0310041127020.5954@twinlark.arctic.org>

On Sat, Oct 04, 2003 at 11:51:57AM -0700, dean gaudet wrote:
> On Sat, 4 Oct 2003, Matt Mackall wrote:
> 
> > On Sat, Oct 04, 2003 at 11:00:01AM -0700, dean gaudet wrote:
> > > what about CryptoAPI is so expensive that you can't use a stack-based
> > > context?
> >
> > The alloc functions hide a bunch of module lookup details and the size
> > of the context structures vary from one alg to the next. They also
> > tend to hide block-sized buffers to deal with fragments. So it's a
> > little ugly but not insurmountable.
> 
> by "block-sized" you mean like 64 bytes for MD5 and SHA1, 16 bytes for
> AES, and so forth?  if so that's no biggie, those are already present
> in most simple library implementations of these algos.  but if "block"
> means 4096 bytes then, aiee.

Cipher-block-sized.
 
> if module lookup is expensive then perhaps a much better api would be one
> which yields a module handle -- and the module handle can be used in a
> much less expensive allocator to create contexts where they're required.
> it seems that the module handle could be a read-only structure and
> therefore shared without locking.

Indeed, I've proposed such an interface. 

> this CIFS patch alone replaces 89 lines with 250 lines of code!

My experience is that aside from the context allocation/locking
issues, the thing is otherwise pretty painless to work with.

-- 
Matt Mackall : http://www.selenic.com : of or relating to the moon

  parent reply	other threads:[~2003-10-05  0:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <OF9C1504BB.5FB00D5A-ON87256DB3.0015672E-86256DB3.001798AE@us.ibm.com>
2003-10-02 11:37 ` [PATCH CIFS] use CryptoAPI MD4/MD5 Erlend Aasland
2003-10-04 18:00   ` dean gaudet
2003-10-04 18:24     ` Matt Mackall
2003-10-04 18:51       ` dean gaudet
2003-10-04 20:08         ` Francois Romieu
2003-10-05  0:08         ` Matt Mackall [this message]
2003-10-05 12:29         ` Erlend Aasland
2003-09-02 20:30 [RFC][PATCH] 2nd try to convert cifs to use CryptoAPI Erlend Aasland
2003-10-01 13:30 ` [PATCH CIFS] use CryptoAPI MD4/MD5 Erlend Aasland
2003-10-01 19:55   ` Matt Mackall
2003-10-01 23:26     ` Erlend Aasland
2003-10-01 23:42       ` Matt Mackall
2003-10-01 23:52         ` Erlend Aasland

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=20031005000857.GE13573@waste.org \
    --to=mpm@selenic.com \
    --cc=dean-list-linux-kernel@arctic.org \
    --cc=erlend-a@ux.his.no \
    --cc=jmorris@intercode.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=samba-technical@samba.org \
    --cc=sfrench@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 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.