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

Specify key length for kcapi-enc #150

Closed
ziyao233 opened this issue Mar 29, 2023 · 2 comments
Closed

Specify key length for kcapi-enc #150

ziyao233 opened this issue Mar 29, 2023 · 2 comments

Comments

@ziyao233
Copy link

This issue is similar to #141 .

When working with SM4 algorithm, setsockopt() fails with errno -EINVAL. This is because SM4 supports 16-byte keys only but a 32-byte key is used by kcapi-enc.

An optional solution is to add an option to kcapi-enc to specify key length, imho.

@ziyao233
Copy link
Author

I have created a pull request (#151) for this issue, which adds --key-len option and works well for me. All original tests for kcapi-enc are passed.

@smuellerDD
Copy link
Owner

Applied with few modifications.

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