Skip to content

Commit

Permalink
crypto: seqiv - Use skcipher
Browse files Browse the repository at this point in the history
This patch replaces use of the obsolete blkcipher with skcipher.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Herbert Xu committed Jul 18, 2016
1 parent 0e8bff4 commit ef22871
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions crypto/seqiv.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,16 @@ static int seqiv_aead_encrypt(struct aead_request *req)
info = req->iv;

if (req->src != req->dst) {
struct blkcipher_desc desc = {
.tfm = ctx->null,
};
SKCIPHER_REQUEST_ON_STACK(nreq, ctx->sknull);

err = crypto_blkcipher_encrypt(&desc, req->dst, req->src,
req->assoclen + req->cryptlen);
skcipher_request_set_tfm(nreq, ctx->sknull);
skcipher_request_set_callback(nreq, req->base.flags,
NULL, NULL);
skcipher_request_set_crypt(nreq, req->src, req->dst,
req->assoclen + req->cryptlen,
NULL);

err = crypto_skcipher_encrypt(nreq);
if (err)
return err;
}
Expand Down

0 comments on commit ef22871

Please sign in to comment.