1. 22 Dec, 2023 4 commits
  2. 15 Dec, 2023 33 commits
  3. 08 Dec, 2023 3 commits
    • 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
    • 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
    • Herbert Xu's avatar
      crypto: skcipher - Make use of internal state · 662ea18d
      Herbert Xu authored
      This patch adds code to the skcipher/lskcipher API to make use
      of the internal state if present.  In particular, the skcipher
      lskcipher wrapper will allocate a buffer for the IV/state and
      feed that to the underlying lskcipher algorithm.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      662ea18d