Re: hash finup() issue

2011-01-26 Thread Herbert Xu
On Thu, Jan 27, 2011 at 08:47:40AM +0200, Dmitry Kasatkin wrote: > No.no.. That is not a flag for particular request... > The flag is how total hash will be handled... > > FINUP flag means that client will call finup(). > So it will be > > update() > update() > ... > update() > finup() > > > no

Re: hash finup() issue

2011-01-26 Thread Dmitry Kasatkin
No.no.. That is not a flag for particular request... The flag is how total hash will be handled... FINUP flag means that client will call finup(). So it will be update() update() ... update() finup() not update() ... update() final()... In other words... update() means that it will be more dat

Re: hash finup() issue

2011-01-26 Thread Herbert Xu
On Wed, Jan 26, 2011 at 09:47:27AM +0200, Dmitry Kasatkin wrote: > I am not talking about user space API at all. > > I talk about kernel crypto API and kernel clients. > > Please understand the following: when update() is called driver does not > know if it is last update or not... > That is esse

Re: hash finup() issue

2011-01-25 Thread Dmitry Kasatkin
I am not talking about user space API at all. I talk about kernel crypto API and kernel clients. Please understand the following: when update() is called driver does not know if it is last update or not... That is essential. If client code would always use update/finup then it is fine.. But origi

Re: hash finup() issue

2011-01-25 Thread Herbert Xu
On Tue, Jan 25, 2011 at 03:44:47PM +0200, Dmitry Kasatkin wrote: > > What we have done in our system is introduced a new flag which is set to > request. > flags |= CRYPTO_TFM_REQ_USE_FINUP; > ahash_request_set_callback(req, flags, tcrypt_complete, &tresult); We don't need a flag for this, we just

hash finup() issue

2011-01-25 Thread Dmitry Kasatkin
Hello, It is often very important to know for implementation or optimization if we get more data to process or not. New user space crypto API uses socket MSG_MORE flag to know if more data is coming. >From kernel crypto API it is also may be very important to know if more data is coming. OMAP S