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:
Andreas Steffen
2017-03-20 21:16:10 +01:00
parent 46d4d2a71e
commit 2b233c8a64
9 changed files with 211 additions and 3 deletions
+9
View File
@@ -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.
*/