Skip to content
  1. Jan 25, 2018
  2. Jan 20, 2018
  3. Jan 18, 2018
  4. Jan 14, 2018
  5. Jan 12, 2018
    • tcharding's avatar
      crypto: doc - clear htmldocs build warnings for crypto/hash · b40fa82c
      tcharding authored
      
      
      SPHINX build emits multiple warnings of kind:
      
      	warning: duplicate section name 'Note'
      
      (when building kernel via make target 'htmldocs')
      
      This is caused by repeated use of comments of form:
      
      	* Note: soau soaeusoa uoe
      
      We can change the format without loss of clarity and clear the build
      warnings.
      
      Add '**[mandatory]**' or '**[optional]**' as kernel-doc field element
      description prefix
      
      This renders in HTML as (prefixes in bold)
      
      final
          [mandatory] Retrieve result from the driver. This function finalizes the
          transformation and retrieves the resulting hash from the driver and
          pushes it back to upper layers. No data processing happens at this
          point unless hardware requires it to finish the transformation (then
          the data buffered by the device driver is processed).
      
      Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      b40fa82c
    • Eric Biggers's avatar
      crypto: x86/salsa20 - cleanup and convert to skcipher API · c9a3ff8f
      Eric Biggers authored
      
      
      Convert salsa20-asm from the deprecated "blkcipher" API to the
      "skcipher" API, in the process fixing it up to use the generic helpers.
      This allows removing the salsa20_keysetup() and salsa20_ivsetup()
      assembly functions, which aren't performance critical; the C versions do
      just fine.
      
      This also fixes the same bug that salsa20-generic had, where the state
      array was being maintained directly in the transform context rather than
      on the stack or in the request context.  Thus, if multiple threads used
      the same Salsa20 transform concurrently they produced the wrong results.
      
      Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      c9a3ff8f
    • Eric Biggers's avatar
      crypto: salsa20 - export generic helpers · eb772f37
      Eric Biggers authored
      
      
      Export the Salsa20 constants, transform context, and initialization
      functions so that they can be reused by the x86 implementation.
      
      Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      eb772f37
    • Eric Biggers's avatar
      crypto: salsa20-generic - cleanup and convert to skcipher API · b62b3db7
      Eric Biggers authored
      
      
      Convert salsa20-generic from the deprecated "blkcipher" API to the
      "skcipher" API, in the process fixing it up to be thread-safe (as the
      crypto API expects) by maintaining each request's state separately from
      the transform context.
      
      Also remove the unnecessary cra_alignmask and tighten validation of the
      key size by accepting only 16 or 32 bytes, not anything in between.
      
      These changes bring the code close to the way chacha20-generic does
      things, so hopefully it will be easier to maintain in the future.
      
      However, the way Salsa20 interprets the IV is still slightly different;
      that was not changed.
      
      Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      b62b3db7