Re: [PATCH 3/6] crypto/realtek: hash algorithms

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

 



Am Freitag, dem 21.10.2022 um 18:50 +0800 schrieb Herbert Xu:
> > +       if (rtcr_check_fallback(areq))
> > +               return crypto_ahash_import(freq, fexp);
> > +
> > +       memcpy(hreq, hexp, sizeof(struct rtcr_ahash_req));
> > +
> > +       return 0;
> > +}
> 
> What happens when you import a fallback export but
> rtcr_check_fallback
> returns false?

Hi Herbert,

rtcr_ahash_export() will always generate a consistent state prior to
export because it calls rtcr_check_fallback() too. So the export state
will be one of the following:

- fallback active flag not set + normal state data 
- fallback active flag set + fallback state data

Thus said a fallback export will always have the fallback active flag
set. So rtcr_check_fallback() cannot return false in this case.

Best regards.

Markus




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