Hi Herbert et al,
attached are two patches where each patch has a different approach to copy the
AAD in the algif_aead operation. I would like to hear your opinion which
approach should be taken.
The patch 0001-crypto-algif_aead-copy-AAD-from-src-to-dst_separate.patch
simply copies the AAD over from TX SGL to RX SGL. The pro is that the patch is
small. The con is that this approach does *not* provide an in-place crypto
operation.
The patch 0001-crypto-algif_aead-copy-AAD-from-src-to-dst_inplace.patch copies
the AAD and the PT/CT from TX SGL into the RX SGL. In addition, this patch
chains the SGL with the tag value part present in the TX SGL to the RX SGL in
case of decryption. This implies that we have an in-place cipher operation
operating in the RX SGL. Though, the patch is significantly larger.
(note: the patches are NOT meant for inclusion, but only for discussion -- yet
both code parts are fully tested with by test framework in libkcapi).
Ciao
Stephan