• Herbert Xu's avatar
    crypto: arc4 - Add internal state · 47309ea1
    Herbert Xu authored
    The arc4 algorithm has always had internal state.  It's been buggy
    from day one in that the state has been stored in the shared tfm
    object.  That means two users sharing the same tfm will end up
    affecting each other's output, or worse, they may end up with the
    same output.
    
    Fix this by declaring an internal state and storing the state there
    instead of within the tfm context.
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    47309ea1
arc4.c 2.01 KB