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

xtest: add SM4 perf test #733

Closed
wants to merge 0 commits into from
Closed

xtest: add SM4 perf test #733

wants to merge 0 commits into from

Conversation

yuzexiyzx
Copy link
Contributor

Add perf test for SM4 algorithm

@@ -203,7 +211,7 @@ static void usage(const char *applet_optname, int keysize, int mode,
fprintf(stderr, " -i|--in-place Use same buffer for input and output (decrypt in place)\n");
fprintf(stderr, " -k SIZE Key size in bits: 128, 192 or 256 [%u]\n", keysize);
fprintf(stderr, " -l LOOP Inner loop iterations [%u]\n", l);
fprintf(stderr, " -m MODE AES mode: ECB, CBC, CTR, XTS, GCM [%s]\n", mode_str(mode));
fprintf(stderr, " -m MODE mode: AES-ECB, AES-CBC, AES-CTR, AES-XTS, AES-GCM, SM4-ECB, SM4-CBC, SM4-CTR, SM4-XTS [%s]\n", mode_str(mode));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. The modes should not be changed. ECB is a mode, AES-ECB is not: it is a combination of a cipher and a mode. Please add a -c|--cipher option with values AES and SM4 (default AES).

(Another option would be to keep your suggestion but change "-m MODE" to "-a ALGO", but I prefer two separate options because no need to expand the list of all combinations).

Also please do not forget to change:

	fprintf(stderr, "AES performance testing tool for OP-TEE\n");

-> "AES/SM4 performance testing..."

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

Successfully merging this pull request may close these issues.

2 participants