Hello,
Today, the talitos driver dma maps/unmaps context and keys at every
single request.
I'm looking at doing the dma mapping at hash init and doing unmapping at
final/finup/digest
However, I'm wondering how to manage hash exports and imports. I was
initially thinking about doing a dma_sync_for_cpu() before any export
and a dma_sync_for_device() after any export, but that supposes that the
dma area is already mapped, which means that we have done the init and
not yet done a final/finup/digest.
I'm a bit sceptic when reading the following text in include/crypto/hash.h :
@export: Export partial state of the transformation. This function dumps the
* entire state of the ongoing transformation into a provided block of
* data so it can be @import 'ed back later on. This is useful in case
* you want to save partial result of the transformation after
* processing certain amount of data and reload this partial result
* multiple times later on for multiple re-use
Does it mean that import may be called in lieu of hash init, or is hash
init always called before doing an import ?
Thanks
Christophe