4.9.0
acipher: Add dynamic algorithm selection and decryption support

Add support for new RSA PKCS OAEP algorithms:
- TEE_ALG_RSAES_PKCS1_V1_5
- TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA1
- TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA224
- TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA256
- TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA384
- TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA512

Also add support to select algorithm at runtime. The user can now run
the `optee_example_acipher <key_size> <string to encrypt> <algo name>`
command, and the specified algorithm will be used during
encryption/decryption.

The user can now invoke:
optee_example_acipher <key_size> <string to encrypt> <algo name>

Supported values for <key_size> are:
- 2048 bits
- 3072 bits
- 4096 bits

Supported values for <algo name> are:
- TA_ALG_PKCS1_V1_5
- TA_ALG_OAEP_MGF1_SHA1
- TA_ALG_OAEP_MGF1_SHA224
- TA_ALG_OAEP_MGF1_SHA256
- TA_ALG_OAEP_MGF1_SHA384
- TA_ALG_OAEP_MGF1_SHA512

If no algorithm is specified, TA_ALG_PKCS1_V1_5 is selected by default.

Based on the input, the corresponding algorithm is selected and used for
encryption/decryption operations. This enhancement improves flexibility
by allowing users to test different RSA modes using a single binary.

Signed-off-by: Amey Avinash Raghatate <ameyavinash.raghatate@amd.com>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
3 files changed
tree: 3aaab0147b773a771028e9b17708a5c5f3f7a306
  1. .github/
  2. acipher/
  3. aes/
  4. ecdh/
  5. ecdsa/
  6. hello_world/
  7. hotp/
  8. plugins/
  9. random/
  10. secure_storage/
  11. sha/
  12. sign_verify/
  13. .gitignore
  14. Android.mk
  15. CMakeLists.txt
  16. CMakeToolchain.txt
  17. LICENSE
  18. Makefile
  19. README.md
README.md

OP-TEE Sample Applications

This git contains source code for sample host and Trusted Application that can be used directly in the OP-TEE project.

All official OP-TEE documentation has moved to http://optee.readthedocs.io. The information that used to be here in this git can be found under optee_examples.

// OP-TEE core maintainers