From: Erlend Aasland <erlend-a@ux.his.no>
To: dean gaudet <dean-list-linux-kernel@arctic.org>
Cc: Matt Mackall <mpm@selenic.com>,
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: Sun, 5 Oct 2003 14:29:25 +0200 [thread overview]
Message-ID: <20031005122925.GA4183@badne3.ux.his.no> (raw)
In-Reply-To: <Pine.LNX.4.58.0310041127020.5954@twinlark.arctic.org>
Hi,
On 10/04/03 11:51, dean gaudet wrote:
> this CIFS patch alone replaces 89 lines with 250 lines of code!
... you forgot that if we find a nice way to use the CryptoAPI, we can
remove the old md4/md5 code: that makes 631 lines of code go away!
> the code does not look anywhere near as readable as the original. but perhaps
> that's just because i've dealt with the same trivial MD5Init/Update/Final
> API for years.
I agree that it could have been a bit more readable.
It is trivial to wrap the code that deals with the CryptoAPI into nice
"helper" functions. For example the cifs_do_hash() function does exactly
that. Putting scatterlist setup into one function will probably help a
lot on code readability and code size.
> i gather a lot of this comes from the desire to have run-time selectable
> sw and hw implementations of various algorithms for "optimal" performance.
> but there generally isn't an optimal algorithm for all situations.
> for small short digests like passwords it's probably more overhead to
> use the cryptoapi than is saved from any blindingly fast implementation
> behind the scenes.
True, I agree that it's perhaps a bit overkill. Anyway, this is just a
project for me to learn more about the kernel; it's not like I have a
burning desire to convert CIFS to use the CryptoAPI ;-)
Regards
Erlend
next prev parent reply other threads:[~2003-10-05 12:29 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 ` 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
2003-10-05 12:29 ` Erlend Aasland [this message]
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=20031005122925.GA4183@badne3.ux.his.no \
--to=erlend-a@ux.his.no \
--cc=dean-list-linux-kernel@arctic.org \
--cc=jmorris@intercode.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®