Commit graph

58 commits

Author SHA1 Message Date
David S. Miller
dc4ccfd15d n2_crypto: Add HMAC support.
One note is that, unlike with non-HMAC hashes, we can't support
hmac(sha224) using the HMAC_SHA256 opcode.

Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-25 17:37:17 -07:00
David S. Miller
3a2c034697 n2_crypto: Make ahash parameterization explicit.
All of the ahash ->digest() ops do essentially the same thing, just
using different parameters.

So instead, have a single n2_hash_async_digest() and use an
n2_ahash_alg container that provides the parameters.

Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-25 17:37:17 -07:00
David S. Miller
38511108a3 n2_crypto: Log algorithm success/failure in kernel log.
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-25 17:37:16 -07:00
David S. Miller
65a23d6706 n2_crypto: Kill n2_base_ctx and helpers.
Unused, and we'll do this via the request context.

Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-25 17:37:16 -07:00
David S. Miller
c9aa55e527 n2_crypto: Plumb fallback ahash requests properly.
Do this by putting the async fallback request at the end of an n2
specific ahash request context, then properly adjusting the request
private size in our ahash ->cra_init().

We also need to put the writable state bits into the n2 request
private instead of the n2 cra_ctx.

With help from Herbert Xu.

Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-25 17:37:15 -07:00
David S. Miller
527b952525 n2_crypto: Fix MAU kmem_cache name.
Both the CWQ and MAU caches unintentionally had that same name.

Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-25 17:37:15 -07:00
David S. Miller
ff6c7341e0 n2_crypto: Fix build after of_device/of_platform_driver changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-25 17:37:08 -07:00
David S. Miller
0a625fd2ab crypto: n2 - Add Niagara2 crypto driver
Current deficiencies:

1) No HMAC hash support yet.

2) Although the algs are registered as ASYNC they always run
   synchronously.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2010-05-19 14:14:04 +10:00