Skip to contentSkip to conversation

SHA algorithm

DISCUSSION Mushki 1 participant 1 message Jan 27, 2012 Crypto API

lore
Share & tools
lore

Mushki

author
#0 lore raw

Hi,

I am trying to write a driver for HW accelerator for SHA1.
I have set the "shash_alg" structure properly. I am noticing the following sequence of call back function calls

- my init function gets called
- my update function gets called (with data and size)
- my finup function gets called (u8 *in_data, int in_data_size, u8 * out_data)

Typically I would expect messages to stop here, however I see second finup message with data size 20. Is this correct? What is it supposed to be used for?

The total size of actual data is size of data in update + size of data in first finup, so what is this extra 20 bytes?

Also do I need to define export and import functions. I haven't.

Your help is highly appreciated. Thanks,

Mushki.