<div class="__aliyun_email_body_block"><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">Plz search "Trusted Platform Module Library" spec rev 1.38 for the references to SM3. Also, I have a working TPM 2.0 hardware showing the capability of support on sm3.</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><br ></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">$tpm2_dump_capability -c algorithms | grep 'hash:\s*set' -B 3<br >TPMA_ALGORITHM for ALG_ID: 0x4 - sha1<br >  asymmetric: clear<br >  symmetric:  clear<br >  hash:       set<br >--<br >TPMA_ALGORITHM for ALG_ID: 0x5 - hmac<br >  asymmetric: clear<br >  symmetric:  clear<br >  hash:       set<br >--<br >TPMA_ALGORITHM for ALG_ID: 0x7 - mgf1<br >  asymmetric: clear<br >  symmetric:  clear<br >  hash:       set<br >--<br >TPMA_ALGORITHM for ALG_ID: 0x8 - keyedhash<br >  asymmetric: clear<br >  symmetric:  clear<br >  hash:       set<br >--<br >TPMA_ALGORITHM for ALG_ID: 0xa - xor<br >  asymmetric: clear<br >  symmetric:  set<br >  hash:       set<br >--<br >TPMA_ALGORITHM for ALG_ID: 0xb - sha256<br >  asymmetric: clear<br >  symmetric:  clear<br >  hash:       set<br >--<br >TPMA_ALGORITHM for ALG_ID: 0x12 - sm3_256<br >  asymmetric: clear<br >  symmetric:  clear<br >  hash:       set<br >--<br >TPMA_ALGORITHM for ALG_ID: 0x20 - kdf1_sp800_56a<br >  asymmetric: clear<br >  symmetric:  clear<br >  hash:       set<br >--<br >TPMA_ALGORITHM for ALG_ID: 0x22 - kdf1_sp800_108<br >  asymmetric: clear<br >  symmetric:  clear<br >  hash:       set<br ></span></div><div  style="clear:both;"><br ></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">Jia</span><div >
        
</div></div><blockquote  style="margin-right:0;margin-top:0;margin-bottom:0;"><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">------------------------------------------------------------------</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">发件人:Weikeng Chen <w.k@berkeley.edu></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">发送时间:2017年10月15日(星期日) 16:47</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">收件人:R0b0t1 <r030t1@gmail.com></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">抄 送:张佳(乾越) <qianyue.zj@alibaba-inc.com>; wk <wk@gnupg.org>; gcrypt-devel <gcrypt-devel@gnupg.org></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">主 题:Re: [PATCH] sm3: implement SM3 hash algorithm</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><br /></span></div>I think it is unlikely that SM3 contains a backdoor.<br ><br >It is intended to be used in governments and mission-critical devices.<br >There is no reason to use something dangerous (then U.S. can break?).<br >And it is generally not that easy to add a backdoor in a symmetric<br >algorithm if we obtain randomness from a physical source.<br ><br ><br >gcrypt cannot have all new functions -- otherwise, why not balloon<br >hashing and scrypt (the latter is used in many kinds of<br >cryptocurrency)?<br ><br ><br ><br >On Sat, Oct 14, 2017 at 1:16 PM, R0b0t1 <r030t1@gmail.com> wrote:<br >> On Sat, Oct 14, 2017 at 12:05 PM, 张佳(乾越) <qianyue.zj@alibaba-inc.com> wrote:<br >>> Hi Werner,<br >>><br >>> This is the review request for SM3 hash algorithm. Plz see the commit<br >>> header and patch for more details.<br >>><br >>> SM3 hash algorithm is already accepted and supported by TPM 2.0 spec.<br >>> So it is necessary to implement this algorithm in a famous open source<br >>> software for checking the digest value computed by TPM.<br >>><br >>> Plz refer to this PR (https://github.com/gpg/libgcrypt/pull/2) for code<br >>> review.<br >>><br >>> Thanks,<br >>> Jia<br >>><br >><br >> Jia,<br >><br >> It is my understanding that SM3 was not accepted into any global TPM<br >> specification and is merely mandated for use within China.<br >><br >> My research on SM3 has turned up only one detailed cryptanalysis of<br >> the function.[1] That cryptanalysis implies that the techniques used<br >> to "strengthen" SM3 do not accomplish what the creators claim, and may<br >> even weaken the hash function when compared to its inspiration, SHA-2.<br >><br >> Less detailed analysis[3] of the claims presented by the creators<br >> reflect poorly on their work. For starters, none of the techniques<br >> meant to increase the security of SM3 are explained. Their utility is<br >> unknown, and a cursory glance shows that in at least one case a round<br >> operation is simplified. Perhaps more distressing is the selection of<br >> constants with no justification.<br >><br >> It seems very likely that the algorithm has undisclosed backdoors.<br >><br >> Also pertinent is the existence of GmSSL,[3] a fork of OpenSSL which<br >> contains various cryptographic standards developed by the Chinese<br >> government that were, presumably, not deemed fit for inclusion in<br >> OpenSSL.<br >><br >> Inclusion of weak cryptography in gcrypt would be a disservice to<br >> those users which trust gcrypt with their life. I understand I am not<br >> the person to whom you addressed your message, nor am I a gcrypt<br >> developer, but I felt it necessary to reply to this conversation.<br >><br >> Respectfully,<br >>      R0b0t1<br >><br >><br >> [1]: https://eprint.iacr.org/2012/274.pdf, also attached.<br >> [2]: https://tinycrypt.wordpress.com/2017/02/22/asmcodes-sm3/<br >> [3]: http://gmssl.org/<br >><br >> _______________________________________________<br >> Gcrypt-devel mailing list<br >> Gcrypt-devel@gnupg.org<br >> http://lists.gnupg.org/mailman/listinfo/gcrypt-devel<br >><br ><br ><br ><br >-- <br ><br >Weikeng Chen @ 795 Soda Hall</blockquote></div>