Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ef22871f authored by Herbert Xu's avatar Herbert Xu
Browse files

crypto: seqiv - Use skcipher



This patch replaces use of the obsolete blkcipher with skcipher.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 0e8bff47
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -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);

		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_blkcipher_encrypt(&desc, req->dst, req->src,
					       req->assoclen + req->cryptlen);
		err = crypto_skcipher_encrypt(nreq);
		if (err)
			return err;
	}