Re: [RFC][PATCH] Make cryptoapi non-optional?

Jamie Lokier
2003-08-11T05:20:59Z

Matt Mackall wrote:
> On Mon, Aug 11, 2003 at 05:59:47AM +0100, Jamie Lokier wrote:
> > Matt Mackall wrote:
> > > And we're safe here. The default pool size is 1024 bits, of which we
> > > hash 512. I could hash even fewer, say, 480 (and this would deal with the
> > > cryptoapi padding stuff nicely).
> >
> > Where is the pool size set to 1024 bits? I'm reading 2.5.75, and it
> > looks to me like the hash is over the whole pool, of 512 bits for the
> > primary and 128 bits for the secondary pool:
> >
> > for (i = 0, x = 0; i < r->poolinfo.poolwords; i += 16, x+=2) {
> ^^^^
>
> Unfortunately, there's an ugly mix of words, bytes, and bits here (and it
> was actually broken for years because of it). The input pool is 4kbits
> and the output pools are 1k.

You're right about the sizes. But you said it hashes only half of the
pool. Where is that?

-- Jamie