由于我服务端用的加密库是BouncyCastle
SM2加密数据 由C1,C2,C3组成 国密密文的正确排序是 C1+C3+C2
- 我们安全芯片SM2加密处理的密文顺序是 C1+C3+C2 而BC库加密出来的顺序是C1+C2+C3
- 我们安全在C1数据最前面没有04,而BC库加密出来的数据前面有04
- BC库生成SM2公私钥对时
- 私钥的前面 偶尔会多加两个 00 而我们安全芯片 不支持 去掉00就可以
- 公钥的签名偶尔会多加04 而我们安全芯片 不支持 去掉04就可以
由于我服务端用的加密库是BouncyCastle
SM2加密数据 由C1,C2,C3组成 国密密文的正确排序是 C1+C3+C2
转载于:https://my.oschina.net/547217475/blog/2252583