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

David S. Miller
2003-08-11T05:02:03Z

On Mon, 11 Aug 2003 03:15:12 +0100
Jamie Lokier <jamie@shareable.org> wrote:

> Matt Mackall wrote:
> > > > Ok, can I export some more cryptoapi primitives?
>
> Why so complicated? Just move the "sha1_transform" function to its
> own file in lib, and call it from both drivers/char/random.c and
> crypto/sha1.c.

This is also broken.

The whole point of the 'tfm' the Crypto API makes you allocate is
that it provides all of the state and configuration information
needed to do the transforms.

There is no reason why random.c's usage of the crypto-API cannot be
done cleanly and efficiently such that it is both faster and resulting
in smaller code size than what random.c uses now. All of this _WITHOUT_
bypassing and compromising the well designed crypto API interfaces to these
transformations.