17 Jul, 2015

1 commit


18 Jun, 2015

1 commit


20 Dec, 2013

1 commit


08 Jan, 2013

1 commit

  • Some hardware crypto drivers register asynchronous ctr(aes), which is left
    unused in IPSEC because rfc3686 template only supports synchronous block
    ciphers. Some other drivers register rfc3686(ctr(aes)) to workaround this
    limitation but not all.

    This patch changes rfc3686 to use asynchronous block ciphers, to allow async
    ctr(aes) algorithms to be utilized automatically by IPSEC.

    Signed-off-by: Jussi Kivilinna
    Acked-by: Herbert Xu
    Signed-off-by: Steffen Klassert

    Jussi Kivilinna
     

01 Aug, 2012

1 commit


09 Nov, 2011

2 commits


10 Mar, 2010

1 commit


29 Aug, 2008

2 commits


10 Jul, 2008

4 commits


21 Apr, 2008

5 commits

  • Implement CTS wrapper for CBC mode required for support of AES
    encryption support for Kerberos (rfc3962).

    Signed-off-by: Kevin Coffman
    Signed-off-by: Herbert Xu

    Kevin Coffman
     
  • The third test vector of ECB-XTEA-ENC fails for me all other
    are fine. I could not find a RFC or something else where they
    are defined. The test vector has not been modified since git
    started recording histrory. The implementation is very close
    (not to say equal) to what is available as Public Domain (they
    recommend 64 rounds and the in kernel uses 32). Therefore I
    belive that there is typo somewhere and tcrypt reported always
    *fail* instead of *okey*.
    This patch replaces input + result of the third test vector with
    result + input from the third decryption vector. The key is the
    same, the other three test vectors are also the reverse.

    Signed-off-by: Sebastian Siewior
    Signed-off-by: Herbert Xu

    Sebastian Siewior
     
  • Currently the tcrypt module is about 2 MiB on x86-32. The
    main reason for the huge size is the data segment which contains
    all the test vectors for each algorithm. The test vectors are
    staticly allocated in an array and the size of the array has been
    drastically increased by the merge of the Salsa20 test vectors.

    With a hint from Benedigt Spranger I found a way how I could
    convert those fixed-length arrays to strings which are flexible
    in size. VIM and regex were also very helpfull :)
    So, I am talking about a shrinking of ~97% on x86-32:

    text data bss dec hex filename
    18309 2039708 20 2058037 1f6735 tcrypt-b4.ko
    45628 23516 80 69224 10e68 tcrypt.ko

    Signed-off-by: Sebastian Siewior
    Signed-off-by: Herbert Xu

    Sebastian Siewior
     
  • The speed templates as it look always the same. The key size
    is repeated for each block size and we test always the same
    block size. The addition of one inner loop makes it possible
    to get rid of the struct and it is possible to use a tiny
    u8 array :)

    Signed-off-by: Sebastian Siewior
    Signed-off-by: Herbert Xu

    Sebastian Siewior
     
  • Some crypto ciphers which are impleneted support similar key sizes
    (16,24 & 32 byte). They can be grouped together and use a common
    templatte instead of their own which contains the same data.

    Signed-off-by: Sebastian Siewior
    Signed-off-by: Herbert Xu

    Sebastian Siewior
     

11 Jan, 2008

12 commits

  • This patch adds 7 test vectors to tcrypt for CCM.
    The test vectors are from rfc 3610.
    There are about 10 more test vectors in RFC 3610
    and 4 or 5 more in NIST. I can add these as time permits.

    I also needed to set authsize. CCM has a prerequisite of
    authsize.

    Signed-off-by: Joy Latten
    Signed-off-by: Herbert Xu

    Joy Latten
     
  • This patch adds a simple speed test for salsa20.
    Usage: modprobe tcrypt mode=206

    Signed-of-by: Tan Swee Heng
    Signed-off-by: Herbert Xu

    Tan Swee Heng
     
  • Add LZO compression algorithm support

    Signed-off-by: Zoltan Sogor
    Signed-off-by: Herbert Xu

    Zoltan Sogor
     
  • This is a large test vector for Salsa20 that crosses the 4096-bytes
    page boundary.

    Signed-off-by: Tan Swee Heng
    Signed-off-by: Herbert Xu

    Tan Swee Heng
     
  • The crypto_aead convention for ICVs is to include it directly in the
    output. If we decided to change this in future then we would make
    the ICV (if the algorithm has an explicit one) available in the
    request itself.

    For now no algorithm needs this so this patch changes gcm to conform
    to this convention. It also adjusts the tcrypt aead tests to take
    this into account.

    Signed-off-by: Herbert Xu

    Herbert Xu
     
  • Add test vectors to tcrypt for AES in CBC mode for key sizes 192 and 256.
    The test vectors are copied from NIST SP800-38A.

    Signed-off-by: Jan Glauber
    Signed-off-by: Herbert Xu

    Jan Glauber
     
  • This patch adds a large AES CTR mode test vector. The test vector is
    4100 bytes in size. It was generated using a C++ program that called
    Crypto++.

    Note that this patch increases considerably the size of "struct
    cipher_testvec" and hence the size of tcrypt.ko.

    Signed-off-by: Tan Swee Heng
    Signed-off-by: Herbert Xu

    Tan Swee Heng
     
  • Add GCM/GMAC support to cryptoapi.

    GCM (Galois/Counter Mode) is an AEAD mode of operations for any block cipher
    with a block size of 16. The typical example is AES-GCM.

    Signed-off-by: Mikko Herranen
    Reviewed-by: Mika Kukkonen
    Signed-off-by: Herbert Xu

    Mikko Herranen
     
  • Add AEAD support to tcrypt, needed by GCM.

    Signed-off-by: Mikko Herranen
    Reviewed-by: Mika Kukkonen
    Signed-off-by: Herbert Xu

    Mikko Herranen
     
  • This patch implements the Salsa20 stream cipher using the blkcipher interface.

    The core cipher code comes from Daniel Bernstein's submission to eSTREAM:
    http://www.ecrypt.eu.org/stream/svn/viewcvs.cgi/ecrypt/trunk/submissions/salsa20/full/ref/

    The test vectors comes from:
    http://www.ecrypt.eu.org/stream/svn/viewcvs.cgi/ecrypt/trunk/submissions/salsa20/full/

    It has been tested successfully with "modprobe tcrypt mode=34" on an
    UML instance.

    Signed-off-by: Tan Swee Heng
    Signed-off-by: Herbert Xu

    Tan Swee Heng
     
  • Resubmitting this patch which extends sha256_generic.c to support SHA-224 as
    described in FIPS 180-2 and RFC 3874. HMAC-SHA-224 as described in RFC4231
    is then supported through the hmac interface.

    Patch includes test vectors for SHA-224 and HMAC-SHA-224.

    SHA-224 chould be chosen as a hash algorithm when 112 bits of security
    strength is required.

    Patch generated against the 2.6.24-rc1 kernel and tested against
    2.6.24-rc1-git14 which includes fix for scatter gather implementation for HMAC.

    Signed-off-by: Jonathan Lynch
    Signed-off-by: Herbert Xu

    Jonathan Lynch
     
  • This patch implements CTR mode for IPsec.
    It is based off of RFC 3686.

    Please note:
    1. CTR turns a block cipher into a stream cipher.
    Encryption is done in blocks, however the last block
    may be a partial block.

    A "counter block" is encrypted, creating a keystream
    that is xor'ed with the plaintext. The counter portion
    of the counter block is incremented after each block
    of plaintext is encrypted.
    Decryption is performed in same manner.

    2. The CTR counterblock is composed of,
    nonce + IV + counter

    The size of the counterblock is equivalent to the
    blocksize of the cipher.
    sizeof(nonce) + sizeof(IV) + sizeof(counter) = blocksize

    The CTR template requires the name of the cipher
    algorithm, the sizeof the nonce, and the sizeof the iv.
    ctr(cipher,sizeof_nonce,sizeof_iv)

    So for example,
    ctr(aes,4,8)
    specifies the counterblock will be composed of 4 bytes
    from a nonce, 8 bytes from the iv, and 4 bytes for counter
    since aes has a blocksize of 16 bytes.

    3. The counter portion of the counter block is stored
    in big endian for conformance to rfc 3686.

    Signed-off-by: Joy Latten
    Signed-off-by: Herbert Xu

    Joy Latten
     

11 Oct, 2007

2 commits

  • XTS currently considered to be the successor of the LRW mode by the IEEE1619
    workgroup. LRW was discarded, because it was not secure if the encyption key
    itself is encrypted with LRW.

    XTS does not have this problem. The implementation is pretty straightforward,
    a new function was added to gf128mul to handle GF(128) elements in ble format.
    Four testvectors from the specification
    http://grouper.ieee.org/groups/1619/email/pdf00086.pdf
    were added, and they verify on my system.

    Signed-off-by: Rik Snel
    Signed-off-by: Herbert Xu

    Rik Snel
     
  • This patch adds support for the SEED cipher (RFC4269).

    This patch have been used in few VPN appliance vendors in Korea for
    several years. And it was verified by KISA, who developed the
    algorithm itself.

    As its importance in Korean banking industry, it would be great
    if linux incorporates the support.

    Signed-off-by: Hye-Shik Chang
    Signed-off-by: Herbert Xu

    Hye-Shik Chang
     

07 Feb, 2007

3 commits


07 Dec, 2006

2 commits


21 Sep, 2006

2 commits