1. 18 Jul, 2016 3 commits
  2. 17 Aug, 2015 3 commits
  3. 14 Jul, 2015 2 commits
  4. 03 Jun, 2015 3 commits
  5. 28 May, 2015 2 commits
  6. 25 May, 2015 4 commits
  7. 22 May, 2015 4 commits
    • Herbert Xu's avatar
      crypto: seqiv - Add support for new AEAD interface · 856e3f40
      Herbert Xu authored
      
      This patch converts the seqiv IV generator to work with the new
      AEAD interface where IV generators are just normal AEAD algorithms.
      
      Full backwards compatibility is paramount at this point since
      no users have yet switched over to the new interface.  Nor can
      they switch to the new interface until IV generation is fully
      supported by it.
      
      So this means we are adding two versions of seqiv alongside the
      existing one.  The first one is the one that will be used when
      the underlying AEAD algorithm has switched over to the new AEAD
      interface.  The second one handles the current case where the
      underlying AEAD algorithm still uses the old interface.
      
      Both versions export themselves through the new AEAD interface.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      856e3f40
    • Herbert Xu's avatar
      crypto: aead - Add support for new AEAD implementations · 63293c61
      Herbert Xu authored
      
      This patch adds the basic structure of the new AEAD type.  Unlike
      the current version, there is no longer any concept of geniv.  IV
      generation will still be carried out by wrappers but they will be
      normal AEAD algorithms that simply take the IPsec sequence number
      as the IV.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      63293c61
    • Herbert Xu's avatar
      crypto: aead - Rename aead_alg to old_aead_alg · 2d0f230f
      Herbert Xu authored
      
      This patch is the first step in the introduction of a new AEAD
      alg type.  Unlike normal conversions this patch only renames the
      existing aead_alg structure because there are external references
      to it.
      
      Those references will be removed after this patch.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      2d0f230f
    • Herbert Xu's avatar
      crypto: aead - Add new interface with single SG list · 996d98d8
      Herbert Xu authored
      
      The primary user of AEAD, IPsec includes the IV in the AD in
      most cases, except where it is implicitly authenticated by the
      underlying algorithm.
      
      The way it is currently implemented is a hack because we pass
      the data in piecemeal and the underlying algorithms try to stitch
      them back up into one piece.
      
      This is why this patch is adding a new interface that allows a
      single SG list to be passed in that contains everything so the
      algorithm implementors do not have to stitch.
      
      The new interface accepts a single source SG list and a single
      destination SG list.  Both must be laid out as follows:
      
      	AD, skipped data, plain/cipher text, ICV
      
      The ICV is not present from the source during encryption and from
      the destination during decryption.
      
      For the top-level IPsec AEAD algorithm the plain/cipher text will
      contain the generated (or received) IV.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      996d98d8
  8. 13 May, 2015 1 commit
    • Herbert Xu's avatar
      crypto: aead - Convert top level interface to new style · 5d1d65f8
      Herbert Xu authored
      
      This patch converts the top-level aead interface to the new style.
      All user-level AEAD interface code have been moved into crypto/aead.h.
      
      The allocation/free functions have switched over to the new way of
      allocating tfms.
      
      This patch also removes the double indrection on setkey so the
      indirection now exists only at the alg level.
      
      Apart from these there are no user-visible changes.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      5d1d65f8
  9. 26 Apr, 2015 1 commit
  10. 22 Dec, 2014 1 commit
  11. 19 Feb, 2013 1 commit
    • Mathias Krause's avatar
      crypto: user - fix info leaks in report API · 9a5467bf
      Mathias Krause authored
      
      Three errors resulting in kernel memory disclosure:
      
      1/ The structures used for the netlink based crypto algorithm report API
      are located on the stack. As snprintf() does not fill the remainder of
      the buffer with null bytes, those stack bytes will be disclosed to users
      of the API. Switch to strncpy() to fix this.
      
      2/ crypto_report_one() does not initialize all field of struct
      crypto_user_alg. Fix this to fix the heap info leak.
      
      3/ For the module name we should copy only as many bytes as
      module_name() returns -- not as much as the destination buffer could
      hold. But the current code does not and therefore copies random data
      from behind the end of the module name, as the module name is always
      shorter than CRYPTO_MAX_ALG_NAME.
      
      Also switch to use strncpy() to copy the algorithm's name and
      driver_name. They are strings, after all.
      Signed-off-by: default avatarMathias Krause <minipli@googlemail.com>
      Cc: Steffen Klassert <steffen.klassert@secunet.com>
      Signed-off-by: Herbert Xu <he...
      9a5467bf
  12. 04 Feb, 2013 1 commit
  13. 02 Apr, 2012 1 commit
  14. 29 Mar, 2012 1 commit
  15. 10 Nov, 2011 1 commit
  16. 21 Oct, 2011 2 commits
  17. 16 Feb, 2010 1 commit
  18. 11 Oct, 2009 1 commit
  19. 18 Feb, 2009 1 commit
    • Herbert Xu's avatar
      crypto: aead - Avoid infinite loop when nivaead fails selftest · 5852ae42
      Herbert Xu authored
      
      When an aead constructed through crypto_nivaead_default fails
      its selftest, we'll loop forever trying to construct new aead
      objects but failing because it already exists.
      
      The crux of the issue is that once an aead fails the selftest,
      we'll ignore it on the next run through crypto_aead_lookup and
      attempt to construct a new aead.
      
      We should instead return an error to the caller if we find an
      an that has failed the test.
      
      This bug hasn't manifested itself yet because we don't have any
      test vectors for the existing nivaead algorithms.  They're tested
      through the underlying algorithms only.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      5852ae42
  20. 10 Jan, 2008 6 commits
    • Herbert Xu's avatar
      [CRYPTO] api: Show async type · 189ed66e
      Herbert Xu authored
      
      This patch adds an async field to /proc/crypto for ablkcipher and aead
      algorithms.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      189ed66e
    • Herbert Xu's avatar
      [CRYPTO] aead: Create default givcipher instances · d29ce988
      Herbert Xu authored
      
      This patch makes crypto_alloc_aead always return algorithms that is
      capable of generating their own IVs through givencrypt and givdecrypt.
      All existing AEAD algorithms already do.  New ones must either supply
      their own or specify a generic IV generator with the geniv field.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      d29ce988
    • Herbert Xu's avatar
      [CRYPTO] aead: Add aead_geniv_alloc/aead_geniv_free · 5b6d2d7f
      Herbert Xu authored
      
      This patch creates the infrastructure to help the construction of IV
      generator templates that wrap around AEAD algorithms by adding an IV
      generator to them.  This is useful for AEAD algorithms with no built-in
      IV generator or to replace their built-in generator.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      5b6d2d7f
    • Herbert Xu's avatar
      [CRYPTO] aead: Allow algorithms with no givcrypt support · aedb30dc
      Herbert Xu authored
      
      Some algorithms always require manual IV construction.  For instance,
      the generic CCM algorithm requires the first byte of the IV to be manually
      constructed.  Such algorithms are always used by other algorithms equipped
      with their own IV generators and do not need IV generation per se.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      aedb30dc
    • Herbert Xu's avatar
      [CRYPTO] aead: Add givcrypt operations · 743edf57
      Herbert Xu authored
      
      This patch adds the underlying givcrypt operations for aead and associated
      support elements.  The rationale is identical to that of the skcipher
      givcrypt operations, i.e., sometimes only the algorithm knows how the
      IV should be generated.
      
      A new request type aead_givcrypt_request is added which contains an
      embedded aead_request structure with two new elements to support this
      operation.  The new elements are seq and giv.  The seq field should
      contain a strictly increasing 64-bit integer which may be used by
      certain IV generators as an input value.  The giv field will be used
      to store the generated IV.  It does not need to obey the alignment
      requirements of the algorithm because it's not used during the operation.
      
      The existing iv field must still be available as it will be used to store
      intermediate IVs and the output IV if chaining is desired.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      743edf57
    • Herbert Xu's avatar
      [CRYPTO] aead: Make authsize a run-time parameter · 7ba683a6
      Herbert Xu authored
      
      As it is authsize is an algorithm paramter which cannot be changed at
      run-time.  This is inconvenient because hardware that implements such
      algorithms would have to register each authsize that they support
      separately.
      
      Since authsize is a property common to all AEAD algorithms, we can add
      a function setauthsize that sets it at run-time, just like setkey.
      
      This patch does exactly that and also changes authenc so that authsize
      is no longer a parameter of its template.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      7ba683a6