diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2006-04-09 18:42:35 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2006-06-26 03:34:38 -0400 |
commit | e1147d8f47eb8fef93f98a30858192145137d2b2 (patch) | |
tree | 7e1bc0ab3d263e5bd801900195ab310625d9ab59 /crypto/sha512.c | |
parent | d00e708cef16442cabaf23f653baf924f5d66e83 (diff) |
[CRYPTO] digest: Add alignment handling
Some hash modules load/store data words directly. The digest layer
should pass properly aligned buffer to update()/final() method. This
patch also add cra_alignmask to some hash modules.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/sha512.c')
-rw-r--r-- | crypto/sha512.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/sha512.c b/crypto/sha512.c index 3e6e9392310c..7dbec4f6b947 100644 --- a/crypto/sha512.c +++ b/crypto/sha512.c | |||
@@ -281,6 +281,7 @@ static struct crypto_alg sha512 = { | |||
281 | .cra_blocksize = SHA512_HMAC_BLOCK_SIZE, | 281 | .cra_blocksize = SHA512_HMAC_BLOCK_SIZE, |
282 | .cra_ctxsize = sizeof(struct sha512_ctx), | 282 | .cra_ctxsize = sizeof(struct sha512_ctx), |
283 | .cra_module = THIS_MODULE, | 283 | .cra_module = THIS_MODULE, |
284 | .cra_alignmask = 3, | ||
284 | .cra_list = LIST_HEAD_INIT(sha512.cra_list), | 285 | .cra_list = LIST_HEAD_INIT(sha512.cra_list), |
285 | .cra_u = { .digest = { | 286 | .cra_u = { .digest = { |
286 | .dia_digestsize = SHA512_DIGEST_SIZE, | 287 | .dia_digestsize = SHA512_DIGEST_SIZE, |
@@ -295,6 +296,7 @@ static struct crypto_alg sha384 = { | |||
295 | .cra_flags = CRYPTO_ALG_TYPE_DIGEST, | 296 | .cra_flags = CRYPTO_ALG_TYPE_DIGEST, |
296 | .cra_blocksize = SHA384_HMAC_BLOCK_SIZE, | 297 | .cra_blocksize = SHA384_HMAC_BLOCK_SIZE, |
297 | .cra_ctxsize = sizeof(struct sha512_ctx), | 298 | .cra_ctxsize = sizeof(struct sha512_ctx), |
299 | .cra_alignmask = 3, | ||
298 | .cra_module = THIS_MODULE, | 300 | .cra_module = THIS_MODULE, |
299 | .cra_list = LIST_HEAD_INIT(sha384.cra_list), | 301 | .cra_list = LIST_HEAD_INIT(sha384.cra_list), |
300 | .cra_u = { .digest = { | 302 | .cra_u = { .digest = { |