GmSSL icon indicating copy to clipboard operation
GmSSL copied to clipboard

SMS4-ECB 参数iv必须传,不然会挂掉。 SMS4-ECB 传递iv后,返回值为null。

Open qhsword opened this issue 4 years ago • 5 comments

Describe the bug SMS4-ECB 参数iv必须传,不然会挂掉。 SMS4-ECB 传递iv后,返回值为null。

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Environments

  • OS: windows10
  • GmSSL-JNI API/1.1 2017-09-01,
  • GmSSL 2.5.4 - OpenSSL 1.1.0d 19 Jun 2019,
  • compiler: cl " "VC-WIN64A,
  • built on: reproducible build, date unspecified,
  • platform: ,
  • OPENSSLDIR: "C:\Program Files\Common Files\SSL",
  • ENGINESDIR: "C:\Program Files\GmSSL\lib\engines-1_1"

Additional context Add any other context about the problem here.

qhsword avatar Aug 03 '21 02:08 qhsword

Marked as stale issue. Will be closed later if no activity for a while.

github-actions[bot] avatar Nov 07 '21 00:11 github-actions[bot]

SMS4-ECB 内部会修改你的iv值,所以你传入的iv必须先拷贝一份,然后把拷贝部分传入,不然你的原始iv会被修改。

Desongyao avatar Nov 16 '21 07:11 Desongyao

CBC, OFB, CFB ,CTR 经过测试都可以。 ECB 会出现 core dump

qhsword avatar Nov 20 '21 10:11 qhsword

这个问题啥时间可以修复呢? 另外,对比了一下 Java中的 bc 生成的,发现Java生成的字节数都是16倍数,而gmssl生成的,非 cbc模式下是跟原始内容长度一致,cbc是16的倍数。也就是说两者只有在 cbc模式下生成的数据才能互认

qhsword avatar Nov 25 '21 23:11 qhsword

Marked as stale issue. Will be closed later if no activity for a while.

github-actions[bot] avatar Feb 27 '22 00:02 github-actions[bot]