• Kim Phillips's avatar
    crypto: caam - fix decryption shared vs. non-shared key setting · ddbb8088
    Kim Phillips authored
    Key sharing is enabled by default in the shared descriptor.
    
    Using CBC decrypt, AES has to alter the key in order to decrypt.
    During high traffic decryption rates, i.e, when sharing starts to
    take place, we need to use a different OPERATION option to tell AES
    that the key was already altered by the PRIOR descriptor - we need
    the following kind of logic:
    
    if ( shared )
        operation where AES uses decryption key (DK=1)
    else
        operation where AES uses encryption key (DK=0)
    
    this patch implements this logic using a conditional and
    a non-conditional local jump within the decryption job
    descriptor.
    Signed-off-by: default avatarKim Phillips <kim.phillips@freescale.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    ddbb8088
caamalg.c 33 KB