summaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorSalvatore Benedetto <salvatore.benedetto@intel.com>2016-07-07 15:52:17 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2016-07-11 18:03:11 +0800
commitbd76ad4abfdccd26a9ac11214aa715e83bc8e808 (patch)
tree919bd713368dcf7a71829e40f53fc2d0ad98c077 /drivers/crypto
parentc9839143ebbf5e821128da44f7e271d745aab19e (diff)
downloadlinux-bd76ad4abfdccd26a9ac11214aa715e83bc8e808.tar.gz
linux-bd76ad4abfdccd26a9ac11214aa715e83bc8e808.tar.bz2
linux-bd76ad4abfdccd26a9ac11214aa715e83bc8e808.zip
crypto: qat - Stop dropping leading zeros from RSA output
There is not need to drop leading zeros from the RSA output operations results. Signed-off-by: Salvatore Benedetto <salvatore.benedetto@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/qat/qat_common/qat_asym_algs.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/drivers/crypto/qat/qat_common/qat_asym_algs.c b/drivers/crypto/qat/qat_common/qat_asym_algs.c
index 3d56fb82f48a..0d35dca2e925 100644
--- a/drivers/crypto/qat/qat_common/qat_asym_algs.c
+++ b/drivers/crypto/qat/qat_common/qat_asym_algs.c
@@ -571,32 +571,12 @@ static void qat_rsa_cb(struct icp_qat_fw_pke_resp *resp)
areq->dst_len = req->ctx.rsa->key_sz;
if (req->dst_align) {
- char *ptr = req->dst_align;
-
- while (!(*ptr) && areq->dst_len) {
- areq->dst_len--;
- ptr++;
- }
-
- if (areq->dst_len != req->ctx.rsa->key_sz)
- memmove(req->dst_align, ptr, areq->dst_len);
-
scatterwalk_map_and_copy(req->dst_align, areq->dst, 0,
areq->dst_len, 1);
dma_free_coherent(dev, req->ctx.rsa->key_sz, req->dst_align,
req->out.rsa.enc.c);
} else {
- char *ptr = sg_virt(areq->dst);
-
- while (!(*ptr) && areq->dst_len) {
- areq->dst_len--;
- ptr++;
- }
-
- if (sg_virt(areq->dst) != ptr && areq->dst_len)
- memmove(sg_virt(areq->dst), ptr, areq->dst_len);
-
dma_unmap_single(dev, req->out.rsa.enc.c, req->ctx.rsa->key_sz,
DMA_FROM_DEVICE);
}