diff options
author | nagendra modadugu <ngm@google.com> | 2016-01-13 11:16:31 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-01-19 14:24:36 -0800 |
commit | 5496242945e0c37deede4d06f95754be69411ae9 (patch) | |
tree | ca20824e70b4ace586eafd8d0e0c682cbd335d7d /board | |
parent | fac21172bc7fc59d07a8b99b3b05f713a4e3418a (diff) | |
download | chrome-ec-5496242945e0c37deede4d06f95754be69411ae9.tar.gz |
Move platform independent stub calls back to
the third_party tpm library.
Some files in the third_party TPM2 source are
omitted from compilation (e.g. CpriHash.c) as they
contain platform dependent code. Subsequently all
the functions necessary for compilation were moved
to stubs.c. However, some of these functions are
platform independent, and should remain in the
third_party implementation.
The corresponding change CL:321375 adds such functions
to third_party/tpm.
TEST=compilation succeeds
BRANCH=none
BUG=chrome-os-partner:43025,chrome-os-partner:47524
CQ-DEPEND=CL:321375
Signed-off-by: nagendra modadugu <ngm@google.com>
Change-Id: I6a41085332c94dcbe7ecfdeceea0a7015e4ac693
Reviewed-on: https://chromium-review.googlesource.com/321930
Commit-Ready: Nagendra Modadugu <ngm@google.com>
Tested-by: Nagendra Modadugu <ngm@google.com>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/cr50/tpm2/stubs.c | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/board/cr50/tpm2/stubs.c b/board/cr50/tpm2/stubs.c index 08ea641d61..702fd502f2 100644 --- a/board/cr50/tpm2/stubs.c +++ b/board/cr50/tpm2/stubs.c @@ -22,17 +22,6 @@ CRYPT_RESULT _cpri__C_2_2_KeyExchange( return CRYPT_FAIL; } -UINT16 _cpri__CompleteHMAC( - CPRI_HASH_STATE * hashState, // IN: the state of hash stack - TPM2B * oPadKey, // IN: the HMAC key in oPad format - UINT32 dOutSize, // IN: size of digest buffer - BYTE * dOut // OUT: hash digest - ) -{ - ecprintf("%s called\n", __func__); - return -1; -} - CRYPT_RESULT _cpri__DrbgGetPutState( GET_PUT direction, int bufferSize, @@ -64,14 +53,6 @@ UINT32 _cpri__EccGetCurveCount( return -1; } -const ECC_CURVE *_cpri__EccGetParametersByCurveId( - TPM_ECC_CURVE curveId // IN: the curveID - ) -{ - ecprintf("%s called\n", __func__); - return NULL; -} - BOOL _cpri__EccIsPointOnCurve( TPM_ECC_CURVE curveId, // IN: the curve selector TPMS_ECC_POINT * Q // IN: the point. @@ -128,27 +109,6 @@ CRYPT_RESULT _cpri__GenerateKeyRSA( return CRYPT_FAIL; } -UINT16 _cpri__GenerateSeededRandom( - INT32 randomSize, // IN: the size of the request - BYTE * random, // OUT: receives the data - TPM_ALG_ID hashAlg, // IN: used by KDF version but not here - TPM2B * seed, // IN: the seed value - const char *label, // IN: a label string (optional) - TPM2B * partyU, // IN: other data (oprtional) - TPM2B * partyV // IN: still more (optional) - ) -{ - ecprintf("%s called\n", __func__); - return -1; -} - -TPM_ECC_CURVE _cpri__GetCurveIdByIndex( - UINT16 i) -{ - ecprintf("%s called\n", __func__); - return TPM_ECC_NONE; -} - CRYPT_RESULT _cpri__GetEphemeralEcc( TPMS_ECC_POINT * Qout, // OUT: the public point TPM2B_ECC_PARAMETER * dOut, // OUT: the private scalar @@ -159,48 +119,6 @@ CRYPT_RESULT _cpri__GetEphemeralEcc( return CRYPT_FAIL; } -INT16 _cpri__GetSymmetricBlockSize( - TPM_ALG_ID symmetricAlg, // IN: the symmetric algorithm - UINT16 keySizeInBits // IN: the key size - ) -{ - ecprintf("%s called\n", __func__); - return -1; -} - -UINT16 _cpri__KDFa( - TPM_ALG_ID hashAlg, // IN: hash algorithm used in HMAC - TPM2B * key, // IN: HMAC key - const char *label, // IN: a 0-byte terminated label used in KDF - TPM2B * contextU, // IN: context U - TPM2B * contextV, // IN: context V - UINT32 sizeInBits, // IN: size of generated key in bit - BYTE * keyStream, // OUT: key buffer - UINT32 * counterInOut, // IN/OUT: caller may provide the iteration - // counter for incremental operations to - // avoid large intermediate buffers. - BOOL once // IN: TRUE if only one iteration is - // performed FALSE if iteration count determined by "sizeInBits" - ) -{ - ecprintf("%s called\n", __func__); - return -1; -} - -UINT16 _cpri__KDFe( - TPM_ALG_ID hashAlg, // IN: hash algorithm used in HMAC - TPM2B * Z, // IN: Z - const char *label, // IN: a 0 terminated label using in KDF - TPM2B * partyUInfo, // IN: PartyUInfo - TPM2B * partyVInfo, // IN: PartyVInfo - UINT32 sizeInBits, // IN: size of generated key in bit - BYTE * keyStream // OUT: key buffer - ) -{ - ecprintf("%s called\n", __func__); - return -1; -} - CRYPT_RESULT _cpri__SignEcc( TPM2B_ECC_PARAMETER * rOut, // OUT: r component of the signature TPM2B_ECC_PARAMETER * sOut, // OUT: s component of the signature @@ -216,19 +134,6 @@ CRYPT_RESULT _cpri__SignEcc( return CRYPT_FAIL; } -UINT16 _cpri__StartHMAC( - TPM_ALG_ID hashAlg, // IN: the algorithm to use - BOOL sequence, // IN: indicates if the state should be saved - CPRI_HASH_STATE * state, // IN/OUT: the state buffer - UINT16 keySize, // IN: the size of the HMAC key - BYTE * key, // IN: the HMAC key - TPM2B * oPadKey // OUT: the key prepared for the oPad round - ) -{ - ecprintf("%s called\n", __func__); - return -1; -} - BOOL _cpri__Startup( void) { |