CR50: handle big-endian RSA keys
CR50: handle big-endian RSA keys

The TPM library serializes RSA keys in big-endian format, while
CR50 requires little-endian.

Handle endianness by converting from big to little and back
to big within the _cpri__* layer.

Also modify test code to make copies of static const RSA keys, as
these get placed on read-only memory.

BRANCH=none
BUG=chrome-os-partner:43025,chrome-os-partner:47524,chrome-os-partner:52337
TEST=tests in test/tpm/tpmtest.py pass

Change-Id: Id9cfbe8c99ecaeb02744fbc7554cd48a08bab819
Signed-off-by: nagendra modadugu <5dc366ddbf8fb5981f46478e8436ef712a08b71b@google.com>
Reviewed-on: https://chromium-review.googlesource.com/331740
Commit-Ready: Nagendra Modadugu <5dc366ddbf8fb5981f46478e8436ef712a08b71b@google.com>
Tested-by: Nagendra Modadugu <5dc366ddbf8fb5981f46478e8436ef712a08b71b@google.com>
Reviewed-by: Vadim Bendebury <5515d6d2d0829cbe0dd0dcf2094aaded06d58514@chromium.org>

coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec