https://github.com/kalloc/pytpm20
Simple Python TSS TPM2.0 Binding
https://github.com/kalloc/pytpm20
c python python3 tpm tpm2 tpm2-tss
Last synced: 15 days ago
JSON representation
Simple Python TSS TPM2.0 Binding
- Host: GitHub
- URL: https://github.com/kalloc/pytpm20
- Owner: kalloc
- License: mit
- Created: 2019-08-19T09:46:59.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-09-29T10:34:01.000Z (almost 6 years ago)
- Last Synced: 2025-04-02T16:24:11.634Z (3 months ago)
- Topics: c, python, python3, tpm, tpm2, tpm2-tss
- Language: C
- Homepage:
- Size: 39.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple TPM 2.0 Wrapper
## Requirements
- python-dev
- gcc
- tpm2-tss
- tpm2-tools
- automake
- autoconf
- autoconf-archive
- openssl
- libssl-dev### TPM2-TSS
git clone https://github.com/tpm2-software/tpm2-tss;
and install following INSTALL.md instructions### TPM2-TOOLS
git clone https://github.com/tpm2-software/tpm2-tools
and install following INSTALL.md instructions## Build Python module
```
python setup.py build -b .build install
```## Test
```bash
python tests/test.py
```## Usage
### Sign
```python
from tpm20 import tpm20
data = b"to be signed data"
signature = tpm20.sign(data)
```### Extract public key
```python
from tpm20 import tpm20
pubkey = tpm20.public_key
```