TPM utils for Python
Simple Trusted Platform Module utils (and example codes) for Python using pytss library.
Installation
pip install pytpmutils
Dependencies
Debian / Ubuntu
sudo apt-get install tpm-tools libtspi-dev libopencryptoki-dev libssl-dev python-pip python-dev build-essential
Redhat / Fedora
sudo yum install tpm-tools opencryptoki-devel trousers-devel openssl-devel python-pip python-devel
Usage
Generating random data
Generate 2x 128 bytes and pass it to hexdump:
tpm-rndgen --bs=128 --count=2 | hexdump
Generate RSA Key:
tpm-rsagen --keysize 512
Output:
{"exponent": "010001", "modulus": "8aed2c4c971011b94560f0f88236e5decafe64140e097deac70cccfc94c8b97ab6a082544f881137ccc7d0b9ddaf79acfd2d5bddb7fbe223cea1e2f3312091a5", "blob": "010100000010000000040000000001000100020000000c00000200000000020000000000000000000000408aed2c4c971011b94560f0f88236e5decafe64140e097deac70cccfc94c8b97ab6a082544f881137ccc7d0b9ddaf79acfd2d5bddb7fbe223cea1e2f3312091a5000001004b9302a95dfdd81c46e3a439bd5d1d663f6405f60c64a0f455f6fdae3f18ff0fddf7e16e2d47468603bc424126478b069ba3d2749bfc258b42c46e0a860f95f697abdb98da204255685f36b86e58690c6377fda049b80e2c7a9b2acfb37e232dfe16a6651ce1d83162693ca6eecf589aa686ec7bf06db19b76c03877206004d11490e1651a71d79928d763fdd4427ecb912be1a1936a66c097b8b3f8b0174270e8765a2e07c279e663955ae5310a6c7378096a166ba155852bffe7c3bc09f484d242b2742d3165f5423722ae88b6299ab07168711baaecee8e566430ea3072b4cdbd95440ed269c6e0488dc8b9ed19448a9d42d6c0f77ff6f5a66dcad3e5f79f"}
Metadata
Release files for pytpmutils 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytpmutils-0.1.2.tar.gz | 8.3 kB | Without provenance | Details for pytpmutils-0.1.2.tar.gz |
Release files / pytpmutils-0.1.2.tar.gz
| Download URL | pytpmutils-0.1.2.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6210b901fd1151de19614da66d8e04eb204a060f9dd3e877139ef2984ead6d13
|
|
BLAKE2b-256 checksum How to use checksums |
dff1c5dffcacbd8c281546273238f33a0b7a4146f4c398442143331c78eaf06e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pytpmutils 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.