mirror of https://github.com/wolfSSL/wolfTPM.git
F-6842 - Share TPM2_XOR_MASK_MAX via header so test matches impl
parent
2ef42a0151
commit
14d02a32b2
|
|
@ -57,13 +57,6 @@
|
|||
/* --- Param Enc/Dec Functions -- */
|
||||
/******************************************************************************/
|
||||
|
||||
/* Maximum XOR mask size. RSA-2048 inSensitive parameter blobs on Create can
|
||||
* exceed MAX_DIGEST_BUFFER (1024), so leave headroom to ~1250 bytes. Keep
|
||||
* stack usage bounded by switching to heap under WOLFTPM_SMALL_STACK. */
|
||||
#ifndef TPM2_XOR_MASK_MAX
|
||||
#define TPM2_XOR_MASK_MAX 1280
|
||||
#endif
|
||||
|
||||
/* XOR parameter encryption/decryption (shared by client and fwTPM).
|
||||
* XOR is symmetric so encrypt and decrypt are the same operation.
|
||||
* nonceA/nonceB order determines direction (caller/TPM or TPM/caller). */
|
||||
|
|
|
|||
|
|
@ -1923,9 +1923,6 @@ static void test_TPM2_ParamEnc_XOR_Vector(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifndef TPM2_XOR_MASK_MAX
|
||||
#define TPM2_XOR_MASK_MAX 1280
|
||||
#endif
|
||||
static void test_TPM2_ParamEnc_XOR_MaskBoundary(void)
|
||||
{
|
||||
#ifndef WOLFTPM2_NO_WOLFCRYPT
|
||||
|
|
|
|||
|
|
@ -30,6 +30,12 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Maximum XOR mask size. RSA-2048 inSensitive parameter blobs on Create can
|
||||
* exceed MAX_DIGEST_BUFFER (1024), so leave headroom to ~1250 bytes. */
|
||||
#ifndef TPM2_XOR_MASK_MAX
|
||||
#define TPM2_XOR_MASK_MAX 1280
|
||||
#endif
|
||||
|
||||
/* XOR parameter encryption/decryption (raw pointer interface).
|
||||
* XOR is symmetric so encrypt and decrypt are the same operation. */
|
||||
WOLFTPM_TEST_API int TPM2_ParamEnc_XOR(
|
||||
|
|
|
|||
Loading…
Reference in New Issue