• Russell King's avatar
    crypto: marvell/cesa - rearrange handling for sw padded hashes · ab270e70
    Russell King authored
    Rearrange the last request handling for hashes which require software
    padding.
    
    We prepare the padding to be appended, and then append as much of the
    padding to any existing data that's already queued up, adding an
    operation block and launching the operation.
    
    Any remainder is then appended as a separate operation.
    
    This ensures that the hardware only ever sees multiples of the hash
    block size to be operated on for software padded hashes, thus ensuring
    that the engine always indicates that it has finished the calculation.
    Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    ab270e70
hash.c 34.4 KB