From: Matt Mackall <mpm@selenic.com>
To: Fruhwirth Clemens <clemens-dated-1107431870.41eb@endorphin.org>
Cc: akpm@osdl.org, jmorris@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 04/04] Add LRW
Date: Sat, 29 Jan 2005 16:02:21 -0800 [thread overview]
Message-ID: <20050130000221.GA2955@waste.org> (raw)
In-Reply-To: <20050124115750.GA21883@ghanima.endorphin.org>
On Mon, Jan 24, 2005 at 12:57:50PM +0100, Fruhwirth Clemens wrote:
> This is the core of my LRW patch. Added test vectors.
> http://grouper.ieee.org/groups/1619/email/pdf00017.pdf
Please include a URL for the standard at the top of the LRW code and
next to the test vectors. I had to search around a fair bit for decent
background material, would be helpful to a couple other references as
well.
> +static inline void findAlignment(u128 callersN, int value, int *align) {
> + int i;
Your gfmulseq code has lots of StudlyCaps and strange whitespace, eg
this '{' should be on the next line.
> + /* Copy N, so lsr does not destroy caller's copy */
> + u128_alloc(N);
> + copy128(N,callersN);
The usage of your u128 type is really confusing, so 'u128' is an
especially bad name. I expect u128 to work like u64 and u32. I propose
gf128_t.
> + int i; // Outer control loop counter
C++ comments.
> +#define min(a,b) (a)<(b)?(a):(b)
Have a very nice one of those already.
> +#ifdef DEBUG
> + printf("negative step at:");
> + print128(currentN);
> +#endif
Better to use printk and put #define printk printf in your userspace
test harness.
> +typedef u64 *u128;
> +typedef u64 *u128_t;
Did I mention confusing?
> +#define u128_alloc(VAR) u64 _ ## VAR ## _[2]; u128 VAR = _ ## VAR ## _
Wrap this in a struct, please. That's disgusting.
> -obj-$(CONFIG_CRYPTO) += api.o scatterwalk.o cipher.o digest.o compress.o \
> +obj-$(CONFIG_CRYPTO) += api.o scatterwalk.o cipher.o digest.o compress.o lrw.o gfmulseq.o \
LRW and the GF(2**128) code is not configurable?
--
Mathematics is the supreme nostalgia of our time.
next prev parent reply other threads:[~2005-01-30 0:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-24 11:57 [PATCH 04/04] Add LRW Fruhwirth Clemens
2005-01-30 0:02 ` Matt Mackall [this message]
2005-01-30 11:49 ` Fruhwirth Clemens
2005-01-30 17:25 ` Matt Mackall
2005-01-31 15:47 ` James Morris
2005-01-30 12:26 ` James Morris
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=20050130000221.GA2955@waste.org \
--to=mpm@selenic.com \
--cc=akpm@osdl.org \
--cc=clemens-dated-1107431870.41eb@endorphin.org \
--cc=jmorris@redhat.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