blob: ca87b375b5780b38942535834b484df709108e2f [file] [log] [blame]
Vadim Bendeburyfea3a142015-05-28 18:53:22 -07001/*
2 * Copyright 2015 The Chromium OS Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
5 */
6
7#ifndef __TPM2_CPRIRNG_FP_H
8#define __TPM2_CPRIRNG_FP_H
9
Vadim Bendeburyf788ffb2015-06-05 12:57:27 -070010LIB_EXPORT CRYPT_RESULT
11_cpri__DrbgGetPutState(GET_PUT direction, int bufferSize, BYTE *buffer);
12LIB_EXPORT UINT16 _cpri__GenerateRandom(INT32 randomSize, BYTE *buffer);
Vadim Bendeburyc00055c2015-05-29 22:50:18 -070013LIB_EXPORT UINT16 _cpri__GenerateSeededRandom(
Vadim Bendeburyf788ffb2015-06-05 12:57:27 -070014 INT32 randomSize, // IN: the size of the request
15 BYTE *random, // OUT: receives the data
16 TPM_ALG_ID hashAlg, // IN: used by KDF version but not here
17 TPM2B *seed, // IN: the seed value
18 const char *label, // IN: a label string (optional)
19 TPM2B *partyU, // IN: other data (oprtional)
20 TPM2B *partyV // IN: still more (optional)
21 );
22LIB_EXPORT CRYPT_RESULT _cpri__StirRandom(INT32 entropySize, BYTE *entropy);
Vadim Bendeburyfea3a142015-05-28 18:53:22 -070023LIB_EXPORT BOOL _cpri__RngStartup(void);
24
Vadim Bendeburyf788ffb2015-06-05 12:57:27 -070025#endif // __TPM2_CPRIRNG_FP_H