blob: 585101fd915103bb1d6cc06583f015acd290a056 [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 Bendeburyc00055c2015-05-29 22:50:18 -070010LIB_EXPORT CRYPT_RESULT _cpri__DrbgGetPutState(
11 GET_PUT direction,
12 int bufferSize,
13 BYTE *buffer
14 );
Vadim Bendebury0a050712015-05-29 11:35:04 -070015LIB_EXPORT UINT16 _cpri__GenerateRandom(
16 INT32 randomSize,
17 BYTE *buffer
18 );
Vadim Bendeburyc00055c2015-05-29 22:50:18 -070019LIB_EXPORT UINT16 _cpri__GenerateSeededRandom(
20 INT32 randomSize, // IN: the size of the request
21 BYTE *random, // OUT: receives the data
22 TPM_ALG_ID hashAlg, // IN: used by KDF version but not here
23 TPM2B *seed, // IN: the seed value
24 const char *label, // IN: a label string (optional)
25 TPM2B *partyU, // IN: other data (oprtional)
26 TPM2B *partyV // IN: still more (optional)
27 );
28LIB_EXPORT CRYPT_RESULT _cpri__StirRandom(
29 INT32 entropySize,
30 BYTE *entropy
31 );
Vadim Bendeburyfea3a142015-05-28 18:53:22 -070032LIB_EXPORT BOOL _cpri__RngStartup(void);
33
34#endif // __TPM2_CPRIRNG_FP_H