<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/crypto/sm2.c, branch linux-5.13.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.13.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.13.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-07-14T15:06:44Z</updated>
<entry>
<title>crypto: sm2 - fix a memory leak in sm2</title>
<updated>2021-07-14T15:06:44Z</updated>
<author>
<name>Hongbo Li</name>
</author>
<published>2021-06-04T06:30:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1f8d5a578c87c6cbe2f91713f15e19c798af6d49'/>
<id>urn:sha1:1f8d5a578c87c6cbe2f91713f15e19c798af6d49</id>
<content type='text'>
[ Upstream commit 5cd259ca5d466f65ffd21e2e2fa00fb648a8c555 ]

SM2 module alloc ec-&gt;Q in sm2_set_pub_key(), when doing alg test in
test_akcipher_one(), it will set public key for every test vector,
and don't free ec-&gt;Q. This will cause a memory leak.

This patch alloc ec-&gt;Q in sm2_ec_ctx_init().

Fixes: ea7ecb66440b ("crypto: sm2 - introduce OSCCA SM2 asymmetric cipher algorithm")
Signed-off-by: Hongbo Li &lt;herberthbli@tencent.com&gt;
Reviewed-by: Tianjia Zhang &lt;tianjia.zhang@linux.alibaba.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>crypto: sm2 - remove unnecessary reset operations</title>
<updated>2020-10-30T06:35:02Z</updated>
<author>
<name>Tianjia Zhang</name>
</author>
<published>2020-10-15T09:24:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1bc608b4655b8b1491fb100f4cf4f15ae64a8698'/>
<id>urn:sha1:1bc608b4655b8b1491fb100f4cf4f15ae64a8698</id>
<content type='text'>
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 &lt;tianjia.zhang@linux.alibaba.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: sm2 - introduce OSCCA SM2 asymmetric cipher algorithm</title>
<updated>2020-09-25T07:48:54Z</updated>
<author>
<name>Tianjia Zhang</name>
</author>
<published>2020-09-20T16:20:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ea7ecb66440b37c035e899c60ceaf7a03d364930'/>
<id>urn:sha1:ea7ecb66440b37c035e899c60ceaf7a03d364930</id>
<content type='text'>
This new module implement the SM2 public key algorithm. It was
published by State Encryption Management Bureau, China.
List of specifications for SM2 elliptic curve public key cryptography:

* GM/T 0003.1-2012
* GM/T 0003.2-2012
* GM/T 0003.3-2012
* GM/T 0003.4-2012
* GM/T 0003.5-2012

IETF: https://tools.ietf.org/html/draft-shen-sm2-ecdsa-02
oscca: http://www.oscca.gov.cn/sca/xxgk/2010-12/17/content_1002386.shtml
scctc: http://www.gmbz.org.cn/main/bzlb.html

Signed-off-by: Tianjia Zhang &lt;tianjia.zhang@linux.alibaba.com&gt;
Tested-by: Xufeng Zhang &lt;yunbo.xufeng@linux.alibaba.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
