01 Aug, 2014

1 commit


23 Jul, 2014

1 commit

  • With DMA_API_DEBUG set, following warnings are emitted
    (tested on CAAM accelerator):
    DMA-API: device driver maps memory from kernel text or rodata
    DMA-API: device driver maps memory from stack
    and the culprits are:
    -key in __test_aead and __test_hash
    -result in __test_hash

    MAX_KEYLEN is changed to accommodate maximum key length from
    existing test vectors in crypto/testmgr.h (131 bytes) and rounded.

    Signed-off-by: Horia Geanta
    Acked-by: Kim Phillips
    Signed-off-by: Herbert Xu

    Horia Geanta
     

20 Jun, 2014

1 commit

  • The DRBG test code implements the CAVS test approach.

    As discussed for the test vectors, all DRBG types are covered with
    testing. However, not every backend cipher is covered with testing. To
    prevent the testmgr from logging missing testing, the NULL test is
    registered for all backend ciphers not covered with specific test cases.

    All currently implemented DRBG types and backend ciphers are defined
    in SP800-90A. Therefore, the fips_allowed flag is set for all.

    Signed-off-by: Stephan Mueller
    Signed-off-by: Herbert Xu

    Stephan Mueller
     

22 May, 2014

2 commits

  • Test vectors were taken from existing test for
    CBC(DES3_EDE). Associated data has been added to test vectors.
    HMAC computed with Crypto++ has been used. Following algos have
    been covered.

    (a) "authenc(hmac(sha1),cbc(des))"
    (b) "authenc(hmac(sha1),cbc(des3_ede))"
    (c) "authenc(hmac(sha224),cbc(des))"
    (d) "authenc(hmac(sha224),cbc(des3_ede))"
    (e) "authenc(hmac(sha256),cbc(des))"
    (f) "authenc(hmac(sha256),cbc(des3_ede))"
    (g) "authenc(hmac(sha384),cbc(des))"
    (h) "authenc(hmac(sha384),cbc(des3_ede))"
    (i) "authenc(hmac(sha512),cbc(des))"
    (j) "authenc(hmac(sha512),cbc(des3_ede))"

    Signed-off-by: Vakul Garg
    [NiteshNarayanLal@freescale.com: added hooks for the missing algorithms test and tested the patch]
    Signed-off-by: Nitesh Lal
    Signed-off-by: Herbert Xu

    Nitesh Lal
     
  • With DMA-API debug enabled testmgr triggers a "DMA-API: device driver maps memory from stack" warning, when tested on a crypto HW accelerator.

    Signed-off-by: Tadeusz Struk
    Signed-off-by: Herbert Xu

    Tadeusz Struk
     

21 Mar, 2014

1 commit


28 Nov, 2013

1 commit

  • Commit d8a32ac25698cd60b02bed2100379803c7f964e3 (crypto: testmgr - make
    test_aead also test 'dst != src' code paths) added support for different
    source and destination buffers in test_aead.

    This patch modifies the source and destination buffer lengths accordingly:
    the lengths are not equal since encryption / decryption adds / removes
    the ICV.

    Cc: Jussi Kivilinna
    Signed-off-by: Horia Geanta
    Signed-off-by: Herbert Xu

    Horia Geanta
     

15 Nov, 2013

1 commit


07 Sep, 2013

2 commits


01 Aug, 2013

1 commit


24 Jul, 2013

1 commit

  • This reverts commits
    67822649d7305caf3dd50ed46c27b99c94eff996
    39761214eefc6b070f29402aa1165f24d789b3f7
    0b95a7f85718adcbba36407ef88bba0a7379ed03
    31d939625a9a20b1badd2d4e6bf6fd39fa523405
    2d31e518a42828df7877bca23a958627d60408bc

    Unfortunately this change broke boot on some systems that used an
    initrd which does not include the newly created crct10dif modules.
    As these modules are required by sd_mod under certain configurations
    this is a serious problem.

    Signed-off-by: Herbert Xu

    Herbert Xu
     

21 Jun, 2013

6 commits


24 May, 2013

1 commit

  • These are simple tests to do sanity check of CRC T10 DIF hash. The
    correctness of the transform can be checked with the command
    modprobe tcrypt mode=47
    The speed of the transform can be evaluated with the command
    modprobe tcrypt mode=320

    Set the cpu frequency to constant and turn turbo off when running the
    speed test so the frequency governor will not tweak the frequency and
    affects the measurements.

    Signed-off-by: Tim Chen
    Signed-off-by: Herbert Xu

    Tim Chen
     

25 Apr, 2013

7 commits


20 Jan, 2013

1 commit

  • fcrypt is used only as pcbc(fcrypt), but testmgr does not know this.
    Use the zero key, zero plaintext pcbc(fcrypt) test vector for
    testing plain 'fcrypt' to hide "no test for fcrypt" warnings.

    Signed-off-by: Jussi Kivilinna
    Acked-by: David S. Miller
    Signed-off-by: Herbert Xu

    Jussi Kivilinna
     

06 Dec, 2012

3 commits


09 Nov, 2012

1 commit

  • This patch adds AES-NI/AVX/x86_64 assembler implementation of Camellia block
    cipher. Implementation process data in sixteen block chunks, which are
    byte-sliced and AES SubBytes is reused for Camellia s-box with help of pre-
    and post-filtering.

    Patch has been tested with tcrypt and automated filesystem tests.

    tcrypt test results:

    Intel Core i5-2450M:

    camellia-aesni-avx vs camellia-asm-x86_64-2way:
    128bit key: (lrw:256bit) (xts:256bit)
    size ecb-enc ecb-dec cbc-enc cbc-dec ctr-enc ctr-dec lrw-enc lrw-dec xts-enc xts-dec
    16B 0.98x 0.96x 0.99x 0.96x 0.96x 0.95x 0.95x 0.94x 0.97x 0.98x
    64B 0.99x 0.98x 1.00x 0.98x 0.98x 0.99x 0.98x 0.93x 0.99x 0.98x
    256B 2.28x 2.28x 1.01x 2.29x 2.25x 2.24x 1.96x 1.97x 1.91x 1.90x
    1024B 2.57x 2.56x 1.00x 2.57x 2.51x 2.53x 2.19x 2.17x 2.19x 2.22x
    8192B 2.49x 2.49x 1.00x 2.53x 2.48x 2.49x 2.17x 2.17x 2.22x 2.22x

    256bit key: (lrw:384bit) (xts:512bit)
    size ecb-enc ecb-dec cbc-enc cbc-dec ctr-enc ctr-dec lrw-enc lrw-dec xts-enc xts-dec
    16B 0.97x 0.98x 0.99x 0.97x 0.97x 0.96x 0.97x 0.98x 0.98x 0.99x
    64B 1.00x 1.00x 1.01x 0.99x 0.98x 0.99x 0.99x 0.99x 0.99x 0.99x
    256B 2.37x 2.37x 1.01x 2.39x 2.35x 2.33x 2.10x 2.11x 1.99x 2.02x
    1024B 2.58x 2.60x 1.00x 2.58x 2.56x 2.56x 2.28x 2.29x 2.28x 2.29x
    8192B 2.50x 2.52x 1.00x 2.56x 2.51x 2.51x 2.24x 2.25x 2.26x 2.29x

    Signed-off-by: Jussi Kivilinna
    Acked-by: David S. Miller
    Signed-off-by: Herbert Xu

    Jussi Kivilinna
     

24 Oct, 2012

2 commits


27 Sep, 2012

3 commits


01 Aug, 2012

4 commits

  • This patch adds a x86_64/avx assembler implementation of the Cast6 block
    cipher. The implementation processes eight blocks in parallel (two 4 block
    chunk AVX operations). The table-lookups are done in general-purpose registers.
    For small blocksizes the functions from the generic module are called. A good
    performance increase is provided for blocksizes greater or equal to 128B.

    Patch has been tested with tcrypt and automated filesystem tests.

    Tcrypt benchmark results:

    Intel Core i5-2500 CPU (fam:6, model:42, step:7)

    cast6-avx-x86_64 vs. cast6-generic
    128bit key: (lrw:256bit) (xts:256bit)
    size ecb-enc ecb-dec cbc-enc cbc-dec ctr-enc ctr-dec lrw-enc lrw-dec xts-enc xts-dec
    16B 0.97x 1.00x 1.01x 1.01x 0.99x 0.97x 0.98x 1.01x 0.96x 0.98x
    64B 0.98x 0.99x 1.02x 1.01x 0.99x 1.00x 1.01x 0.99x 1.00x 0.99x
    256B 1.77x 1.84x 0.99x 1.85x 1.77x 1.77x 1.70x 1.74x 1.69x 1.72x
    1024B 1.93x 1.95x 0.99x 1.96x 1.93x 1.93x 1.84x 1.85x 1.89x 1.87x
    8192B 1.91x 1.95x 0.99x 1.97x 1.95x 1.91x 1.86x 1.87x 1.93x 1.90x

    256bit key: (lrw:384bit) (xts:512bit)
    size ecb-enc ecb-dec cbc-enc cbc-dec ctr-enc ctr-dec lrw-enc lrw-dec xts-enc xts-dec
    16B 0.97x 0.99x 1.02x 1.01x 0.98x 0.99x 1.00x 1.00x 0.98x 0.98x
    64B 0.98x 0.99x 1.01x 1.00x 1.00x 1.00x 1.01x 1.01x 0.97x 1.00x
    256B 1.77x 1.83x 1.00x 1.86x 1.79x 1.78x 1.70x 1.76x 1.71x 1.69x
    1024B 1.92x 1.95x 0.99x 1.96x 1.93x 1.93x 1.83x 1.86x 1.89x 1.87x
    8192B 1.94x 1.95x 0.99x 1.97x 1.95x 1.95x 1.87x 1.87x 1.93x 1.91x

    Signed-off-by: Johannes Goetzfried
    Signed-off-by: Herbert Xu

    Johannes Goetzfried
     
  • New ECB, CBC, CTR, LRW and XTS testvectors for cast6. We need larger
    testvectors to check parallel code paths in the optimized implementation. Tests
    have also been added to the tcrypt module.

    Signed-off-by: Johannes Goetzfried
    Signed-off-by: Herbert Xu

    Johannes Goetzfried
     
  • This patch adds a x86_64/avx assembler implementation of the Cast5 block
    cipher. The implementation processes sixteen blocks in parallel (four 4 block
    chunk AVX operations). The table-lookups are done in general-purpose registers.
    For small blocksizes the functions from the generic module are called. A good
    performance increase is provided for blocksizes greater or equal to 128B.

    Patch has been tested with tcrypt and automated filesystem tests.

    Tcrypt benchmark results:

    Intel Core i5-2500 CPU (fam:6, model:42, step:7)

    cast5-avx-x86_64 vs. cast5-generic
    64bit key:
    size ecb-enc ecb-dec cbc-enc cbc-dec ctr-enc ctr-dec
    16B 0.99x 0.99x 1.00x 1.00x 1.02x 1.01x
    64B 1.00x 1.00x 0.98x 1.00x 1.01x 1.02x
    256B 2.03x 2.01x 0.95x 2.11x 2.12x 2.13x
    1024B 2.30x 2.24x 0.95x 2.29x 2.35x 2.35x
    8192B 2.31x 2.27x 0.95x 2.31x 2.39x 2.39x

    128bit key:
    size ecb-enc ecb-dec cbc-enc cbc-dec ctr-enc ctr-dec
    16B 0.99x 0.99x 1.00x 1.00x 1.01x 1.01x
    64B 1.00x 1.00x 0.98x 1.01x 1.02x 1.01x
    256B 2.17x 2.13x 0.96x 2.19x 2.19x 2.19x
    1024B 2.29x 2.32x 0.95x 2.34x 2.37x 2.38x
    8192B 2.35x 2.32x 0.95x 2.35x 2.39x 2.39x

    Signed-off-by: Johannes Goetzfried
    Signed-off-by: Herbert Xu

    Johannes Goetzfried
     
  • New ECB, CBC and CTR testvectors for cast5. We need larger testvectors to check
    parallel code paths in the optimized implementation. Tests have also been added
    to the tcrypt module.

    Signed-off-by: Johannes Goetzfried
    Signed-off-by: Herbert Xu

    Johannes Goetzfried