• Horia Geantă's avatar
    crypto: caam - update IV using HW support · 334d37c9
    Horia Geantă authored
    Modify drivers to perform skcipher IV update using the crypto engine,
    instead of performing the operation in SW.
    
    Besides being more efficient, this also fixes IV update for CTR mode.
    
    Output HW S/G table is appended with an entry pointing to the same
    IV buffer used as input (which is now mapped BIDIRECTIONAL).
    
    AS (Algorithm State) parameter of the OPERATION command is changed
    from INIFINAL to INIT in descriptors used by ctr(aes), cbc(aes).
    This is needed since in case FINAL bit is set, HW skips IV updating
    in the Context Register for the last data block.
    Signed-off-by: default avatarHoria Geantă <horia.geanta@nxp.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    334d37c9
caamalg_desc.h 4.6 KB