-
Notifications
You must be signed in to change notification settings - Fork 163
base_sha: Add support for basic SHA algorithms #131
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
Conversation
Add support for new basic SHA algorithms: - TEE_ALG_SHA1 - TEE_ALG_SHA224 - TEE_ALG_SHA256 - TEE_ALG_SHA384 - TEE_ALG_SHA512 - TEE_ALG_SHA3_224 - TEE_ALG_SHA3_256 - TEE_ALG_SHA3_384 - TEE_ALG_SHA3_512 - TEE_ALG_SHAKE128 - TEE_ALG_SHAKE256 Also add support to select algorithm at runtime. The user can now run the `optee_example_base_sha <string to encrypt> <algo name>` command, and the specified algorithm will be used for computing digest. The user can now invoke: optee_example_base_sha <string to encrypt> <algo name> Supported values for <algo name> are: - TA_ALG_SHA1 - TA_ALG_SHA224 - TA_ALG_SHA256 - TA_ALG_SHA384 - TA_ALG_SHA512 - TA_ALG_SHA3_224 - TA_ALG_SHA3_256 - TA_ALG_SHA3_384 - TA_ALG_SHA3_512 - TA_ALG_SHAKE128 - TA_ALG_SHAKE256 If no algorithm is specified, TA_ALG_SHA256 is selected by default. Based on the input, the corresponding algorithm is selected and used for computing digest operations. This enhancement improves flexibility by allowing users to test different basic SHA modes using a single binary. Signed-off-by: Amey Avinash Raghatate <[email protected]>
Changes: - Sort header files alphabetically - Annotate unused function arguments with __unused - Declare and initialize local variables at the beginning of blocks - Remove unnecessary casting Signed-off-by: Amey Avinash Raghatate <[email protected]>
0e79111
to
1f269a8
Compare
@jenswi-linaro, @amey-raghatate has addressed the review comments. |
@jenswi-linaro, |
This pull request has been marked as a stale pull request because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this pull request will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time. |
Add new example for basic SHA algorithms:
Also add support to select algorithm at runtime. The user can now run the
optee_example_base_sha <string to encrypt> <algo name>
command, and the specified algorithm will be used for computing digest.The user can now invoke:
optee_example_base_sha
Supported values for are:
If no algorithm is specified, TA_ALG_SHA256 is selected by default.
Based on the input, the corresponding algorithm is selected and used for computing digest operations. This enhancement improves flexibility by allowing users to test different basic SHA modes using a single binary.