Vitaly Chikunov <vt@xxxxxxxxxxxx> 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