summaryrefslogtreecommitdiff
path: root/crypto/tcrypt.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2016-06-29 19:32:28 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2016-07-01 23:45:20 +0800
commitd858b0713849be51406fe84722d0877fb57d201c (patch)
tree416d9d206fbcbf0e4a12f8b0ce5e3c1746fa713a /crypto/tcrypt.c
parent73f79189603b3cd8af1ba1ad2d71f1b3f0aa796d (diff)
crypto: rsa-pkcs1pad - Avoid copying output when possible
In the vast majority of cases (2^-32 on 32-bit and 2^-64 on 64-bit) cases, the result from encryption/signing will require no padding. This patch makes these two operations write their output directly to the final destination. Only in the exceedingly rare cases where fixup is needed to we copy it out and back to add the leading zeroes. This patch also makes use of the crypto_akcipher_set_crypt API instead of writing the akcipher request directly. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/tcrypt.c')
0 files changed, 0 insertions, 0 deletions