Re: [RFC PATCH 03/24] crypto: Add 'krb5enc' hash and cipher AEAD algorithm

From: David Howells
Date: Mon Jan 20 2025 - 09:25:42 EST


Simon Horman <horms@xxxxxxxxxx> wrote:

> > +static void krb5enc_decrypt_hash_done(void *data, int err)
> > +{
> > + struct aead_request *req = data;
> > +
> > + if (err)
> > + return krb5enc_request_complete(req, err);
> > +
> > + err = krb5enc_verify_hash(req, 0);
>
> Hi David,
>
> Sparse complains that the second argument to krb5enc_verify_hash should be
> a pointer rather than an integer. So perhaps this would be slightly better
> expressed as (completely untested!):
>
> err = krb5enc_verify_hash(req, NULL);

Actually, no. It should be "ahreq->result + authsize" and
krb5enc_verify_hash() shouldn't calculate ihash, but use its hash parameter.

I wonder if the testmgr driver tests running the algorithms asynchronously...

Thanks,
David