Tspi_TPM_StirRandom(3)
π Tspi_TPM_StirRandom(3) π
ok so bestie, this one is a page from the Library Functions Manual for Tspi_TPM_StirRandom β and yes it's giving β¨TCG Software Stack Developer's Referenceβ¨ energy, we love a glow-up. grab a strawberry drink and let's get into it π
πΈ NAME πΈ
Tspi_TPM_StirRandom β literally just add entropy to the TPM random number generator π²β¨
π¦ SYNOPSIS π¦
ok so first you gotta include all the headers, no skipping, they're the whole fit π
#include <tss/platform.h>
#include <tss/tcpa_defines.h>
#include <tss/tcpa_typedef.h>
#include <tss/tcpa_struct.h>
#include <tss/tss_typedef.h>
#include <tss/tss_structs.h>
#include <tss/tspi.h>
TSS_RESULT Tspi_TPM_StirRandom(TSS_HTPM hTPM, UINT32 ulEntropyDataLength, BYTE* rgbEntropyData);
π DESCRIPTION π
so the way that Tspi_TPM_StirRandom works is: it adds entropy to the TPM random number generator π«, and the whole point of that is generating better random numbers. like, you're feeding the TPM a little snack so its randomness is more random. iconic behaviour, honestly π
β οΈ important note bestie: the entropy variable should be assigned an appropriately seeded random number before this function is called. don't come in empty-handed, the TPM can tell π
π PARAMETERS π
π hTPM
hTPM is the param that specifies the handle of the TPM object. and get this β the command to get the TPM to test itself will be sent here. yes, really, that's what it says, I'm not making it up π«Ά
π ulEntropyDataLength
ulEntropyDataLength is the length in bytes of the rgbEntropyData parameter. so it's the little size tag for your entropy blob π
π rgbEntropyData
rgbEntropyData is a pointer to the entropy data. that's it, that's the whole vibe, it's just pointing at your entropy β¨
π RETURN CODES π
Tspi_TPM_StirRandom returns TSS_SUCCESS on success π β otherwise one of these little gremlins shows up:
TSS_E_INVALID_HANDLEβhTPMis not a valid handle πTSS_E_INTERNAL_ERRORβ an internal SW error has been detected π₯TSS_E_BAD_PARAMETERβ one or more parameters is bad π
π§ CONFORMING TO π§
Tspi_TPM_StirRandom conforms to the Trusted Computing Group Software Specification version 1.1 Golden π periodt.
π«Ά SEE ALSO π«Ά
so yeah, that's the whole page, no notes, slay π β¨
TSS 1.1 Β· 2004-05-25 β this page has been serving since 2004-05-25, and it's still in the TSS 1.1 era, so it's vintage bestie π iykyk, drink water, stir your entropy, bye ππ¦πΈ
π¦ where this page comes from
- debian bookworm: libtspi-dev 0.3.15-0.3 Β· BSD-3-Clause
- debian trixie: libtspi-dev 0.3.15-0.4 Β· BSD-3-Clause
- epel 10: trousers-devel 0.3.15-11.el10_0 Β· BSD
- epel 9: trousers-devel 0.3.15-5.el9 Β· BSD
- fedora 43: trousers-devel 0.3.15-15.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: trousers-devel 0.3.15-15.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: trousers-devel 0.3.15-16.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: trousers-devel 0.3.15-16.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: trousers-devel 0.3.15-17.fc44 Β· LicenseRef-Callaway-BSD
- fedora 44: trousers-devel 0.3.15-17.fc44 Β· LicenseRef-Callaway-BSD
- nixos 26.05: trousers 0.3.15
- nixpkgs unstable: netbsd-source 11.0
- nixpkgs unstable: trousers 0.3.15
- opensuse-leap 16.0: trousers-devel 0.3.15-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: trousers-devel 0.3.15-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: trousers-devel 0.3.15-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: trousers-devel 0.3.15-160000.2.2 Β· BSD-3-Clause
- ubuntu jammy: libtspi-dev 0.3.15-0.2 Β· BSD-3-Clause
- ubuntu noble: libtspi-dev 0.3.15-0.3build2 Β· BSD-3-Clause
- ubuntu questing: libtspi-dev 0.3.15-0.4
- ubuntu resolute: libtspi-dev 0.3.15-1 Β· BSD-3-Clause
- ubuntu stonking: libtspi-dev 0.3.15-1ubuntu2 Β· BSD-3-Clause
- Copyright (C) 2004 International Business Machines Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms