• Herbert Xu's avatar
    crypto: algif_skcipher - Fix stream cipher chaining · 99bd99d3
    Herbert Xu authored
    Unlike algif_aead which is always issued in one go (thus limiting
    the maximum size of the request), algif_skcipher has always allowed
    unlimited input data by cutting them up as necessary and feeding
    the fragments to the underlying algorithm one at a time.
    
    However, because of deficiencies in the API, this has been broken
    for most stream ciphers such as arc4 or chacha.  This is because
    they have an internal state in addition to the IV that must be
    preserved in order to continue processing.
    
    Fix this by using the new skcipher state API.
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    99bd99d3
if_alg.h 6.48 KB