[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <21904.1547655757@warthog.procyon.org.uk>
Date: Wed, 16 Jan 2019 16:22:37 +0000
From: David Howells <dhowells@...hat.com>
To: Vitaly Chikunov <vt@...linux.org>
Cc: dhowells@...hat.com, Herbert Xu <herbert@...dor.apana.org.au>,
davem@...emloft.net, keyrings@...r.kernel.org,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] akcipher: Introduce verify2 for public key algorithms
Vitaly Chikunov <vt@...linux.org> wrote:
> This will be hard to do since there is at least tree device that use
> this interface (and who know how much out of tree):
>
> drivers$ git grep cra_name.*rsa
> crypto/caam/caampkc.c: .cra_name = "rsa",
> crypto/ccp/ccp-crypto-rsa.c: .cra_name = "rsa",
> crypto/qat/qat_common/qat_asym_algs.c: .cra_name = "rsa",
>
> Interface seems to be designed that verify() call is interchangeable
> with encrypt().
>
> Two verify does not seem that bad since there is common code for the old
> interface that removes code duplication and simplifies driver
> implementation (RSA drivers only need to implement encrypt).
You could move the comparison into core crypto code if it's makes more sense
than moving the comparison to the crypto algorithm ->verify() call. It makes
more sense than the upper layers having to cover the differences between the
algo modules.
David
Powered by blists - more mailing lists