We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
首先第一点 1:test_sm2_enc 测试函数中,未对 size_t msglen 赋初始值,而 SM2_decrypt_with_recommended 函数会对改值进行判断操作 'else if (*outlen < (size_t)len)' 。 2:使用 SM2_decrypt_with_recommended前 ,是否需要将 msglen 赋为 明文 msg长度?
若 2 是,SM2_decrypt_with_recommended 函数中 是否真的需要 判断 明文长度 和 密文长度的 合法性? 根据sm2公钥加密算法,msg明文长度确实和密文长度有对应关系,也的确能够从想要得到的msg长度来判断密文是否合法,但是个人觉得,SM2_decrypt_with_recommended 仅 需要执行decode 和 decrypt 即可。至于decrypt 之后 实际得到的明文长度 是否 是 对的,应该由外层调用 SM2_decrypt_with_recommended 者进行判断,SM2_decrypt_with_recommended 只负责私钥解密。
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
首先第一点
1:test_sm2_enc 测试函数中,未对 size_t msglen 赋初始值,而 SM2_decrypt_with_recommended 函数会对改值进行判断操作 'else if (*outlen < (size_t)len)' 。
2:使用 SM2_decrypt_with_recommended前 ,是否需要将 msglen 赋为 明文 msg长度?
若 2 是,SM2_decrypt_with_recommended 函数中 是否真的需要 判断 明文长度 和 密文长度的 合法性?
根据sm2公钥加密算法,msg明文长度确实和密文长度有对应关系,也的确能够从想要得到的msg长度来判断密文是否合法,但是个人觉得,SM2_decrypt_with_recommended 仅 需要执行decode 和 decrypt 即可。至于decrypt 之后 实际得到的明文长度 是否 是 对的,应该由外层调用 SM2_decrypt_with_recommended 者进行判断,SM2_decrypt_with_recommended 只负责私钥解密。
The text was updated successfully, but these errors were encountered: