commit | ade6f848e084d7c63f1e3866d7c059b8a9f9e834 | [log] [tgz] |
---|---|---|
author | Jerome Forissier <jerome@forissier.org> | Thu Dec 12 10:30:49 2019 +0100 |
committer | Jérôme Forissier <jerome@forissier.org> | Tue Dec 17 19:39:59 2019 +0100 |
tree | c0c9a6fd077210699f762a824bce49e0c19814c2 | |
parent | 026e3556652dd5d70fda1304e4639dd8c1a38483 [diff] |
core: crypto: add support for SM4 Adds support for the SM4 cipher [1] using the API defined in the GlobalPlatform TEE Internal Core API v1.2. ECB, CBC and CTR modes are implemented. Other modes are valid but are not included in the GP specification, so they are not considered here. This implementation is based on code published on Gitlab [2]. The project contains no licensing terms, so I contacted the author (goldboar@163.com), asking for permission to re-use the code in OP-TEE under a BSD-2-Clause license. I received the following reply: "[...] If you like you can use it [...]" I have reworked the source to better fit the OP-TEE coding style. I have also added the CTR mode of operation. I do not think we will need to merge any change from upstream in the future. [1] https://tools.ietf.org/html/draft-ribose-cfrg-sm4-10 [2] https://gitlab.com/otpfree/sm234 Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
This git contains source code for the secure side implementation of OP-TEE project.
All official OP-TEE documentation has moved to http://optee.readthedocs.io.
// OP-TEE core maintainers