| f9a78287 | 17-Dec-2019 |
Jerome Forissier <jerome@forissier.org> |
core: ltc: add support for SM2 PKE
SM2 is a set of public key cryptographic algorithms based on elliptic curves published by the Chinese Commercial Cryptography Administration Office [1]. The standa
core: ltc: add support for SM2 PKE
SM2 is a set of public key cryptographic algorithms based on elliptic curves published by the Chinese Commercial Cryptography Administration Office [1]. The standard has three main parts which define:
- A Digital Signature Algorithm (part 2) - A Key Exchange Protocol (part 3) - A Public Key Encryption method (part 4)
This commit implements the PKE LibTomcrypt for use by the OP-TEE core. It uses the LibTomCrypt ECC and arithmetic helper functions as well as the OP-TEE hash interface for the SM3 algorithm.
As far as the ECC point encoding goes, only the uncompressed form is supported, as permitted by the standard. In practice, it means that the cipher text always starts with the byte value 0x04. Other forms cannot be decrypted by this implementation.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2d57ba95 | 15-Jun-2015 |
Pascal Brand <pascal.brand@st.com> |
ECC: Update LTC code from branch develop
Synchronize https://github.com/libtom/libtomcrypt, src/pk/ecc, at sha1=aeaa6d4a515f390515c21f1678e11b52b81d1ada
Reviewed-by: Cedric Chaumont <cedric.chaumon
ECC: Update LTC code from branch develop
Synchronize https://github.com/libtom/libtomcrypt, src/pk/ecc, at sha1=aeaa6d4a515f390515c21f1678e11b52b81d1ada
Reviewed-by: Cedric Chaumont <cedric.chaumont@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU) Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|