Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283268
b: refs/heads/master
c: 4660720
h: refs/heads/master
v: v3
  • Loading branch information
Jussi Kivilinna authored and Herbert Xu committed Nov 9, 2011
1 parent 43c70be commit 1c426ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b884f8b901b968b90d8d1b82d388583fa1b2605d
refs/heads/master: 4660720df61321f9746353ad3188bf4de2408b67
8 changes: 5 additions & 3 deletions trunk/crypto/lrw.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include <crypto/b128ops.h>
#include <crypto/gf128mul.h>

#define LRW_BLOCK_SIZE 16

struct priv {
struct crypto_cipher *child;
/* optimizes multiplying a random (non incrementing, as at the
Expand Down Expand Up @@ -61,7 +63,7 @@ static int setkey(struct crypto_tfm *parent, const u8 *key,
struct crypto_cipher *child = ctx->child;
int err, i;
be128 tmp = { 0 };
int bsize = crypto_cipher_blocksize(child);
int bsize = LRW_BLOCK_SIZE;

crypto_cipher_clear_flags(child, CRYPTO_TFM_REQ_MASK);
crypto_cipher_set_flags(child, crypto_tfm_get_flags(parent) &
Expand Down Expand Up @@ -134,7 +136,7 @@ static int crypt(struct blkcipher_desc *d,
{
int err;
unsigned int avail;
const int bs = crypto_cipher_blocksize(ctx->child);
const int bs = LRW_BLOCK_SIZE;
struct sinfo s = {
.tfm = crypto_cipher_tfm(ctx->child),
.fn = fn
Expand Down Expand Up @@ -218,7 +220,7 @@ static int init_tfm(struct crypto_tfm *tfm)
if (IS_ERR(cipher))
return PTR_ERR(cipher);

if (crypto_cipher_blocksize(cipher) != 16) {
if (crypto_cipher_blocksize(cipher) != LRW_BLOCK_SIZE) {
*flags |= CRYPTO_TFM_RES_BAD_BLOCK_LEN;
crypto_free_cipher(cipher);
return -EINVAL;
Expand Down

0 comments on commit 1c426ff

Please sign in to comment.