Re: Internal crypto test fail: changed 'req->iv'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 30 Dec 2019 at 11:10, Richard van Schagen <vschagen@xxxxxx> wrote:
>
> I am writing a module for the EIP93 crypto engine. From what I have
> been reading on this mailing list, the driver should return the updated
> IV in order for the caller to “resume” or “continue” with this IV in
> another call.
>
> A code-snippet:
>
> int ivsize = crypto_skcipher_ivsize(skcipher);
>
> If (ivsize)
>         memcpy(req->iv, rctx->lastiv, ivsize);
>
> Where rctx->lastiv was read from the hardware itself.
>
> The fail message I am getting is:
> [   57.290000] alg: skcipher: changed 'req->iv'
> [   57.370000] alg: skcipher: eip93-cbc-aes encryption co
> rrupted request struct on test vector 0, cfg="in-place"
> [   57.380000] alg: skcipher: changed 'req->iv'
> [   57.460000] alg: skcipher: eip93-ctr-aes encryption corrupted
> request struct on test vector 0, cfg="in-place"
> [   57.470000] alg: skcipher: changed 'req->iv'
> [   57.560000] alg: skcipher: eip93-rfc3686(ctr)-aes encryption
> corrupted request struct on test vector 0, cfg="in-place"
> [   57.570000] alg: skcipher: changed 'req->iv’
>
> Where/How should I return the new/updated IV ?
>

Are you sure you are not making req->iv point to a different buffer?




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux