• Lee Nipper's avatar
    crypto: talitos - add hmac algorithms · 79b3a418
    Lee Nipper authored
    Add these hmac algorithms to talitos:
        hmac(md5),
        hmac(sha1),
        hmac(sha224),
        hmac(sha256),
        hmac(sha384),
        hmac(sha512).
    These are all type ahash.
    Signed-off-by: default avatarLee Nipper <lee.nipper@gmail.com>
    
    Fixed up to not register HMAC algorithms on sec2.0 devices.
    Rationale (from Lee):
    
    on an 8349E Rev1.1, there's a problem with hmac for any talitos
    hmac sequence requiring an intermediate hash context (Pointer
    DWORD 1); the result is an incorrect hmac.  An intermediate hash
    context is required for something longer than (65536-blocksize),
    and for other cases when update/finup/final are used inefficiently.
    Interestingly, a normal hash (without hmac) works perfectly
    when using an intermediate context.
    Signed-off-by: default avatarKim Phillips <kim.phillips@freescale.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    79b3a418
talitos.c 76 KB