The tpm plugin offers random number generation
The tpm plugin can be used to derive true random numbers from a TPM 2.0 device. The get_random method must be explicitly enabled in strongswan.conf with the plugin.tpm.use_rng = yes option.
This commit is contained in:
@@ -134,6 +134,15 @@ struct tpm_tss_t {
|
||||
signature_scheme_t scheme, chunk_t data, chunk_t pin,
|
||||
chunk_t *signature);
|
||||
|
||||
/**
|
||||
* Get random bytes from the TPM
|
||||
*
|
||||
* @param bytes number of random bytes requested
|
||||
* @param buffer buffer where the random bytes are written into
|
||||
* @return TRUE if random bytes could be delivered
|
||||
*/
|
||||
bool (*get_random)(tpm_tss_t *this, size_t bytes, uint8_t *buffer);
|
||||
|
||||
/**
|
||||
* Destroy a tpm_tss_t.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user