aead_alg request size (request context size)
How can I make aead transformations on the new API allocate some context space inside the aead_request?
Description/comments of aead_alg->init() and crypto_alg->cra_init() suggest that they are triggered after the tfm object has already been allocated, so setting crypto_aead->reqsize has no effect.
Also, it seems that if aead_alg->init() is triggered, but crypto_alg->cra_init() is not. I see a call to alg->cra_init() from crypto_create_tfm, when allocating an aead transformation, but my cra_init() is not actually called. Instead aead_alg->init() is not seen anywhere, but indeed it is triggered at some time. Where does it get called?
Am Montag, 24. August 2015, 15:52:49 schrieb Vasile Catalin-B50542:
Hi Vasile,
Quoted 7 lines
How can I make aead transformations on the new API allocate some context space inside
theaead_request?
Description/comments ofaead_alg->init()andcrypto_alg->cra_init()suggest that they are
triggered after the tfm object has already been allocated, so settingcrypto_aead->reqsize
Quoted 8 lines
has no effect.
Also, it seems that ifaead_alg->init()is triggered, butcrypto_alg->cra_init()is not.
I see a call toalg->cra_init()fromcrypto_create_tfm, when allocating an aead transformation,
but mycra_init()is not actually called. Insteadaead_alg->init()is not seen anywhere, but
indeed it is triggered at some time. Where does it get called?
Please consider that the tfm is the wrapper around the key and the cipher mechanism. This one does not maintain any state of a cipher.
The state of the cipher (including any memory needed for a cipher) is kept in the aead_request data structure. That data structure is created by the calling user separately from the tfm.
Quoted 5 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Ciao
Stephan