diff options
author | nagendra modadugu <ngm@google.com> | 2016-02-04 18:03:01 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-02-08 13:47:49 -0800 |
commit | e68019e3492a62980d5303cecb9cc29cf96cc170 (patch) | |
tree | abb6d3f966f7070d37438e031b3a82358ec88b9d /board | |
parent | cb663d93a27702f247fc798e4d0a7068c82dcd0f (diff) | |
download | chrome-ec-e68019e3492a62980d5303cecb9cc29cf96cc170.tar.gz |
CR50: enable the bignum library to handle word un-aligned keys
The TPM2 api does not require keys to be word-aligned,
so have the compiler generate alignment-safe reads where
necessary.
BRANCH=none
BUG=chrome-os-partner:43025,chrome-os-partner:47524
TEST=tests under test/tpm2/ pass, more TCG tests pass.
Change-Id: I247e29f2bec139ab7ed4010ffb58cdae77ba9e0b
Signed-off-by: nagendra modadugu <ngm@google.com>
Reviewed-on: https://chromium-review.googlesource.com/326201
Commit-Ready: Nagendra Modadugu <ngm@google.com>
Tested-by: Nagendra Modadugu <ngm@google.com>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/cr50/tpm2/rsa.c | 221 |
1 files changed, 104 insertions, 117 deletions
diff --git a/board/cr50/tpm2/rsa.c b/board/cr50/tpm2/rsa.c index dfc996bca4..b31a5012fb 100644 --- a/board/cr50/tpm2/rsa.c +++ b/board/cr50/tpm2/rsa.c @@ -74,7 +74,7 @@ CRYPT_RESULT _cpri__EncryptRSA(uint32_t *out_len, uint8_t *out, rsa.e = key->exponent; rsa.N.dmax = key->publicKey->size / sizeof(uint32_t); - rsa.N.d = (uint32_t *) &key->publicKey->buffer; + rsa.N.d = (struct access_helper *) &key->publicKey->buffer; rsa.d.dmax = 0; rsa.d.d = NULL; @@ -101,9 +101,9 @@ CRYPT_RESULT _cpri__DecryptRSA(uint32_t *out_len, uint8_t *out, rsa.e = key->exponent; rsa.N.dmax = key->publicKey->size / sizeof(uint32_t); - rsa.N.d = (uint32_t *) &key->publicKey->buffer; + rsa.N.d = (struct access_helper *) &key->publicKey->buffer; rsa.d.dmax = key->privateKey->size / sizeof(uint32_t); - rsa.d.d = (uint32_t *) &key->privateKey->buffer; + rsa.d.d = (struct access_helper *) &key->privateKey->buffer; if (DCRYPTO_rsa_decrypt(&rsa, out, out_len, in, in_len, padding, hashing, label)) @@ -127,9 +127,9 @@ CRYPT_RESULT _cpri__SignRSA(uint32_t *out_len, uint8_t *out, rsa.e = key->exponent; rsa.N.dmax = key->publicKey->size / sizeof(uint32_t); - rsa.N.d = (uint32_t *) &key->publicKey->buffer; + rsa.N.d = (struct access_helper *) &key->publicKey->buffer; rsa.d.dmax = key->privateKey->size / sizeof(uint32_t); - rsa.d.d = (uint32_t *) &key->privateKey->buffer; + rsa.d.d = (struct access_helper *) &key->privateKey->buffer; if (DCRYPTO_rsa_sign(&rsa, out, out_len, in, in_len, padding, hashing)) return CRYPT_SUCCESS; @@ -153,7 +153,7 @@ CRYPT_RESULT _cpri__ValidateSignatureRSA( rsa.e = key->exponent; rsa.N.dmax = key->publicKey->size / sizeof(uint32_t); - rsa.N.d = (uint32_t *) &key->publicKey->buffer; + rsa.N.d = (struct access_helper *) &key->publicKey->buffer; rsa.d.dmax = 0; rsa.d.d = NULL; @@ -176,136 +176,123 @@ enum { TEST_RSA_KEYGEN = 4 }; -struct TPM2B_aligned { - uint16_t pad; - TPM2B_PUBLIC_KEY_RSA bn; -} __packed __aligned(4); - -static const struct TPM2B_aligned RSA_768_N = { - .bn = { - .t = {96, { - 0x69, 0x85, 0x39, 0x2d, 0x78, 0x2b, 0x90, 0x75, - 0xe1, 0x7c, 0xc1, 0x7b, 0xbd, 0x5b, 0xdd, 0xfd, - 0x00, 0x36, 0xf7, 0x38, 0x74, 0x33, 0x2b, 0xa8, - 0x53, 0x89, 0x10, 0xa7, 0x2d, 0x3c, 0xe6, 0x00, - 0xa3, 0xe5, 0x8b, 0x5f, 0xed, 0x77, 0x32, 0xc0, - 0x0f, 0xe2, 0x2c, 0x51, 0x1b, 0x46, 0xba, 0x18, - 0xc0, 0x4e, 0x1b, 0x44, 0xdf, 0x94, 0xcc, 0x15, - 0xe1, 0x67, 0x48, 0x3a, 0x12, 0xc4, 0x0c, 0x82, - 0xd2, 0xfa, 0xfe, 0x74, 0x6e, 0x49, 0xa4, 0x8b, - 0x64, 0xc2, 0x3b, 0x33, 0x36, 0x72, 0x24, 0xdb, - 0x17, 0x86, 0x5a, 0x35, 0xd2, 0x23, 0x20, 0xd4, - 0x7c, 0xf0, 0x32, 0xd9, 0x46, 0xed, 0xdb, 0xb0 - } +static const TPM2B_PUBLIC_KEY_RSA RSA_768_N = { + .t = {96, { + 0x69, 0x85, 0x39, 0x2d, 0x78, 0x2b, 0x90, 0x75, + 0xe1, 0x7c, 0xc1, 0x7b, 0xbd, 0x5b, 0xdd, 0xfd, + 0x00, 0x36, 0xf7, 0x38, 0x74, 0x33, 0x2b, 0xa8, + 0x53, 0x89, 0x10, 0xa7, 0x2d, 0x3c, 0xe6, 0x00, + 0xa3, 0xe5, 0x8b, 0x5f, 0xed, 0x77, 0x32, 0xc0, + 0x0f, 0xe2, 0x2c, 0x51, 0x1b, 0x46, 0xba, 0x18, + 0xc0, 0x4e, 0x1b, 0x44, 0xdf, 0x94, 0xcc, 0x15, + 0xe1, 0x67, 0x48, 0x3a, 0x12, 0xc4, 0x0c, 0x82, + 0xd2, 0xfa, 0xfe, 0x74, 0x6e, 0x49, 0xa4, 0x8b, + 0x64, 0xc2, 0x3b, 0x33, 0x36, 0x72, 0x24, 0xdb, + 0x17, 0x86, 0x5a, 0x35, 0xd2, 0x23, 0x20, 0xd4, + 0x7c, 0xf0, 0x32, 0xd9, 0x46, 0xed, 0xdb, 0xb0 } } }; -static const struct TPM2B_aligned RSA_768_D = { - .bn = { - .t = {96, { - 0x01, 0x40, 0x76, 0x7b, 0x41, 0xd6, 0xd9, 0x17, - 0xfe, 0x52, 0x6d, 0xdd, 0x24, 0x70, 0xbc, 0x97, - 0x7e, 0xcf, 0x54, 0x22, 0x4c, 0x71, 0x29, 0xf5, - 0xb2, 0xe2, 0xf6, 0xf8, 0x8b, 0x9e, 0x20, 0x1a, - 0x1e, 0x67, 0xee, 0x59, 0xf9, 0x83, 0x6b, 0x91, - 0x8d, 0xdf, 0x03, 0xfc, 0xdd, 0x0f, 0x35, 0xd7, - 0xa2, 0x5d, 0x06, 0x3f, 0x45, 0xb9, 0xb0, 0x23, - 0x90, 0x7b, 0x11, 0x32, 0xc1, 0xf2, 0x12, 0xdb, - 0x61, 0xf9, 0xa7, 0x31, 0x24, 0xc8, 0x66, 0x4e, - 0x49, 0x72, 0xb9, 0xce, 0xa6, 0x5b, 0xab, 0x46, - 0x45, 0xdf, 0x75, 0x76, 0x3e, 0xd3, 0x42, 0x9f, - 0x5c, 0x1b, 0x8c, 0x25, 0x50, 0xb9, 0xad, 0xae - } +static const TPM2B_PUBLIC_KEY_RSA RSA_768_D = { + .t = {96, { + 0x01, 0x40, 0x76, 0x7b, 0x41, 0xd6, 0xd9, 0x17, + 0xfe, 0x52, 0x6d, 0xdd, 0x24, 0x70, 0xbc, 0x97, + 0x7e, 0xcf, 0x54, 0x22, 0x4c, 0x71, 0x29, 0xf5, + 0xb2, 0xe2, 0xf6, 0xf8, 0x8b, 0x9e, 0x20, 0x1a, + 0x1e, 0x67, 0xee, 0x59, 0xf9, 0x83, 0x6b, 0x91, + 0x8d, 0xdf, 0x03, 0xfc, 0xdd, 0x0f, 0x35, 0xd7, + 0xa2, 0x5d, 0x06, 0x3f, 0x45, 0xb9, 0xb0, 0x23, + 0x90, 0x7b, 0x11, 0x32, 0xc1, 0xf2, 0x12, 0xdb, + 0x61, 0xf9, 0xa7, 0x31, 0x24, 0xc8, 0x66, 0x4e, + 0x49, 0x72, 0xb9, 0xce, 0xa6, 0x5b, 0xab, 0x46, + 0x45, 0xdf, 0x75, 0x76, 0x3e, 0xd3, 0x42, 0x9f, + 0x5c, 0x1b, 0x8c, 0x25, 0x50, 0xb9, 0xad, 0xae } } }; -static const struct TPM2B_aligned RSA_2048_N = { - .bn = { - .t = {256, { - 0x99, 0xa9, 0x93, 0xdf, 0xe8, 0xde, 0x41, 0x07, - 0xe9, 0xb1, 0x4f, 0x53, 0xa6, 0x11, 0xe3, 0x67, - 0x88, 0xc5, 0x9a, 0x57, 0xa5, 0x38, 0x1f, 0x69, - 0x51, 0xf2, 0xa7, 0xb5, 0x6a, 0xd2, 0x1a, 0xf2, - 0x0c, 0x62, 0xad, 0x33, 0x1f, 0x82, 0x21, 0x4a, - 0x72, 0xb3, 0x6e, 0xba, 0xfd, 0x66, 0x3e, 0xef, - 0x40, 0x78, 0xa7, 0x37, 0x97, 0x4a, 0x74, 0x63, - 0x23, 0x05, 0x2e, 0x55, 0x6d, 0x36, 0xd0, 0xb7, - 0x8c, 0xb7, 0x83, 0x60, 0x3b, 0xa1, 0x58, 0x5d, - 0xdc, 0xef, 0xf7, 0x2c, 0x5e, 0x05, 0x27, 0xbc, - 0xb0, 0x4d, 0xc9, 0xff, 0x04, 0x50, 0x22, 0x97, - 0xe7, 0x15, 0x66, 0xa5, 0x24, 0x0e, 0x86, 0xa6, - 0x36, 0x9c, 0x92, 0xa2, 0x16, 0x51, 0xed, 0xc2, - 0xea, 0xbf, 0xf4, 0xb2, 0x5e, 0x3a, 0xd7, 0xc5, - 0xa3, 0xfa, 0xf0, 0xcf, 0xcf, 0x7b, 0xc8, 0x5c, - 0x07, 0xe2, 0xcc, 0xa8, 0xb8, 0x36, 0x76, 0xb1, - 0xc9, 0xbb, 0x48, 0x38, 0xbe, 0x0b, 0x57, 0xce, - 0x05, 0x2d, 0xf1, 0xdb, 0x7b, 0x94, 0xb6, 0xcd, - 0x3a, 0xa8, 0x50, 0x49, 0xca, 0x18, 0xb3, 0x52, - 0x18, 0x49, 0xde, 0x10, 0xf8, 0x41, 0x40, 0x6e, - 0x51, 0xaf, 0xdd, 0x06, 0xc3, 0x30, 0xc7, 0x57, - 0x6b, 0xd4, 0xdc, 0x10, 0x46, 0x30, 0x04, 0x23, - 0x98, 0xc0, 0xf0, 0xb4, 0xeb, 0x5d, 0xc9, 0x6e, - 0x50, 0x1f, 0xd7, 0xd9, 0xac, 0xf2, 0x0d, 0x06, - 0xe3, 0x9b, 0x5e, 0xde, 0x2a, 0xaa, 0xb1, 0xaf, - 0xd6, 0x97, 0x68, 0x2d, 0xeb, 0x0c, 0x7b, 0x75, - 0x49, 0x23, 0x64, 0xbe, 0x90, 0x53, 0x82, 0x99, - 0xa2, 0x50, 0x78, 0x0c, 0x9f, 0x72, 0xc1, 0x0a, - 0x0f, 0x32, 0x75, 0xed, 0x1f, 0x6e, 0xef, 0x2c, - 0x2e, 0x1d, 0x4c, 0x19, 0x85, 0x5c, 0x90, 0x95, - 0xe3, 0x4b, 0x86, 0xf5, 0xb7, 0x9f, 0x73, 0xcd, - 0xbe, 0x15, 0x8e, 0x43, 0x2e, 0x61, 0xd7, 0x9c - } +static const TPM2B_PUBLIC_KEY_RSA RSA_2048_N = { + .t = {256, { + 0x99, 0xa9, 0x93, 0xdf, 0xe8, 0xde, 0x41, 0x07, + 0xe9, 0xb1, 0x4f, 0x53, 0xa6, 0x11, 0xe3, 0x67, + 0x88, 0xc5, 0x9a, 0x57, 0xa5, 0x38, 0x1f, 0x69, + 0x51, 0xf2, 0xa7, 0xb5, 0x6a, 0xd2, 0x1a, 0xf2, + 0x0c, 0x62, 0xad, 0x33, 0x1f, 0x82, 0x21, 0x4a, + 0x72, 0xb3, 0x6e, 0xba, 0xfd, 0x66, 0x3e, 0xef, + 0x40, 0x78, 0xa7, 0x37, 0x97, 0x4a, 0x74, 0x63, + 0x23, 0x05, 0x2e, 0x55, 0x6d, 0x36, 0xd0, 0xb7, + 0x8c, 0xb7, 0x83, 0x60, 0x3b, 0xa1, 0x58, 0x5d, + 0xdc, 0xef, 0xf7, 0x2c, 0x5e, 0x05, 0x27, 0xbc, + 0xb0, 0x4d, 0xc9, 0xff, 0x04, 0x50, 0x22, 0x97, + 0xe7, 0x15, 0x66, 0xa5, 0x24, 0x0e, 0x86, 0xa6, + 0x36, 0x9c, 0x92, 0xa2, 0x16, 0x51, 0xed, 0xc2, + 0xea, 0xbf, 0xf4, 0xb2, 0x5e, 0x3a, 0xd7, 0xc5, + 0xa3, 0xfa, 0xf0, 0xcf, 0xcf, 0x7b, 0xc8, 0x5c, + 0x07, 0xe2, 0xcc, 0xa8, 0xb8, 0x36, 0x76, 0xb1, + 0xc9, 0xbb, 0x48, 0x38, 0xbe, 0x0b, 0x57, 0xce, + 0x05, 0x2d, 0xf1, 0xdb, 0x7b, 0x94, 0xb6, 0xcd, + 0x3a, 0xa8, 0x50, 0x49, 0xca, 0x18, 0xb3, 0x52, + 0x18, 0x49, 0xde, 0x10, 0xf8, 0x41, 0x40, 0x6e, + 0x51, 0xaf, 0xdd, 0x06, 0xc3, 0x30, 0xc7, 0x57, + 0x6b, 0xd4, 0xdc, 0x10, 0x46, 0x30, 0x04, 0x23, + 0x98, 0xc0, 0xf0, 0xb4, 0xeb, 0x5d, 0xc9, 0x6e, + 0x50, 0x1f, 0xd7, 0xd9, 0xac, 0xf2, 0x0d, 0x06, + 0xe3, 0x9b, 0x5e, 0xde, 0x2a, 0xaa, 0xb1, 0xaf, + 0xd6, 0x97, 0x68, 0x2d, 0xeb, 0x0c, 0x7b, 0x75, + 0x49, 0x23, 0x64, 0xbe, 0x90, 0x53, 0x82, 0x99, + 0xa2, 0x50, 0x78, 0x0c, 0x9f, 0x72, 0xc1, 0x0a, + 0x0f, 0x32, 0x75, 0xed, 0x1f, 0x6e, 0xef, 0x2c, + 0x2e, 0x1d, 0x4c, 0x19, 0x85, 0x5c, 0x90, 0x95, + 0xe3, 0x4b, 0x86, 0xf5, 0xb7, 0x9f, 0x73, 0xcd, + 0xbe, 0x15, 0x8e, 0x43, 0x2e, 0x61, 0xd7, 0x9c } } }; -static const struct TPM2B_aligned RSA_2048_D = { - .bn = { - .t = {256, { - 0xf5, 0x95, 0x99, 0xca, 0x31, 0x84, 0x66, 0x4c, - 0xa9, 0x29, 0x24, 0x74, 0x22, 0x29, 0xb4, 0x64, - 0x5b, 0x22, 0xeb, 0x5d, 0x2f, 0xe3, 0x62, 0x21, - 0x02, 0x16, 0x33, 0x16, 0xe4, 0xad, 0x10, 0x52, - 0x3f, 0xf0, 0xf1, 0x86, 0x68, 0x54, 0x47, 0x24, - 0xcc, 0x5c, 0x08, 0x82, 0x0f, 0x68, 0xdd, 0x79, - 0x55, 0x11, 0x07, 0x6d, 0x56, 0x89, 0x30, 0xf1, - 0x7f, 0xaf, 0xb1, 0xb8, 0x41, 0xe8, 0x7a, 0x82, - 0x03, 0x1a, 0x95, 0xd7, 0x00, 0x7c, 0xb7, 0x04, - 0xee, 0x8e, 0x9b, 0xbc, 0x4f, 0xdf, 0xa8, 0x38, - 0xea, 0xbf, 0xfb, 0x79, 0xa0, 0xd3, 0xd6, 0xc2, - 0x1f, 0x67, 0xa2, 0x88, 0x2b, 0x1d, 0x23, 0xc6, - 0x19, 0xfc, 0x27, 0x45, 0xcf, 0xbd, 0xc7, 0xe9, - 0x6e, 0x7a, 0xe2, 0x84, 0x4c, 0x9c, 0x16, 0x65, - 0xb0, 0xa6, 0x88, 0xc5, 0xbe, 0x30, 0x70, 0xb9, - 0xc6, 0x6d, 0x3f, 0xf5, 0xcd, 0x52, 0x97, 0x54, - 0x15, 0x26, 0xd2, 0x06, 0x82, 0xcc, 0xe7, 0x02, - 0x1a, 0x23, 0xb8, 0x0a, 0x71, 0xde, 0x91, 0x82, - 0xe4, 0x1e, 0xbe, 0x67, 0xeb, 0x94, 0x24, 0x22, - 0xe7, 0x27, 0xfa, 0x52, 0xf2, 0x94, 0x5e, 0x6e, - 0x85, 0xc1, 0x47, 0x42, 0xdc, 0xae, 0x8b, 0xaf, - 0x4e, 0x32, 0xc6, 0x8d, 0xd3, 0xc0, 0xa2, 0x6b, - 0x02, 0x96, 0x76, 0x0a, 0x96, 0x87, 0x16, 0x35, - 0xc1, 0xea, 0xf7, 0x91, 0xa4, 0xa3, 0x1b, 0x40, - 0xc0, 0x95, 0x20, 0x14, 0x9f, 0x32, 0xad, 0x39, - 0x19, 0x29, 0xea, 0x80, 0x33, 0x2c, 0x31, 0x86, - 0xca, 0x5e, 0x89, 0xf0, 0x74, 0xdf, 0x8f, 0xdc, - 0xa3, 0xf3, 0xbe, 0x26, 0xd0, 0xa3, 0xb4, 0x7c, - 0x6e, 0xdf, 0xad, 0xdb, 0x26, 0xf3, 0xaa, 0xfb, - 0x68, 0x56, 0x43, 0xb9, 0x7f, 0x19, 0x70, 0x67, - 0x5a, 0x66, 0x15, 0x6f, 0xe2, 0x14, 0x8f, 0xbc, - 0x89, 0x8b, 0x4a, 0xdf, 0x1f, 0x02, 0x9d, 0x4e - } +static const TPM2B_PUBLIC_KEY_RSA RSA_2048_D = { + .t = {256, { + 0xf5, 0x95, 0x99, 0xca, 0x31, 0x84, 0x66, 0x4c, + 0xa9, 0x29, 0x24, 0x74, 0x22, 0x29, 0xb4, 0x64, + 0x5b, 0x22, 0xeb, 0x5d, 0x2f, 0xe3, 0x62, 0x21, + 0x02, 0x16, 0x33, 0x16, 0xe4, 0xad, 0x10, 0x52, + 0x3f, 0xf0, 0xf1, 0x86, 0x68, 0x54, 0x47, 0x24, + 0xcc, 0x5c, 0x08, 0x82, 0x0f, 0x68, 0xdd, 0x79, + 0x55, 0x11, 0x07, 0x6d, 0x56, 0x89, 0x30, 0xf1, + 0x7f, 0xaf, 0xb1, 0xb8, 0x41, 0xe8, 0x7a, 0x82, + 0x03, 0x1a, 0x95, 0xd7, 0x00, 0x7c, 0xb7, 0x04, + 0xee, 0x8e, 0x9b, 0xbc, 0x4f, 0xdf, 0xa8, 0x38, + 0xea, 0xbf, 0xfb, 0x79, 0xa0, 0xd3, 0xd6, 0xc2, + 0x1f, 0x67, 0xa2, 0x88, 0x2b, 0x1d, 0x23, 0xc6, + 0x19, 0xfc, 0x27, 0x45, 0xcf, 0xbd, 0xc7, 0xe9, + 0x6e, 0x7a, 0xe2, 0x84, 0x4c, 0x9c, 0x16, 0x65, + 0xb0, 0xa6, 0x88, 0xc5, 0xbe, 0x30, 0x70, 0xb9, + 0xc6, 0x6d, 0x3f, 0xf5, 0xcd, 0x52, 0x97, 0x54, + 0x15, 0x26, 0xd2, 0x06, 0x82, 0xcc, 0xe7, 0x02, + 0x1a, 0x23, 0xb8, 0x0a, 0x71, 0xde, 0x91, 0x82, + 0xe4, 0x1e, 0xbe, 0x67, 0xeb, 0x94, 0x24, 0x22, + 0xe7, 0x27, 0xfa, 0x52, 0xf2, 0x94, 0x5e, 0x6e, + 0x85, 0xc1, 0x47, 0x42, 0xdc, 0xae, 0x8b, 0xaf, + 0x4e, 0x32, 0xc6, 0x8d, 0xd3, 0xc0, 0xa2, 0x6b, + 0x02, 0x96, 0x76, 0x0a, 0x96, 0x87, 0x16, 0x35, + 0xc1, 0xea, 0xf7, 0x91, 0xa4, 0xa3, 0x1b, 0x40, + 0xc0, 0x95, 0x20, 0x14, 0x9f, 0x32, 0xad, 0x39, + 0x19, 0x29, 0xea, 0x80, 0x33, 0x2c, 0x31, 0x86, + 0xca, 0x5e, 0x89, 0xf0, 0x74, 0xdf, 0x8f, 0xdc, + 0xa3, 0xf3, 0xbe, 0x26, 0xd0, 0xa3, 0xb4, 0x7c, + 0x6e, 0xdf, 0xad, 0xdb, 0x26, 0xf3, 0xaa, 0xfb, + 0x68, 0x56, 0x43, 0xb9, 0x7f, 0x19, 0x70, 0x67, + 0x5a, 0x66, 0x15, 0x6f, 0xe2, 0x14, 0x8f, 0xbc, + 0x89, 0x8b, 0x4a, 0xdf, 0x1f, 0x02, 0x9d, 0x4e } } }; static const RSA_KEY RSA_768 = { - 65537, (TPM2B *) &RSA_768_N.bn.b, (TPM2B *) &RSA_768_D.bn.b + 65537, (TPM2B *) &RSA_768_N.b, (TPM2B *) &RSA_768_D.b }; static const RSA_KEY RSA_2048 = { - 65537, (TPM2B *) &RSA_2048_N.bn.b, (TPM2B *) &RSA_2048_D.bn.b + 65537, (TPM2B *) &RSA_2048_N.b, (TPM2B *) &RSA_2048_D.b }; #define MAX_MSG_BYTES RSA_MAX_BYTES |