gp: fix endianness of two RSA public exponents

GP tests 30125 (9d-21-98) and 30127 (9d-28-5d) use badly encoded
constants: TEE_ATTR_RSA_PUBLIC_EXPONENT_VALUE_GEN_NOT_ODD (= 65538)
TEE_ATTR_RSA_PUBLIC_EXPONENT_VALUE_NOT_GEN_DEFAULT (= 66001),
respectively.

The values are given in decimal in the test suite documentation and
were erroneously encoded in little endian order in source file
host/xtest/gp/include/xml_datastorage_api.h.

Fix the values by using big endian encoding as expected by the GP API
when big numbers are provided as input to crypto functions.

Fixes the failure of "xtest gp_30125" after OP-TEE OS commit [1] (prior
to that commit, both the code and the test were wrong).

Link: [1] https://github.com/OP-TEE/optee_os/commit/c9366c1eeaa1c3dcecafeb03bef24e9e6fc660c4
Signed-off-by: Jerome Forissier <jerome@forissier.org>
1 file changed
tree: a5b675f9f2a10551ecbf2250d194dd8960c061f5
  1. .github/
  2. cert/
  3. host/
  4. scripts/
  5. ta/
  6. .gitignore
  7. Android.mk
  8. CMakeLists.txt
  9. CMakeToolchain.txt
  10. LICENSE.md
  11. Makefile
  12. README.md
  13. typedefs.checkpatch
README.md

OP-TEE sanity testsuite

This git contains source code for the test suite (xtest) used to test 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_test.

// OP-TEE core maintainers