Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于SM4算法中iv值配置支持并发加密时每次加密都采用不同的iv值的问题 #156

Open
shgsky opened this issue Feb 9, 2022 · 2 comments

Comments

@shgsky
Copy link

shgsky commented Feb 9, 2022

根据NIST SP800-38A中对IV的要求,为了保证安全性,每次数据加密使用不同的IV值。但当前SM4算法中IV值,是通过全局变量的方式进行赋值,就无法做到大量敏感数据的并发加密。
image

引用:https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38a.pdf

请问,这块有计划支持iv采用传参的方式进行赋值么?而不是这类全局变量的方式。以支持大量数据并行加密时,每次加密都采用不同的iv值。

感谢!

@xuyang2
Copy link
Contributor

xuyang2 commented Feb 11, 2022

建议内部换成直接用 完成度高的 github.com/emmansun/gmsm/sm4
然后把 github.com/tjfoc/gmsm/sm4 标为 deprecated 不维护

提了个 PR #157
@czdsdo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants