diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2015-06-01 19:15:01 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-06-03 22:11:54 +0000 |
commit | 8ef10bbed2106e499c642894106c305aa28578e6 (patch) | |
tree | 3c7688b688e15fc363ca2945046b3a6e74457e82 | |
parent | 3dcb30110477851f4003b5b40455f8fd2bbd2469 (diff) | |
download | tpm2-8ef10bbed2106e499c642894106c305aa28578e6.tar.gz |
Changes to allow compilation of ZGen_2Phase.c
BUG=none
TEST=compilation succeeds:
cc -Wall -Werror -c -o /dev/null ZGen_2Phase.c
Change-Id: I188b7592ae1154dd3c31d34185ffa3d8d3684364
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/274678
Reviewed-by: Utkarsh Sanghi <usanghi@chromium.org>
-rw-r--r-- | CryptUtil_fp.h | 10 | ||||
-rw-r--r-- | TPM_Types.h | 5 | ||||
-rw-r--r-- | ZGen_2Phase_fp.h | 28 |
3 files changed, 43 insertions, 0 deletions
diff --git a/CryptUtil_fp.h b/CryptUtil_fp.h index 1f83df1..35557b9 100644 --- a/CryptUtil_fp.h +++ b/CryptUtil_fp.h @@ -98,6 +98,16 @@ void CryptDrbgGetPutState( #define CryptEccGetKeySizeInBytes(curve) \ ((CryptEccGetKeySizeInBits(curve)+7)/8) +TPM_RC CryptEcc2PhaseKeyExchange( + TPMS_ECC_POINT *outZ1, // OUT: the computed point + TPMS_ECC_POINT *outZ2, // OUT: optional second point + TPM_ALG_ID scheme, // IN: the key exchange scheme + TPM_ECC_CURVE curveId, // IN: the curve for the computation + TPM2B_ECC_PARAMETER *dsA, // IN: static private TPM key + TPM2B_ECC_PARAMETER *deA, // IN: ephemeral private TPM key + TPMS_ECC_POINT *QsB, // IN: static public party B key + TPMS_ECC_POINT *QeB // IN: ephemeral public party B key + ); TPM_RC CryptEncryptRSA( UINT16 *cipherOutSize, // OUT: size of cipher text in byte BYTE *cipherOut, // OUT: cipher text diff --git a/TPM_Types.h b/TPM_Types.h index 7209265..7fd1f58 100644 --- a/TPM_Types.h +++ b/TPM_Types.h @@ -1428,6 +1428,11 @@ enum { RC_Unseal_itemHandle, RC_VerifySignature_keyHandle, RC_VerifySignature_signature, + RC_ZGen_2Phase_counter, + RC_ZGen_2Phase_inQeB, + RC_ZGen_2Phase_inQsB, + RC_ZGen_2Phase_inScheme, + RC_ZGen_2Phase_keyA, }; enum { diff --git a/ZGen_2Phase_fp.h b/ZGen_2Phase_fp.h new file mode 100644 index 0000000..fc432e3 --- /dev/null +++ b/ZGen_2Phase_fp.h @@ -0,0 +1,28 @@ +/* + * Copyright 2015 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef __TPM2_ZGEN_2PHASE_FP_H_ +#define __TPM2_ZGEN_2PHASE_FP_H_ + +typedef struct { + TPMI_DH_OBJECT keyA; + UINT16 counter; + TPM_ALG_ID inScheme; + TPM2B_ECC_POINT inQeB; + TPM2B_ECC_POINT inQsB; +} ZGen_2Phase_In; + +typedef struct { + TPM2B_ECC_POINT outZ1; + TPM2B_ECC_POINT outZ2; +} ZGen_2Phase_Out; + +TPM_RC TPM2_ZGen_2Phase( + ZGen_2Phase_In *in, // IN: input parameter list + ZGen_2Phase_Out *out // OUT: output parameter list +); + +#endif // __TPM2_ZGEN_2PHASE_FP_H_ |