Vadim Bendebury | fea3a14 | 2015-05-28 18:53:22 -0700 | [diff] [blame] | 1 | /* |
| 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 Bendebury | c00055c | 2015-05-29 22:50:18 -0700 | [diff] [blame] | 10 | LIB_EXPORT CRYPT_RESULT _cpri__DrbgGetPutState( |
| 11 | GET_PUT direction, |
| 12 | int bufferSize, |
| 13 | BYTE *buffer |
| 14 | ); |
Vadim Bendebury | 0a05071 | 2015-05-29 11:35:04 -0700 | [diff] [blame] | 15 | LIB_EXPORT UINT16 _cpri__GenerateRandom( |
| 16 | INT32 randomSize, |
| 17 | BYTE *buffer |
| 18 | ); |
Vadim Bendebury | c00055c | 2015-05-29 22:50:18 -0700 | [diff] [blame] | 19 | LIB_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 | ); |
| 28 | LIB_EXPORT CRYPT_RESULT _cpri__StirRandom( |
| 29 | INT32 entropySize, |
| 30 | BYTE *entropy |
| 31 | ); |
Vadim Bendebury | fea3a14 | 2015-05-28 18:53:22 -0700 | [diff] [blame] | 32 | LIB_EXPORT BOOL _cpri__RngStartup(void); |
| 33 | |
| 34 | #endif // __TPM2_CPRIRNG_FP_H |