1. 14 3月, 2012 2 次提交
  2. 30 11月, 2011 1 次提交
  3. 09 11月, 2011 1 次提交
  4. 21 10月, 2011 1 次提交
  5. 22 9月, 2011 2 次提交
  6. 14 3月, 2011 1 次提交
  7. 27 11月, 2010 1 次提交
  8. 26 11月, 2010 1 次提交
    • H
      crypto: algif_skcipher - User-space interface for skcipher operations · 8ff59090
      Herbert Xu 提交于
      This patch adds the af_alg plugin for symmetric key ciphers,
      corresponding to the ablkcipher kernel operation type.
      
      Keys can optionally be set through the setsockopt interface.
      
      Once a sendmsg call occurs without MSG_MORE no further writes
      may be made to the socket until all previous data has been read.
      
      IVs and and whether encryption/decryption is performed can be
      set through the setsockopt interface or as a control message
      to sendmsg.
      
      The interface is completely synchronous, all operations are
      carried out in recvmsg(2) and will complete prior to the system
      call returning.
      
      The splice(2) interface support reading the user-space data directly
      without copying (except that the Crypto API itself may copy the data
      if alignment is off).
      
      The recvmsg(2) interface supports directly writing to user-space
      without additional copying, i.e., the kernel crypto interface will
      receive the user-space address as its output SG list.
      
      Thakns to Miloslav Trmac for reviewing this and contributing
      fixes and improvements.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      8ff59090
  9. 19 11月, 2010 2 次提交
    • H
      crypto: algif_hash - User-space interface for hash operations · fe869cdb
      Herbert Xu 提交于
      This patch adds the af_alg plugin for hash, corresponding to
      the ahash kernel operation type.
      
      Keys can optionally be set through the setsockopt interface.
      
      Each sendmsg call will finalise the hash unless sent with a MSG_MORE
      flag.
      
      Partial hash states can be cloned using accept(2).
      
      The interface is completely synchronous, all operations will
      complete prior to the system call returning.
      
      Both sendmsg(2) and splice(2) support reading the user-space
      data directly without copying (except that the Crypto API itself
      may copy the data if alignment is off).
      
      For now only the splice(2) interface supports performing digest
      instead of init/update/final.  In future the sendmsg(2) interface
      will also be modified to use digest/finup where possible so that
      hardware that cannot return a partial hash state can still benefit
      from this interface.
      
      Thakns to Miloslav Trmac for reviewing this and contributing
      fixes and improvements.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Tested-by: NMartin Willi <martin@strongswan.org>
      fe869cdb
    • H
      crypto: af_alg - User-space interface for Crypto API · 03c8efc1
      Herbert Xu 提交于
      This patch creates the backbone of the user-space interface for
      the Crypto API, through a new socket family AF_ALG.
      
      Each session corresponds to one or more connections obtained from
      that socket.  The number depends on the number of inputs/outputs
      of that particular type of operation.  For most types there will
      be a s ingle connection/file descriptor that is used for both input
      and output.  AEAD is one of the few that require two inputs.
      
      Each algorithm type will provide its own implementation that plugs
      into af_alg.  They're keyed using a string such as "skcipher" or
      "hash".
      
      IOW this patch only contains the boring bits that is required
      to hold everything together.
      
      Thakns to Miloslav Trmac for reviewing this and contributing
      fixes and improvements.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Tested-by: NMartin Willi <martin@strongswan.org>
      03c8efc1
  10. 03 6月, 2010 2 次提交
  11. 07 1月, 2010 1 次提交
  12. 02 9月, 2009 1 次提交
  13. 06 8月, 2009 1 次提交
  14. 14 7月, 2009 1 次提交
  15. 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
  16. 19 2月, 2009 1 次提交
  17. 25 12月, 2008 1 次提交
    • 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
  18. 10 12月, 2008 1 次提交
  19. 29 8月, 2008 4 次提交
  20. 15 7月, 2008 1 次提交
  21. 10 7月, 2008 4 次提交
  22. 21 4月, 2008 3 次提交
  23. 23 2月, 2008 1 次提交
  24. 11 1月, 2008 4 次提交
    • J
      [CRYPTO] ccm: Added CCM mode · 4a49b499
      Joy Latten 提交于
      This patch adds Counter with CBC-MAC (CCM) support.
      RFC 3610 and NIST Special Publication 800-38C were referenced.
      Signed-off-by: NJoy Latten <latten@austin.ibm.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      4a49b499
    • H
      [CRYPTO] seqiv: Add Sequence Number IV Generator · 0a270321
      Herbert Xu 提交于
      This generator generates an IV based on a sequence number by xoring it
      with a salt.  This algorithm is mainly useful for CTR and similar modes.
      
      This patch also sets it as the default IV generator for ctr.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      0a270321
    • H
      [CRYPTO] eseqiv: Add Encrypted Sequence Number IV Generator · 806d183a
      Herbert Xu 提交于
      This generator generates an IV based on a sequence number by xoring it
      with a salt and then encrypting it with the same key as used to encrypt
      the plain text.  This algorithm requires that the block size be equal
      to the IV size.  It is mainly useful for CBC.
      
      It has one noteworthy property that for IPsec the IV happens to lie
      just before the plain text so the IV generation simply increases the
      number of encrypted blocks by one.  Therefore the cost of this generator
      is entirely dependent on the speed of the underlying cipher.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      806d183a
    • H
      [CRYPTO] chainiv: Add chain IV generator · 7f470739
      Herbert Xu 提交于
      The chain IV generator is the one we've been using in the IPsec stack.
      It simply starts out with a random IV, then uses the last block of each
      encrypted packet's cipher text as the IV for the next packet.
      
      It can only be used by synchronous ciphers since we have to make sure
      that we don't start the encryption of the next packet until the last
      one has completed.
      
      It does have the advantage of using very little CPU time since it doesn't
      have to generate anything at all.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      7f470739