crypto: sm2 - remove unnecessary reset operations
authorTianjia Zhang <tianjia.zhang@linux.alibaba.com>
Thu, 15 Oct 2020 09:24:41 +0000 (17:24 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 30 Oct 2020 06:35:02 +0000 (17:35 +1100)
commit1bc608b4655b8b1491fb100f4cf4f15ae64a8698
treef9886c09b765eff3819e8919ae67ea4457ae50d6
parentad0bb4e4d226e76950531cb4260402bbbb8997b5
crypto: sm2 - remove unnecessary reset operations

This is an algorithm optimization. The reset operation when
setting the public key is repeated and redundant, so remove it.
At the same time, `sm2_ecc_os2ec()` is optimized to make the
function more simpler and more in line with the Linux code style.

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/sm2.c