]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: s5p-sss: Add aes-ctr support
authorChristoph Manszewski <c.manszewski@samsung.com>
Mon, 17 Sep 2018 15:09:30 +0000 (17:09 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 28 Sep 2018 04:46:06 +0000 (12:46 +0800)
commit05d3f26772b1ceb5bbb347e0678511d467da6eb2
tree49ffc723f740631c671e1834f2e70c70773a8e95
parent6dfecdd769c4a14ab7b3e7aba31455a3b2b310a9
crypto: s5p-sss: Add aes-ctr support

Add support for aes counter(ctr) block cipher mode of operation for
Exynos Hardware. In contrast to ecb and cbc modes, aes-ctr allows
encyption/decryption for request sizes not being a multiple of 16(bytes).

Hardware requires block sizes being a multiple of 16(bytes). In order to
achieve this, copy request source and destination memory, and align it's size
to 16. That way hardware processes additional bytes, that are omitted
when copying the result back to its original destination.

Tested on Odroid-U3 with Exynos 4412 CPU, kernel 4.19-rc2 with crypto
run-time self test testmgr.

Signed-off-by: Christoph Manszewski <c.manszewski@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Kamil Konieczny <k.konieczny@partner.samsung.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/s5p-sss.c