Re: [PATCH] libceph: Use HMAC-SHA256 library instead of crypto_shash

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

 



On Thu, Sep 04, 2025 at 12:24:08PM +0200, Ilya Dryomov wrote:
> > -       if (con->v2.hmac_tfm) {
> > -               crypto_free_shash(con->v2.hmac_tfm);
> > -               con->v2.hmac_tfm = NULL;
> > -       }
> > +       memzero_explicit(&con->v2.hmac_key, sizeof(con->v2.hmac_key));
> > +       con->v2.hmac_key_set = false;
> 
> Hi Eric,
> 
> Since we have hmac_key_set anyway, could the call to memzero_explicit()
> be conditioned on it?

If you want.  It's less code to just do it unconditionally.

- Eric




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