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

3 commits


12 Jul, 2009

1 commit


11 Jul, 2009

1 commit

  • This patch replaces the full descriptor export with an export of
    the partial hash state. This allows the use of a consistent export
    format across all implementations of a given algorithm.

    This is useful because a number of cases require the use of the
    partial hash state, e.g., PadLock can use the SHA1 hash state
    to get around the fact that it can only hash contiguous data
    chunks.

    Signed-off-by: Herbert Xu

    Herbert Xu
     

18 Feb, 2009

1 commit


05 Feb, 2009

1 commit


25 Dec, 2008

2 commits

  • 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: Herbert Xu

    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: Herbert Xu

    Herbert Xu
     

13 Aug, 2008

1 commit


10 Jul, 2008

1 commit