Re: [RFC PATCH 2/4] akcipher: Introduce verify2 for public key algorithms
From: David Howells
Date: Wed Jan 16 2019 - 11:19:16 EST
Vitaly Chikunov <vt@xxxxxxxxxxxx> wrote:
> Current akcipher .verify() just decrypts signature to uncover message
> hash, which is then verified in upper level public_key_verify_signature
> by memcmp with the expected signature value, which is never passed into
> verify().
I think it would be better to make ->verify() take the data hash we've been
given rather than returning the expected hash for the caller to compare. That
way the callers don't have to do two different things, depending on how the
crypto algo works.
David