1. 14 7月, 2009 5 次提交
  2. 12 7月, 2009 1 次提交
  3. 11 7月, 2009 3 次提交
  4. 09 7月, 2009 1 次提交
  5. 08 7月, 2009 8 次提交
  6. 07 7月, 2009 2 次提交
  7. 04 3月, 2009 2 次提交
    • G
      crypto: zlib - New zlib crypto module, using pcomp · bf68e65e
      Geert Uytterhoeven 提交于
      Signed-off-by: NGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
      Cc: James Morris <jmorris@namei.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      bf68e65e
    • G
      crypto: compress - Add pcomp interface · a1d2f095
      Geert Uytterhoeven 提交于
      The current "comp" crypto interface supports one-shot (de)compression only,
      i.e. the whole data buffer to be (de)compressed must be passed at once, and
      the whole (de)compressed data buffer will be received at once.
      In several use-cases (e.g. compressed file systems that store files in big
      compressed blocks), this workflow is not suitable.
      Furthermore, the "comp" type doesn't provide for the configuration of
      (de)compression parameters, and always allocates workspace memory for both
      compression and decompression, which may waste memory.
      
      To solve this, add a "pcomp" partial (de)compression interface that provides
      the following operations:
        - crypto_compress_{init,update,final}() for compression,
        - crypto_decompress_{init,update,final}() for decompression,
        - crypto_{,de}compress_setup(), to configure (de)compression parameters
          (incl. allocating workspace memory).
      
      The (de)compression methods take a struct comp_request, which was mimicked
      after the z_stream object in zlib, and contains buffer pointer and length
      pairs for input and output.
      
      The setup methods take an opaque parameter pointer and length pair. Parameters
      are supposed to be encoded using netlink attributes, whose meanings depend on
      the actual (name of the) (de)compression algorithm.
      Signed-off-by: NGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      a1d2f095
  8. 19 2月, 2009 1 次提交
  9. 18 2月, 2009 3 次提交
  10. 05 2月, 2009 1 次提交
  11. 25 12月, 2008 6 次提交
    • H
      crypto: aes - Precompute tables · 0ee4a969
      Herbert Xu 提交于
      The tables used by the various AES algorithms are currently
      computed at run-time.  This has created an init ordering problem
      because some AES algorithms may be registered before the tables
      have been initialised.
      
      This patch gets around this whole thing by precomputing the tables.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      0ee4a969
    • H
      crypto: hash - Export shash through hash · 5f7082ed
      Herbert Xu 提交于
      This patch allows shash algorithms to be used through the old hash
      interface.  This is a transitional measure so we can convert the
      underlying algorithms to shash before converting the users across.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      5f7082ed
    • H
      crypto: hash - Add import/export interface · dec8b786
      Herbert Xu 提交于
      It is often useful to save the partial state of a hash function
      so that it can be used as a base for two or more computations.
      
      The most prominent example is HMAC where all hashes start from
      a base determined by the key.  Having an import/export interface
      means that we only have to compute that base once rather than
      for each message.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      dec8b786
    • H
      crypto: hash - Add shash interface · 7b5a080b
      Herbert Xu 提交于
      The shash interface replaces the current synchronous hash interface.
      It improves over hash in two ways.  Firstly shash is reentrant,
      meaning that the same tfm may be used by two threads simultaneously
      as all hashing state is stored in a local descriptor.
      
      The other enhancement is that shash no longer takes scatter list
      entries.  This is because shash is specifically designed for
      synchronous algorithms and as such scatter lists are unnecessary.
      
      All existing hash users will be converted to shash once the
      algorithms have been completely converted.
      
      There is also a new finup function that combines update with final.
      This will be extended to ahash once the algorithm conversion is
      done.
      
      This is also the first time that an algorithm type has their own
      registration function.  Existing algorithm types will be converted
      to this way in due course.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      7b5a080b
    • H
      crypto: api - Rebirth of crypto_alloc_tfm · 7b0bac64
      Herbert Xu 提交于
      This patch reintroduces a completely revamped crypto_alloc_tfm.
      The biggest change is that we now take two crypto_type objects
      when allocating a tfm, a frontend and a backend.  In fact this
      simply formalises what we've been doing behind the API's back.
      
      For example, as it stands crypto_alloc_ahash may use an
      actual ahash algorithm or a crypto_hash algorithm.  Putting
      this in the API allows us to do this much more cleanly.
      
      The existing types will be converted across gradually.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      7b0bac64
    • H
      crypto: api - Move type exit function into crypto_tfm · 4a779486
      Herbert Xu 提交于
      The type exit function needs to undo any allocations done by the type
      init function.  However, the type init function may differ depending
      on the upper-level type of the transform (e.g., a crypto_blkcipher
      instantiated as a crypto_ablkcipher).
      
      So we need to move the exit function out of the lower-level
      structure and into crypto_tfm itself.
      
      As it stands this is a no-op since nobody uses exit functions at
      all.  However, all cases where a lower-level type is instantiated
      as a different upper-level type (such as blkcipher as ablkcipher)
      will be converted such that they allocate the underlying transform
      and use that instead of casting (e.g., crypto_ablkcipher casted
      into crypto_blkcipher).  That will need to use a different exit
      function depending on the upper-level type.
      
      This patch also allows the type init/exit functions to call (or not)
      cra_init/cra_exit instead of always calling them from the top level.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      4a779486
  12. 29 8月, 2008 2 次提交
  13. 13 8月, 2008 1 次提交
  14. 10 7月, 2008 3 次提交
  15. 01 5月, 2008 1 次提交
    • H
      [CRYPTO] api: Fix scatterwalk_sg_chain · 8ec970d8
      Herbert Xu 提交于
      When I backed out of using the generic sg chaining (as it isn't currently
      portable) and introduced scatterwalk_sg_chain/scatterwalk_sg_next I left
      out the sg_is_last check in the latter.  This causes it to potentially
      dereference beyond the end of the sg array.
      
      As most uses of scatterwalk_sg_next are bound by an overall length, this
      only affected the chaining code in authenc and eseqiv. Thanks to Patrick
      McHardy for identifying this problem.
      
      This patch also clears the "last" bit on the head of the chained list as
      it's no longer last.  This also went missing in scatterwalk_sg_chain and
      is present in sg_chain.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      8ec970d8