21 Nov, 2011

1 commit

  • Patch adds LRW support for serpent-sse2 by using lrw_crypt(). Patch has been
    tested with tcrypt and automated filesystem tests.

    Tcrypt benchmarks results (serpent-sse2/serpent_generic speed ratios):

    Benchmark results with tcrypt:

    Intel Celeron T1600 (x86_64) (fam:6, model:15, step:13):
    size lrw-enc lrw-dec
    16B 1.00x 0.96x
    64B 1.01x 1.01x
    256B 3.01x 2.97x
    1024B 3.39x 3.33x
    8192B 3.35x 3.33x

    AMD Phenom II 1055T (x86_64) (fam:16, model:10):
    size lrw-enc lrw-dec
    16B 0.98x 1.03x
    64B 1.01x 1.04x
    256B 2.10x 2.14x
    1024B 2.28x 2.33x
    8192B 2.30x 2.33x

    Intel Atom N270 (i586):
    size lrw-enc lrw-dec
    16B 0.97x 0.97x
    64B 1.47x 1.50x
    256B 1.72x 1.69x
    1024B 1.88x 1.81x
    8192B 1.84x 1.79x

    Signed-off-by: Jussi Kivilinna
    Signed-off-by: Herbert Xu

    Jussi Kivilinna
     

09 Nov, 2011

5 commits


21 Oct, 2011

1 commit


22 Sep, 2011

1 commit


16 Aug, 2011

1 commit

  • On Tue, Aug 16, 2011 at 03:22:34PM +1000, Stephen Rothwell wrote:
    >
    > After merging the final tree, today's linux-next build (powerpc
    > allyesconfig) produced this warning:
    >
    > In file included from security/integrity/ima/../integrity.h:16:0,
    > from security/integrity/ima/ima.h:27,
    > from security/integrity/ima/ima_policy.c:20:
    > include/crypto/sha.h:86:10: warning: 'struct shash_desc' declared inside parameter list
    > include/crypto/sha.h:86:10: warning: its scope is only this definition or declaration, which is probably not what you want
    >
    > Introduced by commit 7c390170b493 ("crypto: sha1 - export sha1_update for
    > reuse"). I guess you need to include crypto/hash.h in crypto/sha.h.

    This patch fixes this by providing a declaration for struct shash_desc.

    Reported-by: Stephen Rothwell
    Signed-off-by: Herbert Xu

    Herbert Xu
     

10 Aug, 2011

1 commit

  • Export the update function as crypto_sha1_update() to not have the need
    to reimplement the same algorithm for each SHA-1 implementation. This
    way the generic SHA-1 implementation can be used as fallback for other
    implementations that fail to run under certain circumstances, like the
    need for an FPU context while executing in IRQ context.

    Signed-off-by: Mathias Krause
    Signed-off-by: Herbert Xu

    Mathias Krause
     

22 Jun, 2011

1 commit

  • Remove linux/mm.h inclusion from netdevice.h -- it's unused (I've checked manually).

    To prevent mm.h inclusion via other channels also extract "enum dma_data_direction"
    definition into separate header. This tiny piece is what gluing netdevice.h with mm.h
    via "netdevice.h => dmaengine.h => dma-mapping.h => scatterlist.h => mm.h".
    Removal of mm.h from scatterlist.h was tried and was found not feasible
    on most archs, so the link was cutoff earlier.

    Hope people are OK with tiny include file.

    Note, that mm_types.h is still dragged in, but it is a separate story.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: David S. Miller

    Alexey Dobriyan
     

07 Jan, 2011

1 commit


02 Dec, 2010

1 commit


19 Nov, 2010

1 commit

  • 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: Herbert Xu
    Acked-by: David S. Miller
    Tested-by: Martin Willi

    Herbert Xu
     

25 Oct, 2010

1 commit

  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
    Update broken web addresses in arch directory.
    Update broken web addresses in the kernel.
    Revert "drivers/usb: Remove unnecessary return's from void functions" for musb gadget
    Revert "Fix typo: configuation => configuration" partially
    ida: document IDA_BITMAP_LONGS calculation
    ext2: fix a typo on comment in ext2/inode.c
    drivers/scsi: Remove unnecessary casts of private_data
    drivers/s390: Remove unnecessary casts of private_data
    net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data
    drivers/infiniband: Remove unnecessary casts of private_data
    drivers/gpu/drm: Remove unnecessary casts of private_data
    kernel/pm_qos_params.c: Remove unnecessary casts of private_data
    fs/ecryptfs: Remove unnecessary casts of private_data
    fs/seq_file.c: Remove unnecessary casts of private_data
    arm: uengine.c: remove C99 comments
    arm: scoop.c: remove C99 comments
    Fix typo configue => configure in comments
    Fix typo: configuation => configuration
    Fix typo interrest[ing|ed] => interest[ing|ed]
    Fix various typos of valid in comments
    ...

    Fix up trivial conflicts in:
    drivers/char/ipmi/ipmi_si_intf.c
    drivers/usb/gadget/rndis.c
    net/irda/irnet/irnet_ppp.c

    Linus Torvalds
     

18 Oct, 2010

1 commit

  • The patch below updates broken web addresses in the kernel

    Signed-off-by: Justin P. Mattock
    Cc: Maciej W. Rozycki
    Cc: Geert Uytterhoeven
    Cc: Finn Thain
    Cc: Randy Dunlap
    Cc: Matt Turner
    Cc: Dimitry Torokhov
    Cc: Mike Frysinger
    Acked-by: Ben Pfaff
    Acked-by: Hans J. Koch
    Reviewed-by: Finn Thain
    Signed-off-by: Jiri Kosina

    Justin P. Mattock
     

20 Sep, 2010

1 commit

  • This patch adds AEAD support into the cryptd framework. Having AEAD
    support in cryptd enables crypto drivers that use the AEAD
    interface type (such as the patch for AEAD based RFC4106 AES-GCM
    implementation using Intel New Instructions) to leverage cryptd for
    asynchronous processing.

    Signed-off-by: Adrian Hoban
    Signed-off-by: Tadeusz Struk
    Signed-off-by: Gabriele Paoloni
    Signed-off-by: Aidan O'Mahony
    Signed-off-by: Herbert Xu

    Adrian Hoban
     

19 May, 2010

1 commit

  • These are akin to the blkcipher_walk helpers.

    The main differences in the async variant are:

    1) Only physical walking is supported. We can't hold on to
    kmap mappings across the async operation to support virtual
    ablkcipher_walk operations anyways.

    2) Bounce buffers used for async more need to be persistent and
    freed at a later point in time when the async op completes.
    Therefore we maintain a list of writeback buffers and require
    that the ablkcipher_walk user call the 'complete' operation
    so we can copy the bounce buffers out to the real buffers and
    free up the bounce buffer chunks.

    These interfaces will be used by the new Niagara2 crypto driver.

    Signed-off-by: David S. Miller
    Signed-off-by: Herbert Xu

    David S. Miller
     

17 Jan, 2010

1 commit

  • This patch adds export/import support to md5. The exported type is
    defined by struct md5_state.

    This is modeled after the equivalent change to sha1_generic.

    Signed-off-by: Max Vozeler
    Signed-off-by: Herbert Xu

    Max Vozeler
     

07 Jan, 2010

1 commit


19 Oct, 2009

2 commits

  • 6941c3a0 disabled compilation of the legacy digest code but didn't
    actually remove it. Rectify this. Also, remove the crypto_hash_type
    extern declaration from algapi.h now that the struct is gone.

    Signed-off-by: Benjamin Gilbert
    Signed-off-by: Herbert Xu

    Benjamin Gilbert
     
  • PCLMULQDQ is used to accelerate the most time-consuming part of GHASH,
    carry-less multiplication. More information about PCLMULQDQ can be
    found at:

    http://software.intel.com/en-us/articles/carry-less-multiplication-and-its-usage-for-computing-the-gcm-mode/

    Because PCLMULQDQ changes XMM state, its usage must be enclosed with
    kernel_fpu_begin/end, which can be used only in process context, the
    acceleration is implemented as crypto_ahash. That is, request in soft
    IRQ context will be defered to the cryptd kernel thread.

    Signed-off-by: Huang Ying
    Signed-off-by: Herbert Xu

    Huang Ying
     

12 Sep, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (102 commits)
    crypto: sha-s390 - Fix warnings in import function
    crypto: vmac - New hash algorithm for intel_txt support
    crypto: api - Do not displace newly registered algorithms
    crypto: ansi_cprng - Fix module initialization
    crypto: xcbc - Fix alignment calculation of xcbc_tfm_ctx
    crypto: fips - Depend on ansi_cprng
    crypto: blkcipher - Do not use eseqiv on stream ciphers
    crypto: ctr - Use chainiv on raw counter mode
    Revert crypto: fips - Select CPRNG
    crypto: rng - Fix typo
    crypto: talitos - add support for 36 bit addressing
    crypto: talitos - align locks on cache lines
    crypto: talitos - simplify hmac data size calculation
    crypto: mv_cesa - Add support for Orion5X crypto engine
    crypto: cryptd - Add support to access underlaying shash
    crypto: gcm - Use GHASH digest algorithm
    crypto: ghash - Add GHASH digest algorithm for GCM
    crypto: authenc - Convert to ahash
    crypto: api - Fix aligned ctx helper
    crypto: hmac - Prehash ipad/opad
    ...

    Linus Torvalds
     

02 Sep, 2009

1 commit


29 Aug, 2009

1 commit

  • As struct skcipher_givcrypt_request includes struct crypto_request
    at a non-zero offset, testing for NULL after converting the pointer
    returned by crypto_dequeue_request does not work. This can result
    in IPsec crashes when the queue is depleted.

    This patch fixes it by doing the pointer conversion only when the
    return value is non-NULL. In particular, we create a new function
    __crypto_dequeue_request that does the pointer conversion.

    Reported-by: Brad Bosch
    Signed-off-by: Herbert Xu

    Herbert Xu
     

06 Aug, 2009

1 commit


24 Jul, 2009

1 commit

  • The aligned ctx helper was using a bogus alignment value thas was
    one off the correct value. Fortunately the current users do not
    require anything beyond the natural alignment of the platform so
    this hasn't caused a problem.

    This patch fixes that and also removes the unnecessary minimum
    check since if the alignment is less than the natural alignment
    then the subsequent ALIGN operation should be a noop.

    Signed-off-by: Herbert Xu

    Herbert Xu
     

22 Jul, 2009

2 commits


15 Jul, 2009

2 commits

  • When an shash algorithm is exported as ahash, ahash will access
    its digest size through hash_alg_common. That's why the shash
    layout needs to match hash_alg_common. This wasn't the case
    because the alignment weren't identical.

    This patch fixes the problem.

    Signed-off-by: Herbert Xu

    Herbert Xu
     
  • This patch exports the finup operation where available and adds
    a default finup operation for ahash. The operations final, finup
    and digest also will now deal with unaligned result pointers by
    copying it. Finally export/import operations are will now be
    exported too.

    Signed-off-by: Herbert Xu

    Herbert Xu
     

14 Jul, 2009

9 commits